-
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
New Resources: azurerm_(resource_group|subscription)_template_deployment
#8672
Conversation
There's no plans to do 3.0 anytime soon, but this allows us to start laying the groundwork for it - so that we don't have to circle back and deprecate a ton of things conditionally later.
…p/Subscription ID's
65375f6
to
6c31b5d
Compare
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.
Thanks @tombuildsstuff - one question and one minor typo(?), but otherwise LGTM 👍
azurerm/internal/services/resource/template_deployment_resource_group_resource.go
Show resolved
Hide resolved
website/docs/r/resource_group_template_deployment.html.markdown
Outdated
Show resolved
Hide resolved
Co-authored-by: Steve <[email protected]>
This has been released in version 2.30.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.30.0"
}
# ... other configuration ... |
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 👉 [email protected]. Thanks! |
This PR introduces two new resources:
azurerm_resource_group_template_deployment
azurerm_subscription_template_deployment
Which allow deploying an ARM Template Deployment at both the Resource Group and Subscription level. Whilst we currently have a Template Deployment resource in the form of the
azurerm_template_deployment
field - there's several limitations to this:As such, whilst this Template Deployment resource is usable, it's not ideal - and ultimately this leads to us recommending users deploy an ARM Template into it's own Resource Group, to allow the Resource Group deletion to clear up items which have been deployed.
Instead this PR introduces two new resources
azurerm_resource_group_template_deployment
andazurerm_subscription_template_deployment
- which can be used to deploy an ARM Template at either a Resource Group or a Subscription level.These new resources support specifying Parameters (and retrieving Outputs) as JSON blobs - so we support all of the available types returned from Azure (Strings, Ints, Bools, Objects etc) via the
jsondecode
interpolation function.In addition the Resource Group Template Deployment now attempts to delete the resources provisioned by this Template Deployment when it's being deleted (there's a feature-toggle for this in the provider block). It's worth noting this is best-effort for the moment and likely requires further tweaking - but seems to work with a nested deployment.
Unfortunately we're unable to do the same thing for Subscription Template Deployments due to a lack of support in the Azure API for a generic delete method at this level.
Whilst the existing
azurerm_template_deployment
resource won't be going away anytime soon - we can supersede it in this release, deprecate it in 3.0 and then remove it in the future once there's been sufficient time to switch-over.This PR also updates the Resources package to
2020-06-01
, so that we can gain this new functionality.Fixes #3408
Fixes #5706
Fixes #6561