-
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
Azure Managed Certificate and Custom Domain for Container App #27362
Comments
Hi @ferraroluc , thank you for opening the issue. This seems a service side issue of this resource. I'll investigate further and keep you posted here. Thanks. |
Hi @webstean, thanks for the link. I can confirm functionality from Azure Portal works correctly. But, using Terraform We can say that, according to the tutorial, Terraform completes steps 1 to 8, but steps 9 and onwards must be completed manually. Thanks. |
I can confirm this issue. I wanted to use the free managed certificates for container apps as well and ran into the same problem. I took some workaround advice from another issue posting - a dirty hack utilizing the azure CLI. If you are using a version of the azurerm provider prior to v4.3.0 you need to omit creating the resource azurerm_container_app_custom_domain completely and use local az cli calls. If you do not omit creating the resource you will run into #25972 which has been fixed in v4.3.0.
If you are using v4.3.0 or later you can create the azurerm_container_app_custom_domain resource in terraform. But you still need to call at least "az containerapp hostname bind":
In both cases destroying the environment works just fine since Azure destroys the certificate binding as soon as you destroy the container app. And later Azure also destroys the managed certificate when you destroy the container app environment. And prior to executing the deploy you need to login to the az CLI and set the proper subscription. |
Any updates on prioritization of fixes for the binding? |
Can confirm the issue |
Is there an existing issue for this?
Community Note
Terraform Version
1.9.5
AzureRM Provider Version
4.0.1
Affected Resource(s)/Data Source(s)
azurerm_container_app_custom_domain
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Creation of a Container App with Custom Domain and Azure Managed Certificates
Actual Behaviour
Creation of a Container App with Custom Domain without Azure Managed Certificates
Steps to Reproduce
terraform apply
To make it work, once the resources have been created, the following must be configured manually:
Container App --> Settings --> Custom domains --> Add binding --> Validate --> Add
Important Factoids
No response
References
Documentation at https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/container_app_custom_domain seems to indicate that is possible to create a Container App with Azure Managed Certificates, but it doesn't seem to be automatically binding between certificate and custom domain, even with the correct DNS records already setted.
The text was updated successfully, but these errors were encountered: