-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_template_deployment
- support for specifying parameters via parameters_body
#404
azurerm_template_deployment
- support for specifying parameters via parameters_body
#404
Conversation
One similar issue I ran into was here: hashicorp/terraform#8331 |
"parameters_body": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you set this as mutually exclusive with parameters
(see ConflictsWith
) and validate that it is valid JSON?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may also want a StateFunc
to normalize the JSON so that things like whitespace don't cause diffs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed a commit to add these
Looks like there is a merge conflict as well, so you should probably rebase. |
… passed to Azure on the call to deploy an ARM Template. Enables us to use KeyVault secret references for parameters
ff63b33
to
35b7e68
Compare
Tests pass:
|
pushed updates to resolve these issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
azurerm_template_deployment
- support for specifying parameters via parameters_body
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Currently, the resource azurerm_template_deployment only supports passing in parameters as a key, value pair. This does not allow the use of parameters that reference a KeyVault that is enabled for template deployment, which is desired in some use-cases.
One such use-case is executing a bootstrap script when a virtual machine (or scale set) comes online - via the Azure extension mechanism - and inject secrets into the script being executed, without the operator that runs terraform to know their value upfront.
This is enabled similar to the template_body parameter, and it passes the JSON string to the Azure Rest API.