{% extends "common/base_resource.tf.j2" %}
{% block resources %}
{% for resource in resources %}
{{ resource_spacer() }}
resource "azurerm_cdn_profile" "{{ resource.name.replace('-', '_').replace('.', '_').lower() }}" {
  name                = "{{ resource.properties.name }}"
  location            = "{{ resource.properties.location }}"
  resource_group_name = "{{ resource.properties.resource_group_name }}"
  sku                 = "{{ resource.properties.sku }}"
  
  {% if resource.properties.tags is defined and resource.properties.tags %}
  tags = {{ resource.properties.tags | to_terraform_collection('map') }}
  {% endif %}
}

{% endfor %}
{% endblock %}
