diff --git a/05-autoscaling-group/00-params.tf b/05-autoscaling-group/00-params.tf index 1f76d76..ec6ebf8 100644 --- a/05-autoscaling-group/00-params.tf +++ b/05-autoscaling-group/00-params.tf @@ -1,13 +1,5 @@ # parms file for aws ec2 cloud -#### AMI - -# Set ec2 image AMI -variable "ami" { - # Canonical, Ubuntu, 16.04 LTS, amd64 xenial image build on 2018-01-09 - default = "ami-79873901" -} - #### VPC Network variable "vpc_cidr" { default = "192.168.0.0/16" diff --git a/05-autoscaling-group/015-ami.tf b/05-autoscaling-group/015-ami.tf new file mode 100644 index 0000000..9e6905b --- /dev/null +++ b/05-autoscaling-group/015-ami.tf @@ -0,0 +1,15 @@ +data "aws_ami" "ubuntu" { + most_recent = true + + filter { + name = "name" + values = ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"] + } + + filter { + name = "virtualization-type" + values = ["hvm"] + } + + owners = ["099720109477"] # Canonical +} diff --git a/05-autoscaling-group/060-instance-http.tf b/05-autoscaling-group/060-instance-http.tf index 73d8cbf..4764d9c 100644 --- a/05-autoscaling-group/060-instance-http.tf +++ b/05-autoscaling-group/060-instance-http.tf @@ -43,7 +43,7 @@ resource "aws_autoscaling_group" "http" { # Configure instance launching configuration resource "aws_launch_configuration" "http" { name_prefix = "http" - image_id = var.ami + image_id = data.aws_ami.ubuntu.id instance_type = "t2.micro" key_name = aws_key_pair.user_key.key_name security_groups = [ diff --git a/05-autoscaling-group/061-instance-db.tf b/05-autoscaling-group/061-instance-db.tf index 356d79b..34bf76e 100644 --- a/05-autoscaling-group/061-instance-db.tf +++ b/05-autoscaling-group/061-instance-db.tf @@ -44,7 +44,7 @@ resource "aws_autoscaling_group" "db" { # Configure instance launching configuration resource "aws_launch_configuration" "db" { name_prefix = "db" - image_id = var.ami + image_id = data.aws_ami.ubuntu.id instance_type = "t2.micro" key_name = aws_key_pair.user_key.key_name security_groups = [ diff --git a/05-autoscaling-group/terraform.tfstate b/05-autoscaling-group/terraform.tfstate new file mode 100644 index 0000000..88bb3ee --- /dev/null +++ b/05-autoscaling-group/terraform.tfstate @@ -0,0 +1,8 @@ +{ + "version": 4, + "terraform_version": "0.12.8", + "serial": 37, + "lineage": "8777eace-00a6-ea17-9678-67d930b586cd", + "outputs": {}, + "resources": [] +} diff --git a/05-autoscaling-group/terraform.tfstate.backup b/05-autoscaling-group/terraform.tfstate.backup new file mode 100644 index 0000000..8deb377 --- /dev/null +++ b/05-autoscaling-group/terraform.tfstate.backup @@ -0,0 +1,860 @@ +{ + "version": 4, + "terraform_version": "0.12.8", + "serial": 18, + "lineage": "8777eace-00a6-ea17-9678-67d930b586cd", + "outputs": { + "lb_hostname_db": { + "value": "internal-db-lb-1797847203.eu-west-1.elb.amazonaws.com", + "type": "string" + }, + "lb_hostname_http": { + "value": "http-lb-2031713698.eu-west-1.elb.amazonaws.com", + "type": "string" + } + }, + "resources": [ + { + "mode": "data", + "type": "aws_ami", + "name": "ubuntu", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 0, + "attributes": { + "architecture": "x86_64", + "block_device_mappings": [ + { + "device_name": "/dev/sda1", + "ebs": { + "delete_on_termination": "true", + "encrypted": "false", + "iops": "0", + "snapshot_id": "snap-0aa939e1d633aeeb1", + "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" + } + ], + "creation_date": "2019-11-11T13:12:38.000Z", + "description": "Canonical, Ubuntu, 14.04 LTS, amd64 trusty image build on 2019-11-07", + "executable_users": null, + "filter": [ + { + "name": "name", + "values": [ + "ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*" + ] + }, + { + "name": "virtualization-type", + "values": [ + "hvm" + ] + } + ], + "hypervisor": "xen", + "id": "ami-005af4c3162f495fa", + "image_id": "ami-005af4c3162f495fa", + "image_location": "099720109477/ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-20191107", + "image_owner_alias": null, + "image_type": "machine", + "kernel_id": null, + "most_recent": true, + "name": "ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-20191107", + "name_regex": null, + "owner_id": "099720109477", + "owners": [ + "099720109477" + ], + "platform": null, + "product_codes": [], + "public": true, + "ramdisk_id": null, + "root_device_name": "/dev/sda1", + "root_device_type": "ebs", + "root_snapshot_id": "snap-0aa939e1d633aeeb1", + "sriov_net_support": "simple", + "state": "available", + "state_reason": { + "code": "UNSET", + "message": "UNSET" + }, + "tags": {}, + "virtualization_type": "hvm" + } + } + ] + }, + { + "mode": "managed", + "type": "aws_autoscaling_group", + "name": "db", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:autoscaling:eu-west-1:153726843398:autoScalingGroup:6348601c-9e2f-4fda-be2a-c96523fe8c9a:autoScalingGroupName/db-autoscaling-group", + "availability_zones": [ + "eu-west-1c" + ], + "default_cooldown": 30, + "desired_capacity": 2, + "enabled_metrics": null, + "force_delete": true, + "health_check_grace_period": 120, + "health_check_type": "ELB", + "id": "db-autoscaling-group", + "initial_lifecycle_hook": [], + "launch_configuration": "db20191225193125979800000002", + "launch_template": [], + "load_balancers": [ + "db-lb" + ], + "max_instance_lifetime": 0, + "max_size": 5, + "metrics_granularity": "1Minute", + "min_elb_capacity": null, + "min_size": 1, + "mixed_instances_policy": [], + "name": "db-autoscaling-group", + "name_prefix": null, + "placement_group": "", + "protect_from_scale_in": false, + "service_linked_role_arn": "arn:aws:iam::153726843398:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling", + "suspended_processes": null, + "tag": [], + "tags": null, + "target_group_arns": [], + "termination_policies": [ + "OldestLaunchConfiguration" + ], + "timeouts": null, + "vpc_zone_identifier": [ + "subnet-04c9c07e0121e4615" + ], + "wait_for_capacity_timeout": "10m", + "wait_for_elb_capacity": null + }, + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjo2MDAwMDAwMDAwMDB9fQ==", + "depends_on": [ + "aws_elb.db", + "aws_launch_configuration.db", + "aws_subnet.db" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_autoscaling_group", + "name": "http", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:autoscaling:eu-west-1:153726843398:autoScalingGroup:8f788963-89a2-45a0-82c0-a0d559ecd9aa:autoScalingGroupName/http-autoscaling-group", + "availability_zones": [ + "eu-west-1a" + ], + "default_cooldown": 30, + "desired_capacity": 2, + "enabled_metrics": null, + "force_delete": true, + "health_check_grace_period": 120, + "health_check_type": "ELB", + "id": "http-autoscaling-group", + "initial_lifecycle_hook": [], + "launch_configuration": "http20191225193125979800000001", + "launch_template": [], + "load_balancers": [ + "http-lb" + ], + "max_instance_lifetime": 0, + "max_size": 5, + "metrics_granularity": "1Minute", + "min_elb_capacity": null, + "min_size": 2, + "mixed_instances_policy": [], + "name": "http-autoscaling-group", + "name_prefix": null, + "placement_group": "", + "protect_from_scale_in": false, + "service_linked_role_arn": "arn:aws:iam::153726843398:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling", + "suspended_processes": null, + "tag": [], + "tags": null, + "target_group_arns": [], + "termination_policies": [ + "OldestLaunchConfiguration" + ], + "timeouts": null, + "vpc_zone_identifier": [ + "subnet-0dca53aa1b757bbbd" + ], + "wait_for_capacity_timeout": "10m", + "wait_for_elb_capacity": null + }, + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjo2MDAwMDAwMDAwMDB9fQ==", + "depends_on": [ + "aws_elb.http", + "aws_launch_configuration.http", + "aws_subnet.http" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_elb", + "name": "db", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 0, + "attributes": { + "access_logs": [], + "arn": "arn:aws:elasticloadbalancing:eu-west-1:153726843398:loadbalancer/db-lb", + "availability_zones": [ + "eu-west-1c" + ], + "connection_draining": false, + "connection_draining_timeout": 300, + "cross_zone_load_balancing": true, + "dns_name": "internal-db-lb-1797847203.eu-west-1.elb.amazonaws.com", + "health_check": [ + { + "healthy_threshold": 2, + "interval": 30, + "target": "TCP:3306", + "timeout": 3, + "unhealthy_threshold": 2 + } + ], + "id": "db-lb", + "idle_timeout": 60, + "instances": [], + "internal": true, + "listener": [ + { + "instance_port": 3306, + "instance_protocol": "tcp", + "lb_port": 3306, + "lb_protocol": "tcp", + "ssl_certificate_id": "" + } + ], + "name": "db-lb", + "name_prefix": null, + "security_groups": [ + "sg-0ebbd9b0bb6c10d4e" + ], + "source_security_group": "153726843398/default", + "source_security_group_id": "sg-0ebbd9b0bb6c10d4e", + "subnets": [ + "subnet-04c9c07e0121e4615" + ], + "tags": { + "Name": "db-lb" + }, + "zone_id": "Z32O12XQLNTSW2" + }, + "private": "bnVsbA==", + "depends_on": [ + "aws_subnet.db" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_elb", + "name": "http", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 0, + "attributes": { + "access_logs": [], + "arn": "arn:aws:elasticloadbalancing:eu-west-1:153726843398:loadbalancer/http-lb", + "availability_zones": [ + "eu-west-1a" + ], + "connection_draining": false, + "connection_draining_timeout": 300, + "cross_zone_load_balancing": true, + "dns_name": "http-lb-2031713698.eu-west-1.elb.amazonaws.com", + "health_check": [ + { + "healthy_threshold": 2, + "interval": 30, + "target": "HTTP:80/", + "timeout": 3, + "unhealthy_threshold": 2 + } + ], + "id": "http-lb", + "idle_timeout": 60, + "instances": [], + "internal": false, + "listener": [ + { + "instance_port": 80, + "instance_protocol": "http", + "lb_port": 80, + "lb_protocol": "http", + "ssl_certificate_id": "" + } + ], + "name": "http-lb", + "name_prefix": null, + "security_groups": [ + "sg-0ebbd9b0bb6c10d4e" + ], + "source_security_group": "153726843398/default", + "source_security_group_id": "sg-0ebbd9b0bb6c10d4e", + "subnets": [ + "subnet-0dca53aa1b757bbbd" + ], + "tags": { + "Name": "http-lb" + }, + "zone_id": "Z32O12XQLNTSW2" + }, + "private": "bnVsbA==", + "depends_on": [ + "aws_subnet.http" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_internet_gateway", + "name": "gw", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 0, + "attributes": { + "id": "igw-0dd9b6716081fd9ac", + "owner_id": "153726843398", + "tags": { + "Name": "internet_gateway" + }, + "vpc_id": "vpc-00daa87ec35abf789" + }, + "private": "bnVsbA==", + "depends_on": [ + "aws_vpc.terraform" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_key_pair", + "name": "user_key", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 1, + "attributes": { + "fingerprint": "d7:ff:a6:63:18:64:9c:57:a1:ee:ca:a4:ad:c2:81:62", + "id": "user-key", + "key_name": "user-key", + "key_name_prefix": null, + "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 email@example.com" + }, + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" + } + ] + }, + { + "mode": "managed", + "type": "aws_launch_configuration", + "name": "db", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 0, + "attributes": { + "associate_public_ip_address": false, + "ebs_block_device": [], + "ebs_optimized": false, + "enable_monitoring": true, + "ephemeral_block_device": [], + "iam_instance_profile": "", + "id": "db20191225193125979800000002", + "image_id": "ami-005af4c3162f495fa", + "instance_type": "t2.micro", + "key_name": "user-key", + "name": "db20191225193125979800000002", + "name_prefix": "db", + "placement_tenancy": null, + "root_block_device": [], + "security_groups": [ + "sg-0e80935447366202d", + "sg-0f031be19cebd32a8" + ], + "spot_price": "", + "user_data": "9d14776ee30bd7b45adb50f356849fae6f2ec380", + "user_data_base64": null, + "vpc_classic_link_id": "", + "vpc_classic_link_security_groups": null + }, + "private": "bnVsbA==", + "depends_on": [ + "aws_key_pair.user_key", + "aws_security_group.administration", + "aws_security_group.web", + "data.aws_ami.ubuntu" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_launch_configuration", + "name": "http", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 0, + "attributes": { + "associate_public_ip_address": false, + "ebs_block_device": [], + "ebs_optimized": false, + "enable_monitoring": true, + "ephemeral_block_device": [], + "iam_instance_profile": "", + "id": "http20191225193125979800000001", + "image_id": "ami-005af4c3162f495fa", + "instance_type": "t2.micro", + "key_name": "user-key", + "name": "http20191225193125979800000001", + "name_prefix": "http", + "placement_tenancy": null, + "root_block_device": [], + "security_groups": [ + "sg-0e80935447366202d", + "sg-0f031be19cebd32a8" + ], + "spot_price": "", + "user_data": "a3cee0bef4aa8a368d0fe5b9516a8dc4be417ef9", + "user_data_base64": null, + "vpc_classic_link_id": "", + "vpc_classic_link_security_groups": null + }, + "private": "bnVsbA==", + "depends_on": [ + "aws_key_pair.user_key", + "aws_security_group.administration", + "aws_security_group.web", + "data.aws_ami.ubuntu" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_route_table", + "name": "public", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 0, + "attributes": { + "id": "rtb-02904b01cf65b1d79", + "owner_id": "153726843398", + "propagating_vgws": [], + "route": [ + { + "cidr_block": "0.0.0.0/0", + "egress_only_gateway_id": "", + "gateway_id": "igw-0dd9b6716081fd9ac", + "instance_id": "", + "ipv6_cidr_block": "", + "nat_gateway_id": "", + "network_interface_id": "", + "transit_gateway_id": "", + "vpc_peering_connection_id": "" + } + ], + "tags": null, + "vpc_id": "vpc-00daa87ec35abf789" + }, + "private": "bnVsbA==", + "depends_on": [ + "aws_internet_gateway.gw", + "aws_vpc.terraform" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_route_table_association", + "name": "db", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 0, + "attributes": { + "gateway_id": null, + "id": "rtbassoc-06cf2e7eb294a663c", + "route_table_id": "rtb-02904b01cf65b1d79", + "subnet_id": "subnet-04c9c07e0121e4615" + }, + "private": "bnVsbA==", + "depends_on": [ + "aws_route_table.public", + "aws_subnet.db" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_route_table_association", + "name": "http", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 0, + "attributes": { + "gateway_id": null, + "id": "rtbassoc-00cd0a12b59cc728d", + "route_table_id": "rtb-02904b01cf65b1d79", + "subnet_id": "subnet-0dca53aa1b757bbbd" + }, + "private": "bnVsbA==", + "depends_on": [ + "aws_route_table.public", + "aws_subnet.http" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_security_group", + "name": "administration", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:153726843398:security-group/sg-0e80935447366202d", + "description": "Allow default administration service", + "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 + } + ], + "id": "sg-0e80935447366202d", + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 22, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 22 + }, + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 8, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "icmp", + "security_groups": [], + "self": false, + "to_port": 0 + } + ], + "name": "administration", + "name_prefix": null, + "owner_id": "153726843398", + "revoke_rules_on_delete": false, + "tags": { + "Name": "administration" + }, + "timeouts": null, + "vpc_id": "vpc-00daa87ec35abf789" + }, + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", + "depends_on": [ + "aws_vpc.terraform" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_security_group", + "name": "db", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:153726843398:security-group/sg-0644498492632957d", + "description": "Allow db incgress trafic", + "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 + } + ], + "id": "sg-0644498492632957d", + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 3306, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 3306 + } + ], + "name": "db", + "name_prefix": null, + "owner_id": "153726843398", + "revoke_rules_on_delete": false, + "tags": { + "Name": "db" + }, + "timeouts": null, + "vpc_id": "vpc-00daa87ec35abf789" + }, + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", + "depends_on": [ + "aws_vpc.terraform" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_security_group", + "name": "web", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:153726843398:security-group/sg-0f031be19cebd32a8", + "description": "Allow web incgress trafic", + "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 + } + ], + "id": "sg-0f031be19cebd32a8", + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 443, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 443 + }, + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 80, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 80 + } + ], + "name": "web", + "name_prefix": null, + "owner_id": "153726843398", + "revoke_rules_on_delete": false, + "tags": { + "Name": "web" + }, + "timeouts": null, + "vpc_id": "vpc-00daa87ec35abf789" + }, + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", + "depends_on": [ + "aws_vpc.terraform" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_subnet", + "name": "db", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:153726843398:subnet/subnet-04c9c07e0121e4615", + "assign_ipv6_address_on_creation": false, + "availability_zone": "eu-west-1c", + "availability_zone_id": "euw1-az1", + "cidr_block": "192.168.2.0/24", + "id": "subnet-04c9c07e0121e4615", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "map_public_ip_on_launch": false, + "owner_id": "153726843398", + "tags": { + "Name": "subnet_db" + }, + "timeouts": null, + "vpc_id": "vpc-00daa87ec35abf789" + }, + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "depends_on": [ + "aws_internet_gateway.gw", + "aws_vpc.terraform" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_subnet", + "name": "http", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:153726843398:subnet/subnet-0dca53aa1b757bbbd", + "assign_ipv6_address_on_creation": false, + "availability_zone": "eu-west-1a", + "availability_zone_id": "euw1-az2", + "cidr_block": "192.168.1.0/24", + "id": "subnet-0dca53aa1b757bbbd", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "map_public_ip_on_launch": false, + "owner_id": "153726843398", + "tags": { + "Name": "subnet_http" + }, + "timeouts": null, + "vpc_id": "vpc-00daa87ec35abf789" + }, + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "depends_on": [ + "aws_internet_gateway.gw", + "aws_vpc.terraform" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_vpc", + "name": "terraform", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:153726843398:vpc/vpc-00daa87ec35abf789", + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "192.168.0.0/16", + "default_network_acl_id": "acl-0d8439a0d70fcabdf", + "default_route_table_id": "rtb-05817162ad79c0d37", + "default_security_group_id": "sg-0ebbd9b0bb6c10d4e", + "dhcp_options_id": "dopt-dc21bfba", + "enable_classiclink": false, + "enable_classiclink_dns_support": false, + "enable_dns_hostnames": true, + "enable_dns_support": true, + "id": "vpc-00daa87ec35abf789", + "instance_tenancy": "default", + "ipv6_association_id": "", + "ipv6_cidr_block": "", + "main_route_table_id": "rtb-05817162ad79c0d37", + "owner_id": "153726843398", + "tags": { + "Name": "vpc_http" + } + }, + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" + } + ] + } + ] +}