{% extends "aws/base_resource.tf.j2" %}
{% block resources %}
{% for resource in resources %}
{{ resource_spacer() }}
resource "aws_api_gateway_resource" "{{ resource.name_sanitized }}" {
  rest_api_id = "{{ resource.rest_api_id or resource.restApiId }}"
  {% if resource.parentId or resource.parent_id %}
  parent_id   = "{{ resource.parentId | default(resource.parent_id) }}"
  {% endif %}
  {% if resource.pathPart or resource.path_part %}
  path_part   = "{{ resource.pathPart | default(resource.path_part) }}"
  {% endif %}
}

{% endfor %}
{% endblock %}
