[Enhancement:] azurerm_cdn_frontdoor_custom_domain - validate host_name values, refine ManagedCertificate hostname constraints, and harden related Front Door acceptance tests#32349
Open
WodansSon wants to merge 8 commits into
Conversation
azurerm_cdn_frontdoor_custom_domain - validate host names and update related testsazurerm_cdn_frontdoor_custom_domain - validate host_name values, refine ManagedCertificate hostname constraints, and harden related Front Door acceptance tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Community Note
Description
This PR updates validation and related test coverage for
azurerm_cdn_frontdoor_custom_domain, including managed-certificate-specific hostname constraints, wildcard-domain handling, refreshed documentation for current Azure Front Door behavior, and adjacent CDN acceptance test fixes needed to keep the suite aligned with current deprecation rules.The Provider Changes Are:
host_nameso it must be a valid fully qualified domain nametls.certificate_type = "ManagedCertificate"rejectshost_namevalues longer than 64 charactershost_namevalidation generally, while rejecting wildcard domains specifically whentls.certificate_type = "ManagedCertificate"The Test Changes Are:
host_namevalidatorExpectErrordata.RandomStringto reduce collisions between tests started close togetherhost_namevalidation and keep managed-certificate wildcard rejection covered in acceptance validationCustomerCertificateis deferred until a reusable customer-certificate test fixture is availableThe Documentation Changes Are:
azurerm_cdn_frontdoor_custom_domaintlsargument ordering aligned with the docs contractPR Checklist
Changes to existing Resource / Data Source
Testing
Note
Apex-domain managed certificate acceptance test coverage is intentionally not included in this PR. Azure Front Door now supports managed certificates for apex domains, and the provider/docs changes here align with that behavior. However, the current Front Door acceptance fixture reuses a shared DNS parent-domain setup across tests, and I did not want to mutate that shared setup without agreement on a dedicated approach from the reviewer who owns the domain. I left an inline note in
cdn_frontdoor_custom_domain_resource_test.goso this limitation is documented in the code as well.Change Log
azurerm_cdn_frontdoor_custom_domain- validatehost_namevalues, refineManagedCertificatehostname constraints, and harden related Front Door acceptance testsThis is a (please select all that apply):
Related Issue(s)
N/A
AI Assistance Disclosure
Extent of AI usage:
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the provider.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
No changes to security controls.