Open JyrkiHei opened 10 months ago
Fortunately I had colleagues with better eyesight than me! Upgrade document for v5 had this example of 'terraform import' command which seems to have incorrectly formatted second parameter.
Example was:
terraform import 'module.
And based on Terraform documentation, it should be:
terraform import 'module.
Terraform Docs: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/management_group_subscription_association
Ahh thank you for picking this up. We will fix
Community Note
Versions
terraform: 1.7.0
azure provider: AzureRM 3.88.0, AzApi v1.12
module: Azure/caf-enterprise-scale/azurerm v4.2.0 or 5.0.3
Description
Describe the bug
We had an existing deployment with strict_subscription_association = true. This was done with 4.2.0 version of the module. We tried to disable strict association, because we used LZ-VENDING also but was unable to import the three subscriptions (identity, connectivity and management). Version 5.0.3 gave the same error.
I tried to import the associations but was unable to do anything.
Steps to Reproduce
terraform import module.enterprise_scale[0].azurerm_management_group_subscription_association.enterprise_scale["/providers/Microsoft.Management/managementGroups/cloud-connectivity/subscriptions/b12c2937-3458-4cf1-b749-331efd25c201"] /providers/Microsoft.Management/managementGroups/cloud-connectivity/subscriptions/b12c2937-3458-4cf1-b749-331efd25c201
Screenshots
Additional context