Facing below issue during remidiation
Nikhleshk opened this issue · comments
╷
│ Error: Invalid for_each argument
│
│ on ..\modules\set_assignment\main.tf line 36, in resource "azurerm_management_group_policy_remediation" "rem":
│ 36: for_each = { for dr in local.definition_reference.mg : basename(dr.reference_id) => dr }
│ ├────────────────
│ │ local.definition_reference.mg will be known only after apply
│
│ The "for_each" value depends on resource attributes that cannot be determined until apply, so Terraform
│ cannot predict how many instances will be created. To work around this, use the -target argument to first
│ apply only the resources that the for_each depends on.
Please do not remove the Issue Template when creating a new issue
Raise a new issue and populate the template accordingly with examples of your code otherwise there is little I can do