New Resource: azurerm_container_app_environment_managed_certificate#31137
Conversation
sreallymatt
left a comment
There was a problem hiding this comment.
Thanks @jiaweitao001 - I've left some comments inline
- Use consistent error message format with retrieving/updating - Add nil check for env.Model before accessing nested fields - Use pointer.FromEnum for DomainControlValidation - Add CNAME and TXT domain control validation tests - Shorten DNS record name to avoid exceeding 64 char limit - Add custom domain with depends_on to docs example Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Hi @jiaweitao001 - it looks like |
TXT domain control validation requires longer polling time due to DNS propagation and CA signing chain being slower than HTTP/CNAME methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
edefc78 to
630b677
Compare
The CNAME record was pointing to latest_revision_fqdn instead of the container app's ingress FQDN. Azure requires the CNAME to map directly to the app's generated domain name (ingress fqdn) for domain validation to succeed. This was causing TXT validation to stay in Pending state indefinitely, resulting in context deadline exceeded. Also reverts the temporary timeout increase from the previous commit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e358342 to
74be517
Compare
TXT validation is accepted by the API but does not appear to be functional on the Azure service side - certificates remain in Pending state indefinitely. Remove the TXT test case and update documentation to only advertise CNAME and HTTP as supported validation methods. The validation code still accepts TXT to match the API definition. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hi @sreallymatt, I removed the TXT validation test case and updated the documentation to only advertise CNAME and HTTP as supported validation methods. TXT exists as an enum value in the API definition, but the service side does not appear to support it currently. |
| ForceNew: true, | ||
| Default: string(managedenvironments.ManagedCertificateDomainControlValidationHTTP), | ||
| ValidateFunc: validation.StringInSlice( | ||
| managedenvironments.PossibleValuesForManagedCertificateDomainControlValidation(), |
There was a problem hiding this comment.
Given TXT does not currently appear to function, we should omit it from this ValidateFunc as well. If/when support is added, we can revisit and add it back to the resource.
There was a problem hiding this comment.
Sure. Removed.
Per review feedback, remove TXT from the allowed validation values since it does not currently function on the Azure service side. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sreallymatt
left a comment
There was a problem hiding this comment.
Thanks @jiaweitao001 - LGTM ✅
Community Note
Description
This PR add support for the azurerm_container_app_environment_managed_certificate resource. This PR replaces #28366 since it has been inactivate for a while.
PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_container_app_environment_managed_certificateThis is a (please select all that apply):
Related Issue(s)
Fixes #27362
AI Assistance Disclosure
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.
Note
If this PR changes meaningfully during the course of review please update the title and description as required.