Hi! I’m trying to create a Traffic Manager in Azure using this terraform script as a base:
I think all the resources were created fine. But for some reason the traffic manager is getting an error with status code 409 with no clue why is not creating.
I tried to use the terraform provider 2.45.1, 2.46.1 and the latest 2.86.0 with no success, with the same error.
However, if I create the TM manually at the Azure Portal then I’m able to create it from there, but by terraform I can’t.
this is the provider version
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "2.86.0"
}
}
}
and this is the code that request the traffic manager resource:
resource "azurerm_traffic_manager_profile" "traffic_manager_profile" {
name = format("%s-trafficmanager", local.base_name)
resource_group_name = azurerm_resource_group.rg_global.name
traffic_routing_method = "Performance"
dns_config {
relative_name = format("%s", local.base_name)
ttl = 100
}
monitor_config {
protocol = "TCP"
port = var.traffic_manager_profile_port
}
}
I tried adding the parameter “path” as an empty string, as null and also removing it as we can see above. No success at all. The profile port is 80. All the code is the same as we have at
the only change from the original code provided by Azure was mostly the resource group regions that are allocated to the North Europe. But I tried in other regions as well and it didnt work.
Somebody raised a similar question to the terraform provider:
But it seems like they asked to redirect this question to this forum.