Skip to content

Instantly share code, notes, and snippets.

@tedivm
Created April 13, 2022 20:22
Show Gist options
  • Save tedivm/42263ecd32888eae6485714dda747c81 to your computer and use it in GitHub Desktop.
Save tedivm/42263ecd32888eae6485714dda747c81 to your computer and use it in GitHub Desktop.
Terraform Plan Example
{
"format_version": "1.0",
"terraform_version": "1.1.7",
"planned_values": {
"root_module": {
"resources": [
{
"address": "random_integer.network",
"mode": "managed",
"type": "random_integer",
"name": "network",
"provider_name": "registry.terraform.io/hashicorp/random",
"schema_version": 0,
"values": { "keepers": null, "max": 250, "min": 220, "seed": null },
"sensitive_values": {}
}
],
"child_modules": [
{
"resources": [
{
"address": "module.vpc.aws_internet_gateway.main",
"mode": "managed",
"type": "aws_internet_gateway",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": { "tags": null },
"sensitive_values": { "tags_all": {} }
},
{
"address": "module.vpc.aws_internet_gateway_attachment.main",
"mode": "managed",
"type": "aws_internet_gateway_attachment",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"sensitive_values": {}
},
{
"address": "module.vpc.aws_vpc.main",
"mode": "managed",
"type": "aws_vpc",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 1,
"values": {
"assign_generated_ipv6_cidr_block": null,
"enable_dns_hostnames": true,
"enable_dns_support": true,
"instance_tenancy": "default",
"ipv4_ipam_pool_id": null,
"ipv4_netmask_length": null,
"ipv6_ipam_pool_id": null,
"ipv6_netmask_length": null,
"tags": null
},
"sensitive_values": { "tags_all": {} }
},
{
"address": "module.vpc.aws_vpc_dhcp_options.main",
"mode": "managed",
"type": "aws_vpc_dhcp_options",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"domain_name": null,
"domain_name_servers": ["AmazonProvidedDNS"],
"netbios_name_servers": null,
"netbios_node_type": null,
"ntp_servers": ["169.254.169.123"]
},
"sensitive_values": {
"domain_name_servers": [false],
"ntp_servers": [false],
"tags": {},
"tags_all": {}
}
},
{
"address": "module.vpc.aws_vpc_dhcp_options_association.main",
"mode": "managed",
"type": "aws_vpc_dhcp_options_association",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"sensitive_values": {}
}
],
"address": "module.vpc",
"child_modules": [
{
"resources": [
{
"address": "module.vpc.module.availability_zones[1].aws_route.public_internet",
"mode": "managed",
"type": "aws_route",
"name": "public_internet",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"carrier_gateway_id": null,
"destination_cidr_block": "0.0.0.0/0",
"destination_ipv6_cidr_block": null,
"destination_prefix_list_id": null,
"egress_only_gateway_id": null,
"local_gateway_id": null,
"nat_gateway_id": null,
"timeouts": null,
"transit_gateway_id": null,
"vpc_endpoint_id": null,
"vpc_peering_connection_id": null
},
"sensitive_values": {}
},
{
"address": "module.vpc.module.availability_zones[1].aws_route_table.private",
"mode": "managed",
"type": "aws_route_table",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"tags": { "Network": "Private" },
"tags_all": { "Network": "Private" },
"timeouts": null
},
"sensitive_values": {
"propagating_vgws": [],
"route": [],
"tags": {},
"tags_all": {}
}
},
{
"address": "module.vpc.module.availability_zones[1].aws_route_table.public",
"mode": "managed",
"type": "aws_route_table",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"tags": { "Network": "Public" },
"tags_all": { "Network": "Public" },
"timeouts": null
},
"sensitive_values": {
"propagating_vgws": [],
"route": [],
"tags": {},
"tags_all": {}
}
},
{
"address": "module.vpc.module.availability_zones[1].aws_route_table_association.private",
"mode": "managed",
"type": "aws_route_table_association",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": { "gateway_id": null },
"sensitive_values": {}
},
{
"address": "module.vpc.module.availability_zones[1].aws_route_table_association.public",
"mode": "managed",
"type": "aws_route_table_association",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": { "gateway_id": null },
"sensitive_values": {}
},
{
"address": "module.vpc.module.availability_zones[1].aws_subnet.private",
"mode": "managed",
"type": "aws_subnet",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 1,
"values": {
"assign_ipv6_address_on_creation": false,
"availability_zone": "us-west-2b",
"customer_owned_ipv4_pool": null,
"enable_dns64": false,
"enable_resource_name_dns_a_record_on_launch": false,
"enable_resource_name_dns_aaaa_record_on_launch": false,
"ipv6_cidr_block": null,
"ipv6_native": false,
"map_customer_owned_ip_on_launch": null,
"map_public_ip_on_launch": false,
"outpost_arn": null,
"tags": { "Network": "Private" },
"tags_all": { "Network": "Private" },
"timeouts": null
},
"sensitive_values": { "tags": {}, "tags_all": {} }
},
{
"address": "module.vpc.module.availability_zones[1].aws_subnet.public",
"mode": "managed",
"type": "aws_subnet",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 1,
"values": {
"assign_ipv6_address_on_creation": false,
"availability_zone": "us-west-2b",
"customer_owned_ipv4_pool": null,
"enable_dns64": false,
"enable_resource_name_dns_a_record_on_launch": false,
"enable_resource_name_dns_aaaa_record_on_launch": false,
"ipv6_cidr_block": null,
"ipv6_native": false,
"map_customer_owned_ip_on_launch": null,
"map_public_ip_on_launch": false,
"outpost_arn": null,
"tags": { "Network": "Public" },
"tags_all": { "Network": "Public" },
"timeouts": null
},
"sensitive_values": { "tags": {}, "tags_all": {} }
}
],
"address": "module.vpc.module.availability_zones[1]"
},
{
"resources": [
{
"address": "module.vpc.module.nat_instance[0].aws_iam_instance_profile.main",
"mode": "managed",
"type": "aws_iam_instance_profile",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": { "name_prefix": null, "path": "/", "tags": null },
"sensitive_values": { "tags_all": {} }
},
{
"address": "module.vpc.module.nat_instance[0].aws_iam_role.main",
"mode": "managed",
"type": "aws_iam_role",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n }\n }\n ]\n}",
"description": null,
"force_detach_policies": false,
"max_session_duration": 3600,
"path": "/",
"permissions_boundary": null,
"tags": null
},
"sensitive_values": {
"inline_policy": [],
"managed_policy_arns": [],
"tags_all": {}
}
},
{
"address": "module.vpc.module.nat_instance[0].aws_instance.main[0]",
"mode": "managed",
"type": "aws_instance",
"name": "main",
"index": 0,
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 1,
"values": {
"ami": "ami-0974095049096f83a",
"credit_specification": [],
"get_password_data": false,
"hibernation": null,
"instance_type": "t3.micro",
"launch_template": [],
"monitoring": true,
"source_dest_check": false,
"timeouts": null,
"user_data_replace_on_change": false,
"volume_tags": null
},
"sensitive_values": {
"capacity_reservation_specification": [],
"credit_specification": [],
"ebs_block_device": [],
"enclave_options": [],
"ephemeral_block_device": [],
"ipv6_addresses": [],
"launch_template": [],
"metadata_options": [],
"network_interface": [],
"root_block_device": [],
"secondary_private_ips": [],
"security_groups": [],
"tags": {},
"tags_all": {},
"vpc_security_group_ids": []
}
},
{
"address": "module.vpc.module.nat_instance[0].aws_route.route_to_nat[0]",
"mode": "managed",
"type": "aws_route",
"name": "route_to_nat",
"index": 0,
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"carrier_gateway_id": null,
"destination_cidr_block": "0.0.0.0/0",
"destination_ipv6_cidr_block": null,
"destination_prefix_list_id": null,
"egress_only_gateway_id": null,
"gateway_id": null,
"local_gateway_id": null,
"nat_gateway_id": null,
"timeouts": null,
"transit_gateway_id": null,
"vpc_endpoint_id": null,
"vpc_peering_connection_id": null
},
"sensitive_values": {}
},
{
"address": "module.vpc.module.nat_instance[0].aws_route.route_to_nat[1]",
"mode": "managed",
"type": "aws_route",
"name": "route_to_nat",
"index": 1,
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"carrier_gateway_id": null,
"destination_cidr_block": "0.0.0.0/0",
"destination_ipv6_cidr_block": null,
"destination_prefix_list_id": null,
"egress_only_gateway_id": null,
"gateway_id": null,
"local_gateway_id": null,
"nat_gateway_id": null,
"timeouts": null,
"transit_gateway_id": null,
"vpc_endpoint_id": null,
"vpc_peering_connection_id": null
},
"sensitive_values": {}
},
{
"address": "module.vpc.module.nat_instance[0].aws_route.route_to_nat[2]",
"mode": "managed",
"type": "aws_route",
"name": "route_to_nat",
"index": 2,
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"carrier_gateway_id": null,
"destination_cidr_block": "0.0.0.0/0",
"destination_ipv6_cidr_block": null,
"destination_prefix_list_id": null,
"egress_only_gateway_id": null,
"gateway_id": null,
"local_gateway_id": null,
"nat_gateway_id": null,
"timeouts": null,
"transit_gateway_id": null,
"vpc_endpoint_id": null,
"vpc_peering_connection_id": null
},
"sensitive_values": {}
},
{
"address": "module.vpc.module.nat_instance[0].aws_security_group.nat_traffic",
"mode": "managed",
"type": "aws_security_group",
"name": "nat_traffic",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 1,
"values": {
"description": "Allow internal VPC traffic and all outbound traffic",
"egress": [
{
"cidr_blocks": ["0.0.0.0/0"],
"description": "",
"from_port": 0,
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"protocol": "-1",
"security_groups": [],
"self": false,
"to_port": 0
}
],
"ingress": [
{
"description": "All traffic from inside VPC",
"from_port": 0,
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"protocol": "-1",
"security_groups": [],
"self": false,
"to_port": 0
}
],
"revoke_rules_on_delete": false,
"timeouts": null
},
"sensitive_values": {
"egress": [
{
"cidr_blocks": [false],
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"security_groups": []
}
],
"ingress": [
{
"cidr_blocks": [],
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"security_groups": []
}
],
"tags": {},
"tags_all": {}
}
}
],
"address": "module.vpc.module.nat_instance[0]"
},
{
"resources": [
{
"address": "module.vpc.module.availability_zones[2].aws_route.public_internet",
"mode": "managed",
"type": "aws_route",
"name": "public_internet",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"carrier_gateway_id": null,
"destination_cidr_block": "0.0.0.0/0",
"destination_ipv6_cidr_block": null,
"destination_prefix_list_id": null,
"egress_only_gateway_id": null,
"local_gateway_id": null,
"nat_gateway_id": null,
"timeouts": null,
"transit_gateway_id": null,
"vpc_endpoint_id": null,
"vpc_peering_connection_id": null
},
"sensitive_values": {}
},
{
"address": "module.vpc.module.availability_zones[2].aws_route_table.private",
"mode": "managed",
"type": "aws_route_table",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"tags": { "Network": "Private" },
"tags_all": { "Network": "Private" },
"timeouts": null
},
"sensitive_values": {
"propagating_vgws": [],
"route": [],
"tags": {},
"tags_all": {}
}
},
{
"address": "module.vpc.module.availability_zones[2].aws_route_table.public",
"mode": "managed",
"type": "aws_route_table",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"tags": { "Network": "Public" },
"tags_all": { "Network": "Public" },
"timeouts": null
},
"sensitive_values": {
"propagating_vgws": [],
"route": [],
"tags": {},
"tags_all": {}
}
},
{
"address": "module.vpc.module.availability_zones[2].aws_route_table_association.private",
"mode": "managed",
"type": "aws_route_table_association",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": { "gateway_id": null },
"sensitive_values": {}
},
{
"address": "module.vpc.module.availability_zones[2].aws_route_table_association.public",
"mode": "managed",
"type": "aws_route_table_association",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": { "gateway_id": null },
"sensitive_values": {}
},
{
"address": "module.vpc.module.availability_zones[2].aws_subnet.private",
"mode": "managed",
"type": "aws_subnet",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 1,
"values": {
"assign_ipv6_address_on_creation": false,
"availability_zone": "us-west-2c",
"customer_owned_ipv4_pool": null,
"enable_dns64": false,
"enable_resource_name_dns_a_record_on_launch": false,
"enable_resource_name_dns_aaaa_record_on_launch": false,
"ipv6_cidr_block": null,
"ipv6_native": false,
"map_customer_owned_ip_on_launch": null,
"map_public_ip_on_launch": false,
"outpost_arn": null,
"tags": { "Network": "Private" },
"tags_all": { "Network": "Private" },
"timeouts": null
},
"sensitive_values": { "tags": {}, "tags_all": {} }
},
{
"address": "module.vpc.module.availability_zones[2].aws_subnet.public",
"mode": "managed",
"type": "aws_subnet",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 1,
"values": {
"assign_ipv6_address_on_creation": false,
"availability_zone": "us-west-2c",
"customer_owned_ipv4_pool": null,
"enable_dns64": false,
"enable_resource_name_dns_a_record_on_launch": false,
"enable_resource_name_dns_aaaa_record_on_launch": false,
"ipv6_cidr_block": null,
"ipv6_native": false,
"map_customer_owned_ip_on_launch": null,
"map_public_ip_on_launch": false,
"outpost_arn": null,
"tags": { "Network": "Public" },
"tags_all": { "Network": "Public" },
"timeouts": null
},
"sensitive_values": { "tags": {}, "tags_all": {} }
}
],
"address": "module.vpc.module.availability_zones[2]"
},
{
"resources": [
{
"address": "module.vpc.module.availability_zones[0].aws_route.public_internet",
"mode": "managed",
"type": "aws_route",
"name": "public_internet",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"carrier_gateway_id": null,
"destination_cidr_block": "0.0.0.0/0",
"destination_ipv6_cidr_block": null,
"destination_prefix_list_id": null,
"egress_only_gateway_id": null,
"local_gateway_id": null,
"nat_gateway_id": null,
"timeouts": null,
"transit_gateway_id": null,
"vpc_endpoint_id": null,
"vpc_peering_connection_id": null
},
"sensitive_values": {}
},
{
"address": "module.vpc.module.availability_zones[0].aws_route_table.private",
"mode": "managed",
"type": "aws_route_table",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"tags": { "Network": "Private" },
"tags_all": { "Network": "Private" },
"timeouts": null
},
"sensitive_values": {
"propagating_vgws": [],
"route": [],
"tags": {},
"tags_all": {}
}
},
{
"address": "module.vpc.module.availability_zones[0].aws_route_table.public",
"mode": "managed",
"type": "aws_route_table",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"tags": { "Network": "Public" },
"tags_all": { "Network": "Public" },
"timeouts": null
},
"sensitive_values": {
"propagating_vgws": [],
"route": [],
"tags": {},
"tags_all": {}
}
},
{
"address": "module.vpc.module.availability_zones[0].aws_route_table_association.private",
"mode": "managed",
"type": "aws_route_table_association",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": { "gateway_id": null },
"sensitive_values": {}
},
{
"address": "module.vpc.module.availability_zones[0].aws_route_table_association.public",
"mode": "managed",
"type": "aws_route_table_association",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": { "gateway_id": null },
"sensitive_values": {}
},
{
"address": "module.vpc.module.availability_zones[0].aws_subnet.private",
"mode": "managed",
"type": "aws_subnet",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 1,
"values": {
"assign_ipv6_address_on_creation": false,
"availability_zone": "us-west-2a",
"customer_owned_ipv4_pool": null,
"enable_dns64": false,
"enable_resource_name_dns_a_record_on_launch": false,
"enable_resource_name_dns_aaaa_record_on_launch": false,
"ipv6_cidr_block": null,
"ipv6_native": false,
"map_customer_owned_ip_on_launch": null,
"map_public_ip_on_launch": false,
"outpost_arn": null,
"tags": { "Network": "Private" },
"tags_all": { "Network": "Private" },
"timeouts": null
},
"sensitive_values": { "tags": {}, "tags_all": {} }
},
{
"address": "module.vpc.module.availability_zones[0].aws_subnet.public",
"mode": "managed",
"type": "aws_subnet",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 1,
"values": {
"assign_ipv6_address_on_creation": false,
"availability_zone": "us-west-2a",
"customer_owned_ipv4_pool": null,
"enable_dns64": false,
"enable_resource_name_dns_a_record_on_launch": false,
"enable_resource_name_dns_aaaa_record_on_launch": false,
"ipv6_cidr_block": null,
"ipv6_native": false,
"map_customer_owned_ip_on_launch": null,
"map_public_ip_on_launch": false,
"outpost_arn": null,
"tags": { "Network": "Public" },
"tags_all": { "Network": "Public" },
"timeouts": null
},
"sensitive_values": { "tags": {}, "tags_all": {} }
}
],
"address": "module.vpc.module.availability_zones[0]"
}
]
}
]
}
},
"resource_changes": [
{
"address": "module.vpc.aws_internet_gateway.main",
"module_address": "module.vpc",
"mode": "managed",
"type": "aws_internet_gateway",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": { "tags": null },
"after_unknown": {
"arn": true,
"id": true,
"owner_id": true,
"tags_all": true,
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": { "tags_all": {} }
}
},
{
"address": "module.vpc.aws_internet_gateway_attachment.main",
"module_address": "module.vpc",
"mode": "managed",
"type": "aws_internet_gateway_attachment",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {},
"after_unknown": {
"id": true,
"internet_gateway_id": true,
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.aws_vpc.main",
"module_address": "module.vpc",
"mode": "managed",
"type": "aws_vpc",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"assign_generated_ipv6_cidr_block": null,
"enable_dns_hostnames": true,
"enable_dns_support": true,
"instance_tenancy": "default",
"ipv4_ipam_pool_id": null,
"ipv4_netmask_length": null,
"ipv6_ipam_pool_id": null,
"ipv6_netmask_length": null,
"tags": null
},
"after_unknown": {
"arn": true,
"cidr_block": true,
"default_network_acl_id": true,
"default_route_table_id": true,
"default_security_group_id": true,
"dhcp_options_id": true,
"enable_classiclink": true,
"enable_classiclink_dns_support": true,
"id": true,
"ipv6_association_id": true,
"ipv6_cidr_block": true,
"ipv6_cidr_block_network_border_group": true,
"main_route_table_id": true,
"owner_id": true,
"tags_all": true
},
"before_sensitive": false,
"after_sensitive": { "tags_all": {} }
}
},
{
"address": "module.vpc.aws_vpc_dhcp_options.main",
"module_address": "module.vpc",
"mode": "managed",
"type": "aws_vpc_dhcp_options",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"domain_name": null,
"domain_name_servers": ["AmazonProvidedDNS"],
"netbios_name_servers": null,
"netbios_node_type": null,
"ntp_servers": ["169.254.169.123"]
},
"after_unknown": {
"arn": true,
"domain_name_servers": [false],
"id": true,
"ntp_servers": [false],
"owner_id": true,
"tags": true,
"tags_all": true
},
"before_sensitive": false,
"after_sensitive": {
"domain_name_servers": [false],
"ntp_servers": [false],
"tags": {},
"tags_all": {}
}
}
},
{
"address": "module.vpc.aws_vpc_dhcp_options_association.main",
"module_address": "module.vpc",
"mode": "managed",
"type": "aws_vpc_dhcp_options_association",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {},
"after_unknown": {
"dhcp_options_id": true,
"id": true,
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.module.availability_zones[0].aws_route.public_internet",
"module_address": "module.vpc.module.availability_zones[0]",
"mode": "managed",
"type": "aws_route",
"name": "public_internet",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"carrier_gateway_id": null,
"destination_cidr_block": "0.0.0.0/0",
"destination_ipv6_cidr_block": null,
"destination_prefix_list_id": null,
"egress_only_gateway_id": null,
"local_gateway_id": null,
"nat_gateway_id": null,
"timeouts": null,
"transit_gateway_id": null,
"vpc_endpoint_id": null,
"vpc_peering_connection_id": null
},
"after_unknown": {
"gateway_id": true,
"id": true,
"instance_id": true,
"instance_owner_id": true,
"network_interface_id": true,
"origin": true,
"route_table_id": true,
"state": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.module.availability_zones[0].aws_route_table.private",
"module_address": "module.vpc.module.availability_zones[0]",
"mode": "managed",
"type": "aws_route_table",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"tags": { "Network": "Private" },
"tags_all": { "Network": "Private" },
"timeouts": null
},
"after_unknown": {
"arn": true,
"id": true,
"owner_id": true,
"propagating_vgws": true,
"route": true,
"tags": {},
"tags_all": {},
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": {
"propagating_vgws": [],
"route": [],
"tags": {},
"tags_all": {}
}
}
},
{
"address": "module.vpc.module.availability_zones[0].aws_route_table.public",
"module_address": "module.vpc.module.availability_zones[0]",
"mode": "managed",
"type": "aws_route_table",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"tags": { "Network": "Public" },
"tags_all": { "Network": "Public" },
"timeouts": null
},
"after_unknown": {
"arn": true,
"id": true,
"owner_id": true,
"propagating_vgws": true,
"route": true,
"tags": {},
"tags_all": {},
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": {
"propagating_vgws": [],
"route": [],
"tags": {},
"tags_all": {}
}
}
},
{
"address": "module.vpc.module.availability_zones[0].aws_route_table_association.private",
"module_address": "module.vpc.module.availability_zones[0]",
"mode": "managed",
"type": "aws_route_table_association",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": { "gateway_id": null },
"after_unknown": {
"id": true,
"route_table_id": true,
"subnet_id": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.module.availability_zones[0].aws_route_table_association.public",
"module_address": "module.vpc.module.availability_zones[0]",
"mode": "managed",
"type": "aws_route_table_association",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": { "gateway_id": null },
"after_unknown": {
"id": true,
"route_table_id": true,
"subnet_id": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.module.availability_zones[0].aws_subnet.private",
"module_address": "module.vpc.module.availability_zones[0]",
"mode": "managed",
"type": "aws_subnet",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"assign_ipv6_address_on_creation": false,
"availability_zone": "us-west-2a",
"customer_owned_ipv4_pool": null,
"enable_dns64": false,
"enable_resource_name_dns_a_record_on_launch": false,
"enable_resource_name_dns_aaaa_record_on_launch": false,
"ipv6_cidr_block": null,
"ipv6_native": false,
"map_customer_owned_ip_on_launch": null,
"map_public_ip_on_launch": false,
"outpost_arn": null,
"tags": { "Network": "Private" },
"tags_all": { "Network": "Private" },
"timeouts": null
},
"after_unknown": {
"arn": true,
"availability_zone_id": true,
"cidr_block": true,
"id": true,
"ipv6_cidr_block_association_id": true,
"owner_id": true,
"private_dns_hostname_type_on_launch": true,
"tags": {},
"tags_all": {},
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": { "tags": {}, "tags_all": {} }
}
},
{
"address": "module.vpc.module.availability_zones[0].aws_subnet.public",
"module_address": "module.vpc.module.availability_zones[0]",
"mode": "managed",
"type": "aws_subnet",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"assign_ipv6_address_on_creation": false,
"availability_zone": "us-west-2a",
"customer_owned_ipv4_pool": null,
"enable_dns64": false,
"enable_resource_name_dns_a_record_on_launch": false,
"enable_resource_name_dns_aaaa_record_on_launch": false,
"ipv6_cidr_block": null,
"ipv6_native": false,
"map_customer_owned_ip_on_launch": null,
"map_public_ip_on_launch": false,
"outpost_arn": null,
"tags": { "Network": "Public" },
"tags_all": { "Network": "Public" },
"timeouts": null
},
"after_unknown": {
"arn": true,
"availability_zone_id": true,
"cidr_block": true,
"id": true,
"ipv6_cidr_block_association_id": true,
"owner_id": true,
"private_dns_hostname_type_on_launch": true,
"tags": {},
"tags_all": {},
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": { "tags": {}, "tags_all": {} }
}
},
{
"address": "module.vpc.module.availability_zones[1].aws_route.public_internet",
"module_address": "module.vpc.module.availability_zones[1]",
"mode": "managed",
"type": "aws_route",
"name": "public_internet",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"carrier_gateway_id": null,
"destination_cidr_block": "0.0.0.0/0",
"destination_ipv6_cidr_block": null,
"destination_prefix_list_id": null,
"egress_only_gateway_id": null,
"local_gateway_id": null,
"nat_gateway_id": null,
"timeouts": null,
"transit_gateway_id": null,
"vpc_endpoint_id": null,
"vpc_peering_connection_id": null
},
"after_unknown": {
"gateway_id": true,
"id": true,
"instance_id": true,
"instance_owner_id": true,
"network_interface_id": true,
"origin": true,
"route_table_id": true,
"state": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.module.availability_zones[1].aws_route_table.private",
"module_address": "module.vpc.module.availability_zones[1]",
"mode": "managed",
"type": "aws_route_table",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"tags": { "Network": "Private" },
"tags_all": { "Network": "Private" },
"timeouts": null
},
"after_unknown": {
"arn": true,
"id": true,
"owner_id": true,
"propagating_vgws": true,
"route": true,
"tags": {},
"tags_all": {},
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": {
"propagating_vgws": [],
"route": [],
"tags": {},
"tags_all": {}
}
}
},
{
"address": "module.vpc.module.availability_zones[1].aws_route_table.public",
"module_address": "module.vpc.module.availability_zones[1]",
"mode": "managed",
"type": "aws_route_table",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"tags": { "Network": "Public" },
"tags_all": { "Network": "Public" },
"timeouts": null
},
"after_unknown": {
"arn": true,
"id": true,
"owner_id": true,
"propagating_vgws": true,
"route": true,
"tags": {},
"tags_all": {},
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": {
"propagating_vgws": [],
"route": [],
"tags": {},
"tags_all": {}
}
}
},
{
"address": "module.vpc.module.availability_zones[1].aws_route_table_association.private",
"module_address": "module.vpc.module.availability_zones[1]",
"mode": "managed",
"type": "aws_route_table_association",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": { "gateway_id": null },
"after_unknown": {
"id": true,
"route_table_id": true,
"subnet_id": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.module.availability_zones[1].aws_route_table_association.public",
"module_address": "module.vpc.module.availability_zones[1]",
"mode": "managed",
"type": "aws_route_table_association",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": { "gateway_id": null },
"after_unknown": {
"id": true,
"route_table_id": true,
"subnet_id": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.module.availability_zones[1].aws_subnet.private",
"module_address": "module.vpc.module.availability_zones[1]",
"mode": "managed",
"type": "aws_subnet",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"assign_ipv6_address_on_creation": false,
"availability_zone": "us-west-2b",
"customer_owned_ipv4_pool": null,
"enable_dns64": false,
"enable_resource_name_dns_a_record_on_launch": false,
"enable_resource_name_dns_aaaa_record_on_launch": false,
"ipv6_cidr_block": null,
"ipv6_native": false,
"map_customer_owned_ip_on_launch": null,
"map_public_ip_on_launch": false,
"outpost_arn": null,
"tags": { "Network": "Private" },
"tags_all": { "Network": "Private" },
"timeouts": null
},
"after_unknown": {
"arn": true,
"availability_zone_id": true,
"cidr_block": true,
"id": true,
"ipv6_cidr_block_association_id": true,
"owner_id": true,
"private_dns_hostname_type_on_launch": true,
"tags": {},
"tags_all": {},
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": { "tags": {}, "tags_all": {} }
}
},
{
"address": "module.vpc.module.availability_zones[1].aws_subnet.public",
"module_address": "module.vpc.module.availability_zones[1]",
"mode": "managed",
"type": "aws_subnet",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"assign_ipv6_address_on_creation": false,
"availability_zone": "us-west-2b",
"customer_owned_ipv4_pool": null,
"enable_dns64": false,
"enable_resource_name_dns_a_record_on_launch": false,
"enable_resource_name_dns_aaaa_record_on_launch": false,
"ipv6_cidr_block": null,
"ipv6_native": false,
"map_customer_owned_ip_on_launch": null,
"map_public_ip_on_launch": false,
"outpost_arn": null,
"tags": { "Network": "Public" },
"tags_all": { "Network": "Public" },
"timeouts": null
},
"after_unknown": {
"arn": true,
"availability_zone_id": true,
"cidr_block": true,
"id": true,
"ipv6_cidr_block_association_id": true,
"owner_id": true,
"private_dns_hostname_type_on_launch": true,
"tags": {},
"tags_all": {},
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": { "tags": {}, "tags_all": {} }
}
},
{
"address": "module.vpc.module.availability_zones[2].aws_route.public_internet",
"module_address": "module.vpc.module.availability_zones[2]",
"mode": "managed",
"type": "aws_route",
"name": "public_internet",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"carrier_gateway_id": null,
"destination_cidr_block": "0.0.0.0/0",
"destination_ipv6_cidr_block": null,
"destination_prefix_list_id": null,
"egress_only_gateway_id": null,
"local_gateway_id": null,
"nat_gateway_id": null,
"timeouts": null,
"transit_gateway_id": null,
"vpc_endpoint_id": null,
"vpc_peering_connection_id": null
},
"after_unknown": {
"gateway_id": true,
"id": true,
"instance_id": true,
"instance_owner_id": true,
"network_interface_id": true,
"origin": true,
"route_table_id": true,
"state": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.module.availability_zones[2].aws_route_table.private",
"module_address": "module.vpc.module.availability_zones[2]",
"mode": "managed",
"type": "aws_route_table",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"tags": { "Network": "Private" },
"tags_all": { "Network": "Private" },
"timeouts": null
},
"after_unknown": {
"arn": true,
"id": true,
"owner_id": true,
"propagating_vgws": true,
"route": true,
"tags": {},
"tags_all": {},
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": {
"propagating_vgws": [],
"route": [],
"tags": {},
"tags_all": {}
}
}
},
{
"address": "module.vpc.module.availability_zones[2].aws_route_table.public",
"module_address": "module.vpc.module.availability_zones[2]",
"mode": "managed",
"type": "aws_route_table",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"tags": { "Network": "Public" },
"tags_all": { "Network": "Public" },
"timeouts": null
},
"after_unknown": {
"arn": true,
"id": true,
"owner_id": true,
"propagating_vgws": true,
"route": true,
"tags": {},
"tags_all": {},
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": {
"propagating_vgws": [],
"route": [],
"tags": {},
"tags_all": {}
}
}
},
{
"address": "module.vpc.module.availability_zones[2].aws_route_table_association.private",
"module_address": "module.vpc.module.availability_zones[2]",
"mode": "managed",
"type": "aws_route_table_association",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": { "gateway_id": null },
"after_unknown": {
"id": true,
"route_table_id": true,
"subnet_id": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.module.availability_zones[2].aws_route_table_association.public",
"module_address": "module.vpc.module.availability_zones[2]",
"mode": "managed",
"type": "aws_route_table_association",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": { "gateway_id": null },
"after_unknown": {
"id": true,
"route_table_id": true,
"subnet_id": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.module.availability_zones[2].aws_subnet.private",
"module_address": "module.vpc.module.availability_zones[2]",
"mode": "managed",
"type": "aws_subnet",
"name": "private",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"assign_ipv6_address_on_creation": false,
"availability_zone": "us-west-2c",
"customer_owned_ipv4_pool": null,
"enable_dns64": false,
"enable_resource_name_dns_a_record_on_launch": false,
"enable_resource_name_dns_aaaa_record_on_launch": false,
"ipv6_cidr_block": null,
"ipv6_native": false,
"map_customer_owned_ip_on_launch": null,
"map_public_ip_on_launch": false,
"outpost_arn": null,
"tags": { "Network": "Private" },
"tags_all": { "Network": "Private" },
"timeouts": null
},
"after_unknown": {
"arn": true,
"availability_zone_id": true,
"cidr_block": true,
"id": true,
"ipv6_cidr_block_association_id": true,
"owner_id": true,
"private_dns_hostname_type_on_launch": true,
"tags": {},
"tags_all": {},
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": { "tags": {}, "tags_all": {} }
}
},
{
"address": "module.vpc.module.availability_zones[2].aws_subnet.public",
"module_address": "module.vpc.module.availability_zones[2]",
"mode": "managed",
"type": "aws_subnet",
"name": "public",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"assign_ipv6_address_on_creation": false,
"availability_zone": "us-west-2c",
"customer_owned_ipv4_pool": null,
"enable_dns64": false,
"enable_resource_name_dns_a_record_on_launch": false,
"enable_resource_name_dns_aaaa_record_on_launch": false,
"ipv6_cidr_block": null,
"ipv6_native": false,
"map_customer_owned_ip_on_launch": null,
"map_public_ip_on_launch": false,
"outpost_arn": null,
"tags": { "Network": "Public" },
"tags_all": { "Network": "Public" },
"timeouts": null
},
"after_unknown": {
"arn": true,
"availability_zone_id": true,
"cidr_block": true,
"id": true,
"ipv6_cidr_block_association_id": true,
"owner_id": true,
"private_dns_hostname_type_on_launch": true,
"tags": {},
"tags_all": {},
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": { "tags": {}, "tags_all": {} }
}
},
{
"address": "module.vpc.module.nat_instance[0].aws_iam_instance_profile.main",
"module_address": "module.vpc.module.nat_instance[0]",
"mode": "managed",
"type": "aws_iam_instance_profile",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": { "name_prefix": null, "path": "/", "tags": null },
"after_unknown": {
"arn": true,
"create_date": true,
"id": true,
"name": true,
"role": true,
"tags_all": true,
"unique_id": true
},
"before_sensitive": false,
"after_sensitive": { "tags_all": {} }
}
},
{
"address": "module.vpc.module.nat_instance[0].aws_iam_role.main",
"module_address": "module.vpc.module.nat_instance[0]",
"mode": "managed",
"type": "aws_iam_role",
"name": "main",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n }\n }\n ]\n}",
"description": null,
"force_detach_policies": false,
"max_session_duration": 3600,
"path": "/",
"permissions_boundary": null,
"tags": null
},
"after_unknown": {
"arn": true,
"create_date": true,
"id": true,
"inline_policy": true,
"managed_policy_arns": true,
"name": true,
"name_prefix": true,
"tags_all": true,
"unique_id": true
},
"before_sensitive": false,
"after_sensitive": {
"inline_policy": [],
"managed_policy_arns": [],
"tags_all": {}
}
}
},
{
"address": "module.vpc.module.nat_instance[0].aws_instance.main[0]",
"module_address": "module.vpc.module.nat_instance[0]",
"mode": "managed",
"type": "aws_instance",
"name": "main",
"index": 0,
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"ami": "ami-0974095049096f83a",
"credit_specification": [],
"get_password_data": false,
"hibernation": null,
"instance_type": "t3.micro",
"launch_template": [],
"monitoring": true,
"source_dest_check": false,
"timeouts": null,
"user_data_replace_on_change": false,
"volume_tags": null
},
"after_unknown": {
"arn": true,
"associate_public_ip_address": true,
"availability_zone": true,
"capacity_reservation_specification": true,
"cpu_core_count": true,
"cpu_threads_per_core": true,
"credit_specification": [],
"disable_api_termination": true,
"ebs_block_device": true,
"ebs_optimized": true,
"enclave_options": true,
"ephemeral_block_device": true,
"host_id": true,
"iam_instance_profile": true,
"id": true,
"instance_initiated_shutdown_behavior": true,
"instance_state": true,
"ipv6_address_count": true,
"ipv6_addresses": true,
"key_name": true,
"launch_template": [],
"metadata_options": true,
"network_interface": true,
"outpost_arn": true,
"password_data": true,
"placement_group": true,
"placement_partition_number": true,
"primary_network_interface_id": true,
"private_dns": true,
"private_ip": true,
"public_dns": true,
"public_ip": true,
"root_block_device": true,
"secondary_private_ips": true,
"security_groups": true,
"subnet_id": true,
"tags": true,
"tags_all": true,
"tenancy": true,
"user_data": true,
"user_data_base64": true,
"vpc_security_group_ids": true
},
"before_sensitive": false,
"after_sensitive": {
"capacity_reservation_specification": [],
"credit_specification": [],
"ebs_block_device": [],
"enclave_options": [],
"ephemeral_block_device": [],
"ipv6_addresses": [],
"launch_template": [],
"metadata_options": [],
"network_interface": [],
"root_block_device": [],
"secondary_private_ips": [],
"security_groups": [],
"tags": {},
"tags_all": {},
"vpc_security_group_ids": []
}
}
},
{
"address": "module.vpc.module.nat_instance[0].aws_route.route_to_nat[0]",
"module_address": "module.vpc.module.nat_instance[0]",
"mode": "managed",
"type": "aws_route",
"name": "route_to_nat",
"index": 0,
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"carrier_gateway_id": null,
"destination_cidr_block": "0.0.0.0/0",
"destination_ipv6_cidr_block": null,
"destination_prefix_list_id": null,
"egress_only_gateway_id": null,
"gateway_id": null,
"local_gateway_id": null,
"nat_gateway_id": null,
"timeouts": null,
"transit_gateway_id": null,
"vpc_endpoint_id": null,
"vpc_peering_connection_id": null
},
"after_unknown": {
"id": true,
"instance_id": true,
"instance_owner_id": true,
"network_interface_id": true,
"origin": true,
"route_table_id": true,
"state": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.module.nat_instance[0].aws_route.route_to_nat[1]",
"module_address": "module.vpc.module.nat_instance[0]",
"mode": "managed",
"type": "aws_route",
"name": "route_to_nat",
"index": 1,
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"carrier_gateway_id": null,
"destination_cidr_block": "0.0.0.0/0",
"destination_ipv6_cidr_block": null,
"destination_prefix_list_id": null,
"egress_only_gateway_id": null,
"gateway_id": null,
"local_gateway_id": null,
"nat_gateway_id": null,
"timeouts": null,
"transit_gateway_id": null,
"vpc_endpoint_id": null,
"vpc_peering_connection_id": null
},
"after_unknown": {
"id": true,
"instance_id": true,
"instance_owner_id": true,
"network_interface_id": true,
"origin": true,
"route_table_id": true,
"state": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.module.nat_instance[0].aws_route.route_to_nat[2]",
"module_address": "module.vpc.module.nat_instance[0]",
"mode": "managed",
"type": "aws_route",
"name": "route_to_nat",
"index": 2,
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"carrier_gateway_id": null,
"destination_cidr_block": "0.0.0.0/0",
"destination_ipv6_cidr_block": null,
"destination_prefix_list_id": null,
"egress_only_gateway_id": null,
"gateway_id": null,
"local_gateway_id": null,
"nat_gateway_id": null,
"timeouts": null,
"transit_gateway_id": null,
"vpc_endpoint_id": null,
"vpc_peering_connection_id": null
},
"after_unknown": {
"id": true,
"instance_id": true,
"instance_owner_id": true,
"network_interface_id": true,
"origin": true,
"route_table_id": true,
"state": true
},
"before_sensitive": false,
"after_sensitive": {}
}
},
{
"address": "module.vpc.module.nat_instance[0].aws_security_group.nat_traffic",
"module_address": "module.vpc.module.nat_instance[0]",
"mode": "managed",
"type": "aws_security_group",
"name": "nat_traffic",
"provider_name": "registry.terraform.io/hashicorp/aws",
"change": {
"actions": ["create"],
"before": null,
"after": {
"description": "Allow internal VPC traffic and all outbound traffic",
"egress": [
{
"cidr_blocks": ["0.0.0.0/0"],
"description": "",
"from_port": 0,
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"protocol": "-1",
"security_groups": [],
"self": false,
"to_port": 0
}
],
"ingress": [
{
"description": "All traffic from inside VPC",
"from_port": 0,
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"protocol": "-1",
"security_groups": [],
"self": false,
"to_port": 0
}
],
"revoke_rules_on_delete": false,
"timeouts": null
},
"after_unknown": {
"arn": true,
"egress": [
{
"cidr_blocks": [false],
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"security_groups": []
}
],
"id": true,
"ingress": [
{
"cidr_blocks": true,
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"security_groups": []
}
],
"name": true,
"name_prefix": true,
"owner_id": true,
"tags": true,
"tags_all": true,
"vpc_id": true
},
"before_sensitive": false,
"after_sensitive": {
"egress": [
{
"cidr_blocks": [false],
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"security_groups": []
}
],
"ingress": [
{
"cidr_blocks": [],
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"security_groups": []
}
],
"tags": {},
"tags_all": {}
}
}
},
{
"address": "random_integer.network",
"mode": "managed",
"type": "random_integer",
"name": "network",
"provider_name": "registry.terraform.io/hashicorp/random",
"change": {
"actions": ["create"],
"before": null,
"after": { "keepers": null, "max": 250, "min": 220, "seed": null },
"after_unknown": { "id": true, "result": true },
"before_sensitive": false,
"after_sensitive": {}
}
}
],
"prior_state": {
"format_version": "1.0",
"terraform_version": "1.1.7",
"values": {
"root_module": {
"child_modules": [
{
"resources": [
{
"address": "module.vpc.data.aws_availability_zones.available",
"mode": "data",
"type": "aws_availability_zones",
"name": "available",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"all_availability_zones": null,
"exclude_names": null,
"exclude_zone_ids": null,
"filter": null,
"group_names": ["us-west-2"],
"id": "us-west-2",
"names": [
"us-west-2a",
"us-west-2b",
"us-west-2c",
"us-west-2d"
],
"state": "available",
"zone_ids": ["usw2-az2", "usw2-az1", "usw2-az3", "usw2-az4"]
},
"sensitive_values": {
"group_names": [false],
"names": [false, false, false, false],
"zone_ids": [false, false, false, false]
}
}
],
"address": "module.vpc",
"child_modules": [
{
"resources": [
{
"address": "module.vpc.module.nat_instance[0].data.aws_ami.ubuntu",
"mode": "data",
"type": "aws_ami",
"name": "ubuntu",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"architecture": "x86_64",
"arn": "arn:aws:ec2:us-west-2::image/ami-0974095049096f83a",
"block_device_mappings": [
{
"device_name": "/dev/sda1",
"ebs": {
"delete_on_termination": "true",
"encrypted": "false",
"iops": "0",
"snapshot_id": "snap-02466363c8cdc470f",
"throughput": "0",
"volume_size": "8",
"volume_type": "gp2"
},
"no_device": "",
"virtual_name": ""
},
{
"device_name": "/dev/sdb",
"ebs": {},
"no_device": "",
"virtual_name": "ephemeral0"
},
{
"device_name": "/dev/sdc",
"ebs": {},
"no_device": "",
"virtual_name": "ephemeral1"
}
],
"boot_mode": "",
"creation_date": "2022-04-05T00:51:34.000Z",
"description": "Canonical, Ubuntu, 20.04 LTS, amd64 focal image build on 2022-04-04",
"ena_support": true,
"executable_users": null,
"filter": [
{
"name": "name",
"values": [
"ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"
]
},
{ "name": "virtualization-type", "values": ["hvm"] }
],
"hypervisor": "xen",
"id": "ami-0974095049096f83a",
"image_id": "ami-0974095049096f83a",
"image_location": "099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20220404",
"image_owner_alias": null,
"image_type": "machine",
"kernel_id": null,
"most_recent": true,
"name": "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20220404",
"name_regex": null,
"owner_id": "099720109477",
"owners": ["099720109477"],
"platform": null,
"platform_details": "Linux/UNIX",
"product_codes": [],
"public": true,
"ramdisk_id": null,
"root_device_name": "/dev/sda1",
"root_device_type": "ebs",
"root_snapshot_id": "snap-02466363c8cdc470f",
"sriov_net_support": "simple",
"state": "available",
"state_reason": { "code": "UNSET", "message": "UNSET" },
"tags": {},
"usage_operation": "RunInstances",
"virtualization_type": "hvm"
},
"sensitive_values": {
"block_device_mappings": [
{ "ebs": {} },
{ "ebs": {} },
{ "ebs": {} }
],
"filter": [{ "values": [false] }, { "values": [false] }],
"owners": [false],
"product_codes": [],
"state_reason": {},
"tags": {}
}
},
{
"address": "module.vpc.module.nat_instance[0].data.aws_iam_policy_document.assume_role",
"mode": "data",
"type": "aws_iam_policy_document",
"name": "assume_role",
"provider_name": "registry.terraform.io/hashicorp/aws",
"schema_version": 0,
"values": {
"id": "1903849331",
"json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n }\n }\n ]\n}",
"override_json": null,
"override_policy_documents": null,
"policy_id": null,
"source_json": null,
"source_policy_documents": null,
"statement": [
{
"actions": ["sts:AssumeRole"],
"condition": [],
"effect": "Allow",
"not_actions": [],
"not_principals": [],
"not_resources": [],
"principals": [
{
"identifiers": ["ec2.amazonaws.com"],
"type": "Service"
}
],
"resources": [],
"sid": ""
}
],
"version": "2012-10-17"
},
"sensitive_values": {
"statement": [
{
"actions": [false],
"condition": [],
"not_actions": [],
"not_principals": [],
"not_resources": [],
"principals": [{ "identifiers": [false] }],
"resources": []
}
]
}
}
],
"address": "module.vpc.module.nat_instance[0]"
}
]
}
]
}
}
},
"configuration": {
"provider_config": {
"aws": {
"name": "aws",
"version_constraint": "~\u003e 4.0",
"expressions": { "region": { "constant_value": "us-west-2" } }
}
},
"root_module": {
"resources": [
{
"address": "random_integer.network",
"mode": "managed",
"type": "random_integer",
"name": "network",
"provider_config_key": "random",
"expressions": {
"max": { "constant_value": 250 },
"min": { "constant_value": 220 }
},
"schema_version": 0
}
],
"module_calls": {
"vpc": {
"source": "../",
"expressions": {
"cidr_block": {
"references": [
"random_integer.network.id",
"random_integer.network"
]
},
"max_availability_zones": { "constant_value": 3 },
"name": {
"references": [
"random_integer.network.id",
"random_integer.network"
]
}
},
"module": {
"outputs": {
"aws_vpc": { "expression": { "references": ["aws_vpc.main"] } },
"routes": {
"expression": {
"references": [
"module.availability_zones",
"module.availability_zones",
"module.availability_zones",
"module.availability_zones"
]
}
},
"subnets": {
"expression": {
"references": [
"module.availability_zones",
"module.availability_zones",
"module.availability_zones",
"module.availability_zones"
]
}
}
},
"resources": [
{
"address": "aws_internet_gateway.main",
"mode": "managed",
"type": "aws_internet_gateway",
"name": "main",
"provider_config_key": "vpc:aws",
"schema_version": 0
},
{
"address": "aws_internet_gateway_attachment.main",
"mode": "managed",
"type": "aws_internet_gateway_attachment",
"name": "main",
"provider_config_key": "vpc:aws",
"expressions": {
"internet_gateway_id": {
"references": [
"aws_internet_gateway.main.id",
"aws_internet_gateway.main"
]
},
"vpc_id": {
"references": ["aws_vpc.main.id", "aws_vpc.main"]
}
},
"schema_version": 0
},
{
"address": "aws_vpc.main",
"mode": "managed",
"type": "aws_vpc",
"name": "main",
"provider_config_key": "vpc:aws",
"expressions": {
"cidr_block": { "references": ["var.cidr_block"] },
"enable_dns_hostnames": { "constant_value": true },
"enable_dns_support": { "constant_value": true }
},
"schema_version": 1
},
{
"address": "aws_vpc_dhcp_options.main",
"mode": "managed",
"type": "aws_vpc_dhcp_options",
"name": "main",
"provider_config_key": "vpc:aws",
"expressions": {
"domain_name": { "references": ["var.search_domain"] },
"domain_name_servers": {
"constant_value": ["AmazonProvidedDNS"]
},
"ntp_servers": { "constant_value": ["169.254.169.123"] },
"tags": { "references": ["local.common_tags"] }
},
"schema_version": 0
},
{
"address": "aws_vpc_dhcp_options_association.main",
"mode": "managed",
"type": "aws_vpc_dhcp_options_association",
"name": "main",
"provider_config_key": "vpc:aws",
"expressions": {
"dhcp_options_id": {
"references": [
"aws_vpc_dhcp_options.main.id",
"aws_vpc_dhcp_options.main"
]
},
"vpc_id": {
"references": ["aws_vpc.main.id", "aws_vpc.main"]
}
},
"schema_version": 0
},
{
"address": "data.aws_availability_zones.available",
"mode": "data",
"type": "aws_availability_zones",
"name": "available",
"provider_config_key": "vpc:aws",
"expressions": { "state": { "constant_value": "available" } },
"schema_version": 0
}
],
"module_calls": {
"availability_zones": {
"source": "../availability_zone",
"expressions": {
"availability_zone": {
"references": [
"data.aws_availability_zones.available.names",
"data.aws_availability_zones.available",
"count.index"
]
},
"aws_internet_gateway": {
"references": ["aws_internet_gateway.main"]
},
"cidr": {
"references": [
"var.cidr_block",
"local.reserved_bits",
"count.index"
]
},
"tags": { "references": ["local.common_tags"] },
"vpc_id": {
"references": ["aws_vpc.main.id", "aws_vpc.main"]
}
},
"count_expression": {
"references": ["var.max_availability_zones"]
},
"module": {
"outputs": {
"private_route_table": {
"expression": {
"references": ["aws_route_table.private"]
}
},
"private_subnet": {
"expression": { "references": ["aws_subnet.private"] }
},
"public_route_table": {
"expression": { "references": ["aws_route_table.public"] }
},
"public_subnet": {
"expression": { "references": ["aws_subnet.public"] }
}
},
"resources": [
{
"address": "aws_route.public_internet",
"mode": "managed",
"type": "aws_route",
"name": "public_internet",
"provider_config_key": "availability_zones:aws",
"expressions": {
"destination_cidr_block": {
"constant_value": "0.0.0.0/0"
},
"gateway_id": {
"references": [
"var.aws_internet_gateway.id",
"var.aws_internet_gateway"
]
},
"route_table_id": {
"references": [
"aws_route_table.public.id",
"aws_route_table.public"
]
}
},
"schema_version": 0
},
{
"address": "aws_route_table.private",
"mode": "managed",
"type": "aws_route_table",
"name": "private",
"provider_config_key": "availability_zones:aws",
"expressions": {
"tags": { "references": ["local.common_tags"] },
"vpc_id": { "references": ["var.vpc_id"] }
},
"schema_version": 0
},
{
"address": "aws_route_table.public",
"mode": "managed",
"type": "aws_route_table",
"name": "public",
"provider_config_key": "availability_zones:aws",
"expressions": {
"tags": { "references": ["local.common_tags"] },
"vpc_id": { "references": ["var.vpc_id"] }
},
"schema_version": 0
},
{
"address": "aws_route_table_association.private",
"mode": "managed",
"type": "aws_route_table_association",
"name": "private",
"provider_config_key": "availability_zones:aws",
"expressions": {
"route_table_id": {
"references": [
"aws_route_table.private.id",
"aws_route_table.private"
]
},
"subnet_id": {
"references": [
"aws_subnet.private.id",
"aws_subnet.private"
]
}
},
"schema_version": 0
},
{
"address": "aws_route_table_association.public",
"mode": "managed",
"type": "aws_route_table_association",
"name": "public",
"provider_config_key": "availability_zones:aws",
"expressions": {
"route_table_id": {
"references": [
"aws_route_table.public.id",
"aws_route_table.public"
]
},
"subnet_id": {
"references": [
"aws_subnet.public.id",
"aws_subnet.public"
]
}
},
"schema_version": 0
},
{
"address": "aws_subnet.private",
"mode": "managed",
"type": "aws_subnet",
"name": "private",
"provider_config_key": "availability_zones:aws",
"expressions": {
"availability_zone": {
"references": ["var.availability_zone"]
},
"cidr_block": { "references": ["var.cidr"] },
"tags": { "references": ["local.common_tags"] },
"vpc_id": { "references": ["var.vpc_id"] }
},
"schema_version": 1
},
{
"address": "aws_subnet.public",
"mode": "managed",
"type": "aws_subnet",
"name": "public",
"provider_config_key": "availability_zones:aws",
"expressions": {
"availability_zone": {
"references": ["var.availability_zone"]
},
"cidr_block": { "references": ["var.cidr"] },
"tags": { "references": ["local.common_tags"] },
"vpc_id": { "references": ["var.vpc_id"] }
},
"schema_version": 1
}
],
"variables": {
"availability_zone": {},
"aws_internet_gateway": {},
"cidr": {},
"tags": {},
"vpc_id": {}
}
}
},
"nat_instance": {
"source": "../nat_instance",
"expressions": {
"instance_type": { "constant_value": "t3.micro" },
"max_availability_zones": {
"references": ["var.max_availability_zones"]
},
"route_tables": {
"references": ["module.availability_zones"]
},
"subnets": { "references": ["module.availability_zones"] },
"tags": { "references": ["local.common_tags", "var.name"] },
"vpc": { "references": ["aws_vpc.main"] }
},
"count_expression": { "references": ["var.nat_type"] },
"module": {
"outputs": {
"aws_eip": {
"expression": { "references": ["aws_eip.main"] }
},
"aws_iam_instance_profile": {
"expression": {
"references": ["aws_iam_instance_profile.main"]
}
},
"aws_iam_role": {
"expression": { "references": ["aws_iam_role.main"] }
},
"aws_instances": {
"expression": { "references": ["aws_instance.main"] }
},
"aws_security_group": {
"expression": {
"references": ["aws_security_group.nat_traffic"]
}
}
},
"resources": [
{
"address": "aws_eip.main",
"mode": "managed",
"type": "aws_eip",
"name": "main",
"provider_config_key": "nat_instance:aws",
"expressions": {
"instance": {
"references": ["aws_instance.main", "count.index"]
},
"tags": { "references": ["local.common_tags"] },
"vpc": { "constant_value": true }
},
"schema_version": 0,
"count_expression": {
"references": [
"var.high_availability",
"local.nat_count"
]
}
},
{
"address": "aws_iam_instance_profile.main",
"mode": "managed",
"type": "aws_iam_instance_profile",
"name": "main",
"provider_config_key": "nat_instance:aws",
"expressions": {
"name": {
"references": [
"aws_iam_role.main.name",
"aws_iam_role.main"
]
},
"role": {
"references": [
"aws_iam_role.main.name",
"aws_iam_role.main"
]
}
},
"schema_version": 0
},
{
"address": "aws_iam_role.main",
"mode": "managed",
"type": "aws_iam_role",
"name": "main",
"provider_config_key": "nat_instance:aws",
"expressions": {
"assume_role_policy": {
"references": [
"data.aws_iam_policy_document.assume_role.json",
"data.aws_iam_policy_document.assume_role"
]
},
"name": { "references": ["var.vpc.id", "var.vpc"] }
},
"schema_version": 0
},
{
"address": "aws_instance.main",
"mode": "managed",
"type": "aws_instance",
"name": "main",
"provider_config_key": "nat_instance:aws",
"expressions": {
"ami": {
"references": [
"data.aws_ami.ubuntu.id",
"data.aws_ami.ubuntu"
]
},
"iam_instance_profile": {
"references": [
"aws_iam_instance_profile.main.name",
"aws_iam_instance_profile.main"
]
},
"instance_type": {
"references": ["var.instance_type"]
},
"monitoring": { "constant_value": true },
"source_dest_check": { "constant_value": false },
"subnet_id": {
"references": ["var.subnets", "count.index"]
},
"tags": { "references": ["local.common_tags"] },
"user_data": {
"references": [
"path.module",
"var.vpc.cidr_block",
"var.vpc"
]
},
"vpc_security_group_ids": {
"references": [
"aws_security_group.nat_traffic.id",
"aws_security_group.nat_traffic"
]
}
},
"schema_version": 1,
"count_expression": { "references": ["local.nat_count"] }
},
{
"address": "aws_route.route_to_nat",
"mode": "managed",
"type": "aws_route",
"name": "route_to_nat",
"provider_config_key": "nat_instance:aws",
"expressions": {
"destination_cidr_block": {
"constant_value": "0.0.0.0/0"
},
"network_interface_id": {
"references": [
"var.high_availability",
"aws_instance.main",
"count.index",
"aws_instance.main[0].primary_network_interface_id",
"aws_instance.main[0]",
"aws_instance.main"
]
},
"route_table_id": {
"references": ["var.route_tables", "count.index"]
}
},
"schema_version": 0,
"count_expression": {
"references": ["var.max_availability_zones"]
}
},
{
"address": "aws_security_group.nat_traffic",
"mode": "managed",
"type": "aws_security_group",
"name": "nat_traffic",
"provider_config_key": "nat_instance:aws",
"expressions": {
"description": {
"constant_value": "Allow internal VPC traffic and all outbound traffic"
},
"egress": {
"constant_value": [
{
"cidr_blocks": ["0.0.0.0/0"],
"description": null,
"from_port": 0,
"ipv6_cidr_blocks": null,
"prefix_list_ids": null,
"protocol": "-1",
"security_groups": null,
"self": null,
"to_port": 0
}
]
},
"ingress": {
"references": ["var.vpc.cidr_block", "var.vpc"]
},
"name": { "references": ["var.vpc.id", "var.vpc"] },
"tags": { "references": ["local.common_tags"] },
"vpc_id": { "references": ["var.vpc.id", "var.vpc"] }
},
"schema_version": 1
},
{
"address": "data.aws_ami.ubuntu",
"mode": "data",
"type": "aws_ami",
"name": "ubuntu",
"provider_config_key": "nat_instance:aws",
"expressions": {
"filter": [
{
"name": { "constant_value": "name" },
"values": {
"constant_value": [
"ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"
]
}
},
{
"name": { "constant_value": "virtualization-type" },
"values": { "constant_value": ["hvm"] }
}
],
"most_recent": { "constant_value": true },
"owners": { "constant_value": ["099720109477"] }
},
"schema_version": 0
},
{
"address": "data.aws_iam_policy_document.assume_role",
"mode": "data",
"type": "aws_iam_policy_document",
"name": "assume_role",
"provider_config_key": "nat_instance:aws",
"expressions": {
"statement": [
{
"actions": { "constant_value": ["sts:AssumeRole"] },
"principals": [
{
"identifiers": {
"constant_value": ["ec2.amazonaws.com"]
},
"type": { "constant_value": "Service" }
}
]
}
]
},
"schema_version": 0
}
],
"variables": {
"high_availability": {
"default": false,
"description": "When enabled servers will be launched in each subnet."
},
"instance_type": { "default": "t3.micro" },
"max_availability_zones": {
"description": "The number of availablity zones to launch in. This should match the route_tables and subnets count."
},
"route_tables": {
"description": "A list of AWS Route Tables from the Private Networks that should route to NAT."
},
"subnets": {
"description": "A list of AWS Subnets from the Public Networks that NAT Instances can be launched into."
},
"tags": {
"default": {},
"description": "Tags to apply to all resources."
},
"vpc": {
"description": "The AWS_VPC that the NAT instance will be in."
}
}
}
}
},
"variables": {
"cidr_block": {},
"max_availability_zones": { "default": 3 },
"name": { "description": "The name of the VPC." },
"nat_type": {
"default": "instance",
"description": "What type of NAT to use. NAT Gateways are very expensive but have higher availability. NAT Gateways are also limited to give per region by default, which is very limiting in multi-VPC setups."
},
"search_domain": { "default": null },
"tags": { "default": {} }
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment