terraform-azurerm-caf-enterprise-scale icon indicating copy to clipboard operation
terraform-azurerm-caf-enterprise-scale copied to clipboard

Allow UserAssigned Identities for Policy Assignments

Open SeSeicht opened this issue 1 year ago • 6 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Is your feature request related to a problem?

Currently only SystemAssigned Identies are supported for Policy Assignments

# Dynamic configuration blocks
  # The identity block only supports a single value
  # for type = "SystemAssigned" so the following logic
  # ensures the block is only created when this value
  # is specified in the source template
  dynamic "identity" {
    for_each = {
      for ik, iv in try(each.value.template.identity, local.empty_map) :
      ik => iv
      if lower(iv) == "systemassigned"
    }
    content {
      type = "SystemAssigned"
    }
  }

https://github.com/Azure/terraform-azurerm-caf-enterprise-scale/blob/main/resources.policy_assignments.tf#LL40C23-L40C23

Describe the solution you'd like

Enable to use UserAssigned Identities for Policy Assignement

Additional context

SeSeicht avatar May 12 '23 14:05 SeSeicht