skip to Main Content

Terraform and Azure: Problems with association between NetworkSecurityGroups and Subnets

While applying my terraform script, I'm getting the following error: ╷ │ Error: A resource with the ID "/subscriptions/***/resourceGroups/rg-subnet-test/providers/Microsoft.Network/virtualNetworks/subnet-test-vnet/subnets/subnet-test-subnet" already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource…

VIEW QUESTION

Azure – how to variablize the resource attribute as input value in terraform

I am trying to use below code data "azurerm_resource_group" "rg_tst_na" { name = "test1" } data "azurerm_resource_group" "rg_dev_na" { name = "test2" } resource "azurerm_role_assignment" "test_role_assign" { for_each = var.test_role_assignment principal_id = azurerm_user_assigned_identity.test_setup["${each.key}_${each.value}"].principal_id # this is created as separate resource…

VIEW QUESTION

Azure Traffic Manager Endpoint: The following locations specified in the geoMapping property for endpoint are not supported

I'm trying to create an Azure Traffic Manager Endpoint via Terraform, but I don't know what to put in "geo_mappings" value. This is my resource: resource "azurerm_traffic_manager_azure_endpoint" "se22condary-ae" { name = "se22condary-endpoint" profile_id = azurerm_traffic_manager_profile.tm.id target_resource_id = azurerm_linux_web_app.secondary.id geo_mappings =…

VIEW QUESTION
Back To Top
Search