-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Support for azurerm_app_service_managed_certificate when using multiple app services with the same custom domain in a single resource group #17378
Comments
@dcrreynolds have you tried azure portal and does it work? |
Hi @xiaxyi, yes, you can build this structure using the portal. You end up with 2 different certs (on per region) each attached to the expected function app. The certs are named "-". |
@dcrreynolds did you ever solve this? |
yes, but with a |
I had the same issue, and have been working with Azure support to find a solution. But we came to the conclusion that it is not supported to create and bind app manged certificates to the same custom domain in multiple apps, since the For anyone else stuck with the same issue, here is a workaround using the CLI. In a loop over all apps (you can export this info from your terraform run to a json file):
|
Is there an existing issue for this?
Community Note
Description
Trying to build an application that uses Traffic Manager to balance between 2 function apps in the same resource group in different regions. This requires that the Traffic Manager endpoint be added as a Custom domain to both function apps with the same name.
I tried to achieve this with the below HCL
This creates a Custom hostname on each function as expected, but only a single certificate with the name of the binding (a unique name per instance of the cert would be needed). Then
azurerm_app_service_certificate_binding
fails because one of the functions does not end up with a matching certificate.Looking at the state file I see 2 instances for
azurerm_app_service_managed_certificate
. They have different custom_hostname_binding_id's like I would expect, but all other values are the same, including the thumbprint and id. This crossing of certs leads toazurerm_app_service_certificate_binding
failing.New or Affected Resource(s)/Data Source(s)
azurerm_app_service_custom_hostname_binding, azurerm_app_service_managed_certificate, azurerm_app_service_certificate_binding
Potential Terraform Configuration
One possible solution would be separating the name of the cert from the hostname value.
References
No response
The text was updated successfully, but these errors were encountered: