{% extends "common/base_resource.tf.j2" %}

{% block resources %}
{% for resource in resources %}
{{ resource_spacer() }}
resource "azurerm_eventhub_consumer_group" "{{ resource.name }}" {
  name                = "{{ resource.properties.name }}"
  namespace_name      = "{{ resource.properties.namespace_name }}"
  eventhub_name       = "{{ resource.properties.eventhub_name }}"
  resource_group_name = "{{ resource.properties.resource_group_name }}"
  
  {% if resource.properties.user_metadata is defined %}
  user_metadata = "{{ resource.properties.user_metadata }}"
  {% endif %}
}

{% endfor %}
{% endblock %}
