Azure / terraform-azurerm-avm-res-authorization-roleassignment

AVM Terraform module for role assignments
https://registry.terraform.io/modules/Azure/avm-res-authorization-roleassignment
MIT License
9 stars 3 forks source link

[AVM Module Issue]: unable to use role assignments for resources #46

Open rick-pb opened 5 months ago

rick-pb commented 5 months ago

Check for previous/existing GitHub issues

Issue Type?

Bug

(Optional) Module Version

0.0.1

(Optional) Correlation Id

No response

Description

when trying to apply the following module: module "role_assignments" { source = "Azure/avm-res-authorization-roleassignment/azurerm" version = "0.0.1"

groups_by_display_name = { group1 = "Example Group" }

role_definitions = { contributor = "Contributor" }

role_assignments_for_resources = { example1 = { resource_name = "kv-example" resource_group_name = "rg-example" role_assignments = { role_assignment_1 = { role_definition = "contributor" groups = ["group1"] } } }

} }

I'm receiving the following error:

│ Error: Invalid index │ │ on .terraform/modules/role_assignments/local.role.assignments.for.resources.tf line 39, in locals: │ 39: scope = data.azurerm_resources.resources_by_resource_group_and_name[key].resources[0].id │ ├──────────────── │ │ data.azurerm_resources.resources_by_resource_group_and_name is object with 1 attribute "example1" │ │ The given key does not identify an element in this collection value: the collection has no elements.

although I'm pretty sure my module is valid?

microsoft-github-policy-service[bot] commented 5 months ago

[!IMPORTANT] The "Needs: Triage :mag:" label must be removed once the triage process is complete!

[!NOTE] This label was added as per ITA06.

microsoft-github-policy-service[bot] commented 5 months ago

[!NOTE] The "Type: Bug :bug:" label was added as per ITA21.

microsoft-github-policy-service[bot] commented 3 months ago

[!WARNING] Tagging the AVM Core Team (@Azure/avm-core-team-technical-terraform) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

[!TIP]

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage :mag:" label must be removed as part of the triage process (when the issue is first responded to)!

[!NOTE] This message was posted as per ITA01TF.

microsoft-github-policy-service[bot] commented 2 months ago

[!WARNING] Tagging the AVM Core Team (@Azure/avm-core-team-technical-terraform) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

[!TIP]

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage :mag:" label must be removed as part of the triage process (when the issue is first responded to)!

[!NOTE] This message was posted as per ITA01TF.

microsoft-github-policy-service[bot] commented 2 months ago

[!CAUTION] This issue requires the AVM Core Team's (@Azure/avm-core-team-technical-terraform) immediate attention as it hasn't been responded to within 6 business days.

[!TIP]

  • To avoid this rule being (re)triggered, the "Needs: Triage :mag:" and "Status: Response Overdue :triangular_flag_on_post:" labels must be removed when the issue is first responded to!
  • Remove the "Needs: Immediate Attention :bangbang:" label once the issue has been responded to.

[!NOTE] This message was posted as per ITA02TF.

jchancellor-ms commented 2 months ago

@rick-pb - Thanks for this submission. @jaredfholgate or myself will try to reproduce this and see what is at issue.