{% set config = merged_configs.get('azurerm_user_assigned_identity', {}) %}
{% set comments = compliance_comments.get('azurerm_user_assigned_identity', []) %}
# ------------------------------------------------------------------------------
# Azure User Assigned Managed Identity
# ------------------------------------------------------------------------------
{% for comment in comments %}
# {{ comment }}
{% endfor %}

resource "azurerm_user_assigned_identity" "this" {
  name                = "{{ config.get('name', project_id ~ '-identity') }}"
  resource_group_name = var.resource_group_name
  location            = var.region

  tags = {
    Name      = "{{ config.get('name', project_id ~ '-identity') }}"
    ManagedBy = "complyform"
  }
}
