-
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_cdn_frontdoor_profile_custom_domain
must allowed to be associated with multiple routes
#18613
Comments
@sebader, thank you for opening this issue. I was not aware that you could have multiple custom domains associated with a single route, my bad. The reason I decided to do it this way is because of the requirement to disassociate the custom domain with the route in order to delete the custom domain. Because of this requirement it broke the single apply rule for Terraform and I had to make the custom domain self aware that it was associated with the route so on delete it would know to remove the association before it actually deleted itself... I am sure there are prolly other ways to go about this but that was the one I came up with. 🤔 |
* Initial check-in... * Churn while I work out the logic... * So close... * Fix lint error... * Fix case sensitivity and move toward association * Almost there... total redesign... * Done... now write test cases... * Last of the case insensitive fix... * Add nil checks to helper functions * Fix race condition with route resource * Add note to docs for route race condition * Add third route to example * Fix lint error * terrafmt * Fix up some loose ends and test cases * Fix comment spacing * Terrafmt test * Remove import check for association * last minute changes * Remove associate_with_cdn_frontdoor_route_id * remove validation from read func * refactor disable link resource * Update nil error message * fix typo in var name * Update website/docs/r/cdn_frontdoor_route_disable_link_to_default_domain.html.markdown Co-authored-by: Tom Harvey <[email protected]> * Update website/docs/r/cdn_frontdoor_route.html.markdown Co-authored-by: Tom Harvey <[email protected]> * Update website/docs/r/cdn_frontdoor_custom_domain_association.html.markdown Co-authored-by: Tom Harvey <[email protected]> * Update website/docs/r/cdn_frontdoor_custom_domain_association.html.markdown Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_custom_domain_association_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_custom_domain_association_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_custom_domain_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_custom_domain_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_custom_domain_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_custom_domain_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_custom_domain_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_endpoint_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_endpoint_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_endpoint_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_endpoint_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_firewall_policy_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_firewall_policy_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_helpers.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_helpers.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_helpers.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_helpers.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_helpers.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_helpers.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_helpers.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_origin_group_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_origin_group_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update internal/services/cdn/cdn_frontdoor_origin_group_resource.go Co-authored-by: Tom Harvey <[email protected]> * Update website/docs/r/cdn_frontdoor_custom_domain_association.html.markdown Co-authored-by: Tom Harvey <[email protected]> * remove all Insensitively from resource * Update website/docs/r/cdn_frontdoor_custom_domain_association.html.markdown Co-authored-by: Tom Harvey <[email protected]> * Address PR comments * Fix frontmatter issue with doc * Remove extra space from H1 * remove friendly parse function Co-authored-by: Tom Harvey <[email protected]>
This functionality has been released in v3.27.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.0.0
AzureRM Provider Version
3.25.0
Affected Resource(s)/Data Source(s)
azurerm_cdn_frontdoor_profile_custom_domain, azurerm_cdn_frontdoor_route
Terraform Configuration Files
-
Debug Output/Panic Output
Expected Behaviour
With the release of
azurerm_cdn_frontdoor_profile_custom_domain
andazurerm_cdn_frontdoor_route
it is not possible to use one custom domain on multiple (many) routes. This must be enabled.currently
associate_with_cdn_frontdoor_route_id
onazurerm_cdn_frontdoor_profile_custom_domain
is a string, it should be a slice. However, it would be a lot more logical to me, if the association is set on a route, like you would do through the portal: When you create a new route, you can select all the custom domains (plus the default endpoint) to enable this route for.@WodansSon
Actual Behaviour
No response
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: