{% extends "aws/base_resource.tf.j2" %}
{% block resources %}
{% for ami in resources %}
{{ resource_spacer() }}
resource "aws_ami" "{{ ami.ImageId | strip_id_prefix | tf_resource_name }}" {
  name                = "{{ ami.Name }}"
  description         = "{{ ami.Description | default('') }}"
  architecture        = "{{ ami.Architecture }}"
  root_device_name    = "{{ ami.RootDeviceName }}"
  virtualization_type = "{{ ami.VirtualizationType }}"

  {{ render_common_tags(ami, indent=2) }}
}

{% endfor %}
{% endblock %}
