Skip to content
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

Closed
1 task done
sebader opened this issue Oct 3, 2022 · 4 comments · Fixed by #18600
Closed
1 task done

Comments

@sebader
Copy link
Contributor

sebader commented Oct 3, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

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 and azurerm_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 on azurerm_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

@sebader sebader added the bug label Oct 3, 2022
@github-actions github-actions bot removed the bug label Oct 3, 2022
@aluchs-hpg
Copy link

I believe this is a clone of #18598. PR #18600 has been raised to resolve the issue.

@WodansSon
Copy link
Collaborator

@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. 🤔

@WodansSon WodansSon added this to the v3.27.0 milestone Oct 13, 2022
WodansSon added a commit that referenced this issue Oct 14, 2022
* 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]>
@github-actions
Copy link

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!

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.