[X] I have checked for previous/existing GitHub issues
Issue Type?
Bug
(Optional) Module Version
v0.7.0
(Optional) Correlation Id
No response
Description
When attempting to deploy new management groups using the new architecture in 0.7.0 the plan fails with the following error:
│ Error: Unsupported attribute
│
│ on .terraform\modules\alz_global\outputs.tf line 10, in output "management_group_resource_ids":
│ 10: ) : k => v.id }
│
│ This object does not have an attribute named "id".
The output of the azapi_helper module does not have a value for id, I believe the intent was to use resource_id.
Updating the above as follows appears to resolve the issue:
output "management_group_resource_ids" {
value = { for k, v in merge(
module.management_groups_level_0,
module.management_groups_level_1,
module.management_groups_level_2,
module.management_groups_level_3,
module.management_groups_level_4,
module.management_groups_level_5,
module.management_groups_level_6,
) : k => v.resource_id }
}
Check for previous/existing GitHub issues
Issue Type?
Bug
(Optional) Module Version
v0.7.0
(Optional) Correlation Id
No response
Description
When attempting to deploy new management groups using the new architecture in 0.7.0 the plan fails with the following error:
│ Error: Unsupported attribute │ │ on .terraform\modules\alz_global\outputs.tf line 10, in output "management_group_resource_ids": │ 10: ) : k => v.id } │ │ This object does not have an attribute named "id".
The output of the azapi_helper module does not have a value for id, I believe the intent was to use resource_id.
https://github.com/Azure/terraform-azurerm-avm-ptn-alz/blob/a787df5d59c93c15ae370d08fcdad3a6bea455e0/modules/azapi_helper/outputs.tf#L16-L19
https://github.com/Azure/terraform-azurerm-avm-ptn-alz/blob/a787df5d59c93c15ae370d08fcdad3a6bea455e0/outputs.tf#L1-L11
Updating the above as follows appears to resolve the issue: