# VPC: {{ resource.original_name }}
# Original ID: {{ resource.id }}
resource "aws_vpc" "{{ resource.terraform_name }}" {
  cidr_block           = "{{ resource.config.cidr_block }}"
  instance_tenancy     = "{{ resource.config.instance_tenancy | default('default') }}"
  enable_dns_support   = {{ resource.config.enable_dns_support | default(true) | lower }}
  enable_dns_hostnames = {{ resource.config.enable_dns_hostnames | default(false) | lower }}

  tags = {
    Name        = "{{ resource.tags.get('Name', resource.terraform_name) }}"
    Environment = var.environment
    ManagedBy   = "replimap"
    SourceId    = "{{ resource.id }}"
{% for key, value in resource.tags.items() if key != 'Name' %}
    {{ key | quote_key }} = {{ value | quote }}
{% endfor %}
  }
}
