Skip to content

Conversation

@iotmani
Copy link
Contributor

@iotmani iotmani commented Sep 30, 2021

What does this PR do?

To avoid clashing with other names, we now generate a globally unique one, similar to the Eventhub namespace name.
Also, use 'splatting' to add a hash table as parameters that we can build programmatically.

The parent ARM template was also changed as it overrides the function one, and the latter was changed in case an advanced user wants to invoke it by itself, so they remain whole and self-contained as much as possible.

Motivation

AZI-360

Testing Guidelines

Deployed both .ps1 scripts with the default and a set function app name, and saw they got deployed correctly on Azure side.
First in simulation mode with -WhatIf and then a real deployment.

Additional Notes

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)
  • This PR passes the unit tests
  • This PR passes the installation tests (ask a Datadog member to run the tests)

}

# Use values if parameters passed, otherwise we rely on the default value generated by the ARM template
if ($EventhubNamespace) { $deploymentArgs["eventhubNamespace"] = $EventhubNamespace }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is much cleaner :)

@iotmani iotmani merged commit aff498c into master Oct 2, 2021
@iotmani iotmani deleted the islam/function-app-name-azi-360 branch October 2, 2021 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants