{% set config = merged_configs.get('azurerm_cdn_frontdoor_endpoint', {}) %}
{% set comments = compliance_comments.get('azurerm_cdn_frontdoor_endpoint', []) %}
# ------------------------------------------------------------------------------
# Azure Front Door Endpoint
# ------------------------------------------------------------------------------
{% for comment in comments %}
# {{ comment }}
{% endfor %}

resource "azurerm_cdn_frontdoor_endpoint" "this" {
  name                     = "{{ config.get('name', project_id ~ '-fd-ep') }}"
  cdn_frontdoor_profile_id = azurerm_cdn_frontdoor_profile.this.id
  enabled                  = {{ config.get('enabled', true) | lower }}

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