azurerm_management_group_subscription_association - could not read properties for Management Group #23323
Closed
1 task done
Labels
Milestone
Is there an existing issue for this?
Community Note
Terraform Version
1.5.5
AzureRM Provider Version
3.73.0
Affected Resource(s)/Data Source(s)
azurerm_management_group_subscription_association
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
During the provider read of
azurerm_management_group_subscription_association
, if the expected Management Group has no children, it should be treated as an empty list instead of an error. Then because the expected Subscription is not a child of the Management Group, the Subscription should be re-associated to the proper Management Group. Error is here where instead the provider errors out if the Management Group's children are empty, whereas instead of an error the children list should just be set to an empty list. Then later found would be considered false and the Management Group ID set to empty forcing the re-association.Actual Behaviour
When a Terraform plan or apply is run after the Subscription is manually moved, outside of Terraform's control, and thus the Management Group has no other children Subscriptions, Terraform produces the following error message ``.
Steps to Reproduce
terraform apply
terraform plan
and error occuresImportant Factoids
No response
References
https://github.com/hashicorp/terraform-provider-azurerm/blob/main/internal/services/managementgroup/subscription_association_resource.go#L123
The text was updated successfully, but these errors were encountered: