Reputation: 1577
I'm using Terraform to create some resources on Azure. In particular I have 2 App Service in different Locations and Traffic Manager Profile to switch traffic to the closest App Service. It works after creating, manually from the Azure console, a certificate to the Traffic Manager and bind it on the Custom Domain for both App Services. But if I do it with Terraform, I have the following issue:
Error: creating/updating Custom Hostname Certificate Binding "ist-traffic-manager-geodev2.trafficmanager.net" with certificate name "ist-traffic-manager-geodev2.trafficmanager.net" (App Service "ist-backend-secondary-geodev2" / Resource Group "ist-platform-geodev2"): web.AppsClient#CreateOrUpdateHostNameBinding: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="NotFound" Message="Cannot find Certificate with name 718A1D959A408BEA991D64B52D241154A9F24120." Details=[{"Message":"Cannot find Certificate with name 718A1D959A408BEA991D64B52D241154A9F24120."},{"Code":"NotFound"},{"ErrorEntity":{"Code":"NotFound","ExtendedCode":"51004","Message":"Cannot find Certificate with name 718A1D959A408BEA991D64B52D241154A9F24120.","MessageTemplate":"Cannot find {0} with name {1}.","Parameters":["Certificate","718A1D959A408BEA991D64B52D241154A9F24120"]}}]
with azurerm_app_service_certificate_binding.secondary-ascb,
on main-geodev2.tf line 510, in resource "azurerm_app_service_certificate_binding" "secondary-ascb":
510: resource "azurerm_app_service_certificate_binding" "secondary-ascb" {
If I check on the Azure platform, I can see that the Primary App Service Custom Domain is binded, the second not:
If I look about Traffic Manager certificate details, I can see that it exists!!
Upvotes: 1
Views: 199