diff --git a/2-simple-example/iac/terraform.tfstate b/2-simple-example/iac/terraform.tfstate index 72f885e..8d9af06 100644 --- a/2-simple-example/iac/terraform.tfstate +++ b/2-simple-example/iac/terraform.tfstate @@ -1,1973 +1,9 @@ { "version": 4, "terraform_version": "1.6.2", - "serial": 56, + "serial": 98, "lineage": "60a035a9-3548-3c8a-f46b-288ce030177e", - "outputs": { - "database_subnets": { - "value": [ - "subnet-09a9bd0cb02875df6", - "subnet-09d79f63e06dcff9c", - "subnet-0afa39f3c10b5c27a" - ], - "type": [ - "tuple", - [ - "string", - "string", - "string" - ] - ] - }, - "nat_public_ips": { - "value": [ - "52.209.167.30" - ], - "type": [ - "list", - "string" - ] - }, - "private_subnets": { - "value": [ - "subnet-08a0f8f2b58b9f434", - "subnet-01f0c2567701e0664", - "subnet-05003276b18530798" - ], - "type": [ - "tuple", - [ - "string", - "string", - "string" - ] - ] - }, - "public_subnets": { - "value": [ - "subnet-031d52c724a2fffa4", - "subnet-0abd78db4c20985a7", - "subnet-032b71cf002a07920" - ], - "type": [ - "tuple", - [ - "string", - "string", - "string" - ] - ] - }, - "vpc_id": { - "value": "vpc-046cebb625b6305fc", - "type": "string" - } - }, - "resources": [ - { - "mode": "data", - "type": "aws_availability_zones", - "name": "available", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "all_availability_zones": null, - "exclude_names": null, - "exclude_zone_ids": null, - "filter": null, - "group_names": [ - "eu-west-1" - ], - "id": "eu-west-1", - "names": [ - "eu-west-1a", - "eu-west-1b", - "eu-west-1c" - ], - "state": null, - "timeouts": null, - "zone_ids": [ - "euw1-az1", - "euw1-az2", - "euw1-az3" - ] - }, - "sensitive_attributes": [] - } - ] - }, - { - "mode": "data", - "type": "aws_security_group", - "name": "default", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:security-group/sg-07abe149962da30c3", - "description": "default VPC security group", - "filter": null, - "id": "sg-07abe149962da30c3", - "name": "default", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-default", - "Owner": "Ric Harvey" - }, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [] - } - ] - }, - { - "mode": "managed", - "type": "aws_instance", - "name": "test_ami", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 1, - "attributes": { - "ami": "ami-0f5eb0451af853a24", - "arn": "arn:aws:ec2:eu-west-1:355614969320:instance/i-05f02c343db1101a8", - "associate_public_ip_address": true, - "availability_zone": "eu-west-1a", - "capacity_reservation_specification": [ - { - "capacity_reservation_preference": "open", - "capacity_reservation_target": [] - } - ], - "cpu_core_count": 1, - "cpu_options": [ - { - "amd_sev_snp": "", - "core_count": 1, - "threads_per_core": 2 - } - ], - "cpu_threads_per_core": 2, - "credit_specification": [ - { - "cpu_credits": "unlimited" - } - ], - "disable_api_stop": false, - "disable_api_termination": false, - "ebs_block_device": [], - "ebs_optimized": false, - "enclave_options": [ - { - "enabled": false - } - ], - "ephemeral_block_device": [], - "get_password_data": false, - "hibernation": false, - "host_id": "", - "host_resource_group_arn": null, - "iam_instance_profile": "", - "id": "i-05f02c343db1101a8", - "instance_initiated_shutdown_behavior": "stop", - "instance_lifecycle": "", - "instance_market_options": [], - "instance_state": "running", - "instance_type": "t3.micro", - "ipv6_address_count": 0, - "ipv6_addresses": [], - "key_name": "", - "launch_template": [], - "maintenance_options": [ - { - "auto_recovery": "default" - } - ], - "metadata_options": [ - { - "http_endpoint": "enabled", - "http_protocol_ipv6": "disabled", - "http_put_response_hop_limit": 1, - "http_tokens": "optional", - "instance_metadata_tags": "disabled" - } - ], - "monitoring": false, - "network_interface": [], - "outpost_arn": "", - "password_data": "", - "placement_group": "", - "placement_partition_number": 0, - "primary_network_interface_id": "eni-0961360b741a4d1e7", - "private_dns": "ip-20-10-11-172.eu-west-1.compute.internal", - "private_dns_name_options": [ - { - "enable_resource_name_dns_a_record": false, - "enable_resource_name_dns_aaaa_record": false, - "hostname_type": "ip-name" - } - ], - "private_ip": "20.10.11.172", - "public_dns": "ec2-52-210-19-80.eu-west-1.compute.amazonaws.com", - "public_ip": "52.210.19.80", - "root_block_device": [ - { - "delete_on_termination": true, - "device_name": "/dev/xvda", - "encrypted": false, - "iops": 100, - "kms_key_id": "", - "tags": {}, - "tags_all": {}, - "throughput": 0, - "volume_id": "vol-0fce1ce169adac389", - "volume_size": 10, - "volume_type": "gp2" - } - ], - "secondary_private_ips": [], - "security_groups": [], - "source_dest_check": true, - "spot_instance_request_id": "", - "subnet_id": "subnet-031d52c724a2fffa4", - "tags": null, - "tags_all": {}, - "tenancy": "default", - "timeouts": null, - "user_data": null, - "user_data_base64": null, - "user_data_replace_on_change": false, - "volume_tags": null, - "vpc_security_group_ids": [ - "sg-07ac2a32dabc47600" - ] - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMCwicmVhZCI6OTAwMDAwMDAwMDAwLCJ1cGRhdGUiOjYwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "aws_security_group.web_server_sg_tf", - "data.aws_availability_zones.available", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "mode": "managed", - "type": "aws_security_group", - "name": "web_server_sg_tf", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:security-group/sg-07ac2a32dabc47600", - "description": "Allow HTTP to web server", - "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-07ac2a32dabc47600", - "ingress": [ - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "HTTP ingress", - "from_port": 80, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 80 - }, - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "HTTPS ingress", - "from_port": 443, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 443 - } - ], - "name": "web-server-sg-tf", - "name_prefix": "", - "owner_id": "355614969320", - "revoke_rules_on_delete": false, - "tags": {}, - "tags_all": {}, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", - "dependencies": [ - "module.vpc.aws_vpc.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "data", - "type": "aws_iam_policy_document", - "name": "flow_log_cloudwatch_assume_role", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "id": "1021377347", - "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"AWSVPCFlowLogsAssumeRole\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"vpc-flow-logs.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": [ - "vpc-flow-logs.amazonaws.com" - ], - "type": "Service" - } - ], - "resources": [], - "sid": "AWSVPCFlowLogsAssumeRole" - } - ], - "version": "2012-10-17" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.vpc", - "mode": "data", - "type": "aws_iam_policy_document", - "name": "vpc_flow_log_cloudwatch", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "id": "2053943846", - "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"AWSVPCFlowLogsPushToCloudWatch\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"logs:PutLogEvents\",\n \"logs:DescribeLogStreams\",\n \"logs:DescribeLogGroups\",\n \"logs:CreateLogStream\"\n ],\n \"Resource\": \"*\"\n }\n ]\n}", - "override_json": null, - "override_policy_documents": null, - "policy_id": null, - "source_json": null, - "source_policy_documents": null, - "statement": [ - { - "actions": [ - "logs:CreateLogStream", - "logs:DescribeLogGroups", - "logs:DescribeLogStreams", - "logs:PutLogEvents" - ], - "condition": [], - "effect": "Allow", - "not_actions": [], - "not_principals": [], - "not_resources": [], - "principals": [], - "resources": [ - "*" - ], - "sid": "AWSVPCFlowLogsPushToCloudWatch" - } - ], - "version": "2012-10-17" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_cloudwatch_log_group", - "name": "flow_log", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:logs:eu-west-1:355614969320:log-group:/aws/vpc-flow-log/vpc-046cebb625b6305fc", - "id": "/aws/vpc-flow-log/vpc-046cebb625b6305fc", - "kms_key_id": "", - "log_group_class": "STANDARD", - "name": "/aws/vpc-flow-log/vpc-046cebb625b6305fc", - "name_prefix": "", - "retention_in_days": 0, - "skip_destroy": false, - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Owner": "Ric Harvey" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_db_subnet_group", - "name": "database", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:rds:eu-west-1:355614969320:subgrp:ric harvey-dev", - "description": "Database subnet group for Ric Harvey-dev", - "id": "ric harvey-dev", - "name": "ric harvey-dev", - "name_prefix": "", - "subnet_ids": [ - "subnet-09a9bd0cb02875df6", - "subnet-09d79f63e06dcff9c", - "subnet-0afa39f3c10b5c27a" - ], - "supported_network_types": [ - "IPV4" - ], - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "ric harvey-dev", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "ric harvey-dev", - "Owner": "Ric Harvey" - }, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_subnet.database", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_default_network_acl", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:network-acl/acl-033f45479f8d9d5de", - "default_network_acl_id": "acl-033f45479f8d9d5de", - "egress": [ - { - "action": "allow", - "cidr_block": "", - "from_port": 0, - "icmp_code": 0, - "icmp_type": 0, - "ipv6_cidr_block": "::/0", - "protocol": "-1", - "rule_no": 101, - "to_port": 0 - }, - { - "action": "allow", - "cidr_block": "0.0.0.0/0", - "from_port": 0, - "icmp_code": 0, - "icmp_type": 0, - "ipv6_cidr_block": "", - "protocol": "-1", - "rule_no": 100, - "to_port": 0 - } - ], - "id": "acl-033f45479f8d9d5de", - "ingress": [ - { - "action": "allow", - "cidr_block": "", - "from_port": 0, - "icmp_code": 0, - "icmp_type": 0, - "ipv6_cidr_block": "::/0", - "protocol": "-1", - "rule_no": 101, - "to_port": 0 - }, - { - "action": "allow", - "cidr_block": "0.0.0.0/0", - "from_port": 0, - "icmp_code": 0, - "icmp_type": 0, - "ipv6_cidr_block": "", - "protocol": "-1", - "rule_no": 100, - "to_port": 0 - } - ], - "owner_id": "355614969320", - "subnet_ids": [ - "subnet-01f0c2567701e0664", - "subnet-031d52c724a2fffa4", - "subnet-032b71cf002a07920", - "subnet-05003276b18530798", - "subnet-08a0f8f2b58b9f434", - "subnet-09a9bd0cb02875df6", - "subnet-09d79f63e06dcff9c", - "subnet-0abd78db4c20985a7", - "subnet-0afa39f3c10b5c27a" - ], - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-default", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-default", - "Owner": "Ric Harvey" - }, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.vpc.aws_vpc.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_default_route_table", - "name": "default", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:route-table/rtb-0cacfaa5d6ab5c41c", - "default_route_table_id": "rtb-0cacfaa5d6ab5c41c", - "id": "rtb-0cacfaa5d6ab5c41c", - "owner_id": "355614969320", - "propagating_vgws": [], - "route": [], - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-default", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-default", - "Owner": "Ric Harvey" - }, - "timeouts": { - "create": "5m", - "update": "5m" - }, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsInVwZGF0ZSI6MzAwMDAwMDAwMDAwfX0=", - "dependencies": [ - "module.vpc.aws_vpc.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_default_security_group", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:security-group/sg-07abe149962da30c3", - "description": "default VPC security group", - "egress": [], - "id": "sg-07abe149962da30c3", - "ingress": [], - "name": "default", - "name_prefix": "", - "owner_id": "355614969320", - "revoke_rules_on_delete": false, - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-default", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-default", - "Owner": "Ric Harvey" - }, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", - "dependencies": [ - "module.vpc.aws_vpc.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_eip", - "name": "nat", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "address": null, - "allocation_id": "eipalloc-026c2472ff2c8286d", - "associate_with_private_ip": null, - "association_id": "eipassoc-0721e33139a7edf47", - "carrier_ip": "", - "customer_owned_ip": "", - "customer_owned_ipv4_pool": "", - "domain": "vpc", - "id": "eipalloc-026c2472ff2c8286d", - "instance": "", - "network_border_group": "eu-west-1", - "network_interface": "eni-01976be9e367a3140", - "private_dns": "ip-20-10-11-113.eu-west-1.compute.internal", - "private_ip": "20.10.11.113", - "public_dns": "ec2-52-209-167-30.eu-west-1.compute.amazonaws.com", - "public_ip": "52.209.167.30", - "public_ipv4_pool": "amazon", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-eu-west-1a", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-eu-west-1a", - "Owner": "Ric Harvey" - }, - "timeouts": null, - "vpc": true - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxODAwMDAwMDAwMDAsInJlYWQiOjkwMDAwMDAwMDAwMCwidXBkYXRlIjozMDAwMDAwMDAwMDB9fQ==", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_internet_gateway.this", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_flow_log", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:vpc-flow-log/fl-0c0d88e36a57ce015", - "deliver_cross_account_role": "", - "destination_options": [], - "eni_id": null, - "iam_role_arn": "arn:aws:iam::355614969320:role/vpc-flow-log-role-20240415213621374400000002", - "id": "fl-0c0d88e36a57ce015", - "log_destination": "arn:aws:logs:eu-west-1:355614969320:log-group:/aws/vpc-flow-log/vpc-046cebb625b6305fc", - "log_destination_type": "cloud-watch-logs", - "log_format": "${version} ${account-id} ${interface-id} ${srcaddr} ${dstaddr} ${srcport} ${dstport} ${protocol} ${packets} ${bytes} ${start} ${end} ${action} ${log-status}", - "log_group_name": "/aws/vpc-flow-log/vpc-046cebb625b6305fc", - "max_aggregation_interval": 60, - "subnet_id": null, - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Owner": "Ric Harvey" - }, - "traffic_type": "ALL", - "transit_gateway_attachment_id": null, - "transit_gateway_id": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.vpc.aws_cloudwatch_log_group.flow_log", - "module.vpc.aws_iam_role.vpc_flow_log_cloudwatch", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this", - "module.vpc.data.aws_iam_policy_document.flow_log_cloudwatch_assume_role" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_iam_policy", - "name": "vpc_flow_log_cloudwatch", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:iam::355614969320:policy/vpc-flow-log-to-cloudwatch-20240415213621374400000001", - "description": "", - "id": "arn:aws:iam::355614969320:policy/vpc-flow-log-to-cloudwatch-20240415213621374400000001", - "name": "vpc-flow-log-to-cloudwatch-20240415213621374400000001", - "name_prefix": "vpc-flow-log-to-cloudwatch-", - "path": "/", - "policy": "{\"Statement\":[{\"Action\":[\"logs:PutLogEvents\",\"logs:DescribeLogStreams\",\"logs:DescribeLogGroups\",\"logs:CreateLogStream\"],\"Effect\":\"Allow\",\"Resource\":\"*\",\"Sid\":\"AWSVPCFlowLogsPushToCloudWatch\"}],\"Version\":\"2012-10-17\"}", - "policy_id": "ANPAVFTCNZXUNS4PRUSU2", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Owner": "Ric Harvey" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.vpc.data.aws_iam_policy_document.vpc_flow_log_cloudwatch" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_iam_role", - "name": "vpc_flow_log_cloudwatch", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:iam::355614969320:role/vpc-flow-log-role-20240415213621374400000002", - "assume_role_policy": "{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"vpc-flow-logs.amazonaws.com\"},\"Sid\":\"AWSVPCFlowLogsAssumeRole\"}],\"Version\":\"2012-10-17\"}", - "create_date": "2024-04-15T21:36:21Z", - "description": "", - "force_detach_policies": false, - "id": "vpc-flow-log-role-20240415213621374400000002", - "inline_policy": [], - "managed_policy_arns": [ - "arn:aws:iam::355614969320:policy/vpc-flow-log-to-cloudwatch-20240415213621374400000001" - ], - "max_session_duration": 3600, - "name": "vpc-flow-log-role-20240415213621374400000002", - "name_prefix": "vpc-flow-log-role-", - "path": "/", - "permissions_boundary": "", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Owner": "Ric Harvey" - }, - "unique_id": "AROAVFTCNZXUHZQXLYXP2" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.vpc.data.aws_iam_policy_document.flow_log_cloudwatch_assume_role" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_iam_role_policy_attachment", - "name": "vpc_flow_log_cloudwatch", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "id": "vpc-flow-log-role-20240415213621374400000002-20240415213622466900000003", - "policy_arn": "arn:aws:iam::355614969320:policy/vpc-flow-log-to-cloudwatch-20240415213621374400000001", - "role": "vpc-flow-log-role-20240415213621374400000002" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.vpc.aws_iam_policy.vpc_flow_log_cloudwatch", - "module.vpc.aws_iam_role.vpc_flow_log_cloudwatch", - "module.vpc.data.aws_iam_policy_document.flow_log_cloudwatch_assume_role", - "module.vpc.data.aws_iam_policy_document.vpc_flow_log_cloudwatch" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_internet_gateway", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:internet-gateway/igw-0cea09d0432a7a7d4", - "id": "igw-0cea09d0432a7a7d4", - "owner_id": "355614969320", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev", - "Owner": "Ric Harvey" - }, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19", - "dependencies": [ - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_nat_gateway", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "allocation_id": "eipalloc-026c2472ff2c8286d", - "association_id": "eipassoc-0721e33139a7edf47", - "connectivity_type": "public", - "id": "nat-0fc14b068854aba40", - "network_interface_id": "eni-01976be9e367a3140", - "private_ip": "20.10.11.113", - "public_ip": "52.209.167.30", - "secondary_allocation_ids": [], - "secondary_private_ip_address_count": 0, - "secondary_private_ip_addresses": [], - "subnet_id": "subnet-031d52c724a2fffa4", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-eu-west-1a", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-eu-west-1a", - "Owner": "Ric Harvey" - }, - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTgwMDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMDB9fQ==", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_eip.nat", - "module.vpc.aws_internet_gateway.this", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_route", - "name": "private_nat_gateway", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "carrier_gateway_id": "", - "core_network_arn": "", - "destination_cidr_block": "0.0.0.0/0", - "destination_ipv6_cidr_block": "", - "destination_prefix_list_id": "", - "egress_only_gateway_id": "", - "gateway_id": "", - "id": "r-rtb-0e0dd99aa8eb0b42a1080289494", - "instance_id": "", - "instance_owner_id": "", - "local_gateway_id": "", - "nat_gateway_id": "nat-0fc14b068854aba40", - "network_interface_id": "", - "origin": "CreateRoute", - "route_table_id": "rtb-0e0dd99aa8eb0b42a", - "state": "active", - "timeouts": { - "create": "5m", - "delete": null, - "update": null - }, - "transit_gateway_id": "", - "vpc_endpoint_id": "", - "vpc_peering_connection_id": "" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_eip.nat", - "module.vpc.aws_internet_gateway.this", - "module.vpc.aws_nat_gateway.this", - "module.vpc.aws_route_table.private", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_route", - "name": "public_internet_gateway", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "carrier_gateway_id": "", - "core_network_arn": "", - "destination_cidr_block": "0.0.0.0/0", - "destination_ipv6_cidr_block": "", - "destination_prefix_list_id": "", - "egress_only_gateway_id": "", - "gateway_id": "igw-0cea09d0432a7a7d4", - "id": "r-rtb-0c2ae9a5a8eedbea51080289494", - "instance_id": "", - "instance_owner_id": "", - "local_gateway_id": "", - "nat_gateway_id": "", - "network_interface_id": "", - "origin": "CreateRoute", - "route_table_id": "rtb-0c2ae9a5a8eedbea5", - "state": "active", - "timeouts": { - "create": "5m", - "delete": null, - "update": null - }, - "transit_gateway_id": "", - "vpc_endpoint_id": "", - "vpc_peering_connection_id": "" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "module.vpc.aws_internet_gateway.this", - "module.vpc.aws_route_table.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_route_table", - "name": "private", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:route-table/rtb-0e0dd99aa8eb0b42a", - "id": "rtb-0e0dd99aa8eb0b42a", - "owner_id": "355614969320", - "propagating_vgws": [], - "route": [ - { - "carrier_gateway_id": "", - "cidr_block": "0.0.0.0/0", - "core_network_arn": "", - "destination_prefix_list_id": "", - "egress_only_gateway_id": "", - "gateway_id": "", - "ipv6_cidr_block": "", - "local_gateway_id": "", - "nat_gateway_id": "nat-0fc14b068854aba40", - "network_interface_id": "", - "transit_gateway_id": "", - "vpc_endpoint_id": "", - "vpc_peering_connection_id": "" - } - ], - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-private", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-private", - "Owner": "Ric Harvey" - }, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_route_table", - "name": "public", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:route-table/rtb-0c2ae9a5a8eedbea5", - "id": "rtb-0c2ae9a5a8eedbea5", - "owner_id": "355614969320", - "propagating_vgws": [], - "route": [ - { - "carrier_gateway_id": "", - "cidr_block": "0.0.0.0/0", - "core_network_arn": "", - "destination_prefix_list_id": "", - "egress_only_gateway_id": "", - "gateway_id": "igw-0cea09d0432a7a7d4", - "ipv6_cidr_block": "", - "local_gateway_id": "", - "nat_gateway_id": "", - "network_interface_id": "", - "transit_gateway_id": "", - "vpc_endpoint_id": "", - "vpc_peering_connection_id": "" - } - ], - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-public", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-public", - "Owner": "Ric Harvey" - }, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_route_table_association", - "name": "database", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-0b5401618a33b432e", - "route_table_id": "rtb-0e0dd99aa8eb0b42a", - "subnet_id": "subnet-09a9bd0cb02875df6", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.database", - "module.vpc.aws_route_table.private", - "module.vpc.aws_subnet.database", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-01069b486dbec5009", - "route_table_id": "rtb-0e0dd99aa8eb0b42a", - "subnet_id": "subnet-09d79f63e06dcff9c", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.database", - "module.vpc.aws_route_table.private", - "module.vpc.aws_subnet.database", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-04832cff53f0cfd6c", - "route_table_id": "rtb-0e0dd99aa8eb0b42a", - "subnet_id": "subnet-0afa39f3c10b5c27a", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.database", - "module.vpc.aws_route_table.private", - "module.vpc.aws_subnet.database", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_route_table_association", - "name": "private", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-0491ec694823cf9e1", - "route_table_id": "rtb-0e0dd99aa8eb0b42a", - "subnet_id": "subnet-08a0f8f2b58b9f434", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.private", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-045d8bab1d18be4c8", - "route_table_id": "rtb-0e0dd99aa8eb0b42a", - "subnet_id": "subnet-01f0c2567701e0664", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.private", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-009923bce371b45f5", - "route_table_id": "rtb-0e0dd99aa8eb0b42a", - "subnet_id": "subnet-05003276b18530798", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.private", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_route_table_association", - "name": "public", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-060ee65d969c02836", - "route_table_id": "rtb-0c2ae9a5a8eedbea5", - "subnet_id": "subnet-031d52c724a2fffa4", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.public", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-033ab5ccc57969ba6", - "route_table_id": "rtb-0c2ae9a5a8eedbea5", - "subnet_id": "subnet-0abd78db4c20985a7", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.public", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-02f94910667b7ec58", - "route_table_id": "rtb-0c2ae9a5a8eedbea5", - "subnet_id": "subnet-032b71cf002a07920", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.public", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_subnet", - "name": "database", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-09a9bd0cb02875df6", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1a", - "availability_zone_id": "euw1-az1", - "cidr_block": "20.10.21.0/24", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-09a9bd0cb02875df6", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-db-eu-west-1a", - "Owner": "Ric Harvey", - "name": "rds--Ric Harvey-dev" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-db-eu-west-1a", - "Owner": "Ric Harvey", - "name": "rds--Ric Harvey-dev" - }, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-09d79f63e06dcff9c", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1b", - "availability_zone_id": "euw1-az2", - "cidr_block": "20.10.22.0/24", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-09d79f63e06dcff9c", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-db-eu-west-1b", - "Owner": "Ric Harvey", - "name": "rds--Ric Harvey-dev" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-db-eu-west-1b", - "Owner": "Ric Harvey", - "name": "rds--Ric Harvey-dev" - }, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-0afa39f3c10b5c27a", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1c", - "availability_zone_id": "euw1-az3", - "cidr_block": "20.10.23.0/24", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-0afa39f3c10b5c27a", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-db-eu-west-1c", - "Owner": "Ric Harvey", - "name": "rds--Ric Harvey-dev" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-db-eu-west-1c", - "Owner": "Ric Harvey", - "name": "rds--Ric Harvey-dev" - }, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_subnet", - "name": "private", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-08a0f8f2b58b9f434", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1a", - "availability_zone_id": "euw1-az1", - "cidr_block": "20.10.1.0/24", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-08a0f8f2b58b9f434", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-private-eu-west-1a", - "Owner": "Ric Harvey", - "name": "private--Ric Harvey-dev" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-private-eu-west-1a", - "Owner": "Ric Harvey", - "name": "private--Ric Harvey-dev" - }, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-01f0c2567701e0664", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1b", - "availability_zone_id": "euw1-az2", - "cidr_block": "20.10.2.0/24", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-01f0c2567701e0664", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-private-eu-west-1b", - "Owner": "Ric Harvey", - "name": "private--Ric Harvey-dev" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-private-eu-west-1b", - "Owner": "Ric Harvey", - "name": "private--Ric Harvey-dev" - }, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-05003276b18530798", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1c", - "availability_zone_id": "euw1-az3", - "cidr_block": "20.10.3.0/24", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-05003276b18530798", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-private-eu-west-1c", - "Owner": "Ric Harvey", - "name": "private--Ric Harvey-dev" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-private-eu-west-1c", - "Owner": "Ric Harvey", - "name": "private--Ric Harvey-dev" - }, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_subnet", - "name": "public", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-031d52c724a2fffa4", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1a", - "availability_zone_id": "euw1-az1", - "cidr_block": "20.10.11.0/24", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-031d52c724a2fffa4", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-public-eu-west-1a", - "Owner": "Ric Harvey", - "name": "public--Ric Harvey-dev" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-public-eu-west-1a", - "Owner": "Ric Harvey", - "name": "public--Ric Harvey-dev" - }, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-0abd78db4c20985a7", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1b", - "availability_zone_id": "euw1-az2", - "cidr_block": "20.10.12.0/24", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-0abd78db4c20985a7", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-public-eu-west-1b", - "Owner": "Ric Harvey", - "name": "public--Ric Harvey-dev" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-public-eu-west-1b", - "Owner": "Ric Harvey", - "name": "public--Ric Harvey-dev" - }, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-032b71cf002a07920", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1c", - "availability_zone_id": "euw1-az3", - "cidr_block": "20.10.13.0/24", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-032b71cf002a07920", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-public-eu-west-1c", - "Owner": "Ric Harvey", - "name": "public--Ric Harvey-dev" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev-public-eu-west-1c", - "Owner": "Ric Harvey", - "name": "public--Ric Harvey-dev" - }, - "timeouts": null, - "vpc_id": "vpc-046cebb625b6305fc" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_vpc", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:vpc/vpc-046cebb625b6305fc", - "assign_generated_ipv6_cidr_block": false, - "cidr_block": "20.10.0.0/16", - "default_network_acl_id": "acl-033f45479f8d9d5de", - "default_route_table_id": "rtb-0cacfaa5d6ab5c41c", - "default_security_group_id": "sg-07abe149962da30c3", - "dhcp_options_id": "dopt-a93124cb", - "enable_dns_hostnames": true, - "enable_dns_support": true, - "enable_network_address_usage_metrics": false, - "id": "vpc-046cebb625b6305fc", - "instance_tenancy": "default", - "ipv4_ipam_pool_id": null, - "ipv4_netmask_length": null, - "ipv6_association_id": "", - "ipv6_cidr_block": "", - "ipv6_cidr_block_network_border_group": "", - "ipv6_ipam_pool_id": "", - "ipv6_netmask_length": 0, - "main_route_table_id": "rtb-0cacfaa5d6ab5c41c", - "owner_id": "355614969320", - "tags": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev", - "Owner": "Ric Harvey" - }, - "tags_all": { - "Environment": "dev", - "Maintainer": "Ric", - "ManagedBy": "terraform", - "Name": "Ric Harvey-dev", - "Owner": "Ric Harvey" - } - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" - } - ] - } - ], + "outputs": {}, + "resources": [], "check_results": null } diff --git a/2-simple-example/iac/terraform.tfstate.backup b/2-simple-example/iac/terraform.tfstate.backup index d10ee66..72f885e 100644 --- a/2-simple-example/iac/terraform.tfstate.backup +++ b/2-simple-example/iac/terraform.tfstate.backup @@ -1,7 +1,7 @@ { "version": 4, "terraform_version": "1.6.2", - "serial": 53, + "serial": 56, "lineage": "60a035a9-3548-3c8a-f46b-288ce030177e", "outputs": { "database_subnets": { @@ -135,8 +135,8 @@ { "schema_version": 1, "attributes": { - "ami": "ami-0a8f105ae508c43ab", - "arn": "arn:aws:ec2:eu-west-1:355614969320:instance/i-0ae6918992f5f10ab", + "ami": "ami-0f5eb0451af853a24", + "arn": "arn:aws:ec2:eu-west-1:355614969320:instance/i-05f02c343db1101a8", "associate_public_ip_address": true, "availability_zone": "eu-west-1a", "capacity_reservation_specification": [ @@ -174,7 +174,7 @@ "host_id": "", "host_resource_group_arn": null, "iam_instance_profile": "", - "id": "i-0ae6918992f5f10ab", + "id": "i-05f02c343db1101a8", "instance_initiated_shutdown_behavior": "stop", "instance_lifecycle": "", "instance_market_options": [], @@ -204,8 +204,8 @@ "password_data": "", "placement_group": "", "placement_partition_number": 0, - "primary_network_interface_id": "eni-0265997040deef568", - "private_dns": "ip-20-10-11-17.eu-west-1.compute.internal", + "primary_network_interface_id": "eni-0961360b741a4d1e7", + "private_dns": "ip-20-10-11-172.eu-west-1.compute.internal", "private_dns_name_options": [ { "enable_resource_name_dns_a_record": false, @@ -213,9 +213,9 @@ "hostname_type": "ip-name" } ], - "private_ip": "20.10.11.17", - "public_dns": "ec2-3-255-150-157.eu-west-1.compute.amazonaws.com", - "public_ip": "3.255.150.157", + "private_ip": "20.10.11.172", + "public_dns": "ec2-52-210-19-80.eu-west-1.compute.amazonaws.com", + "public_ip": "52.210.19.80", "root_block_device": [ { "delete_on_termination": true, @@ -226,7 +226,7 @@ "tags": {}, "tags_all": {}, "throughput": 0, - "volume_id": "vol-0161ba8ec437199f7", + "volume_id": "vol-0fce1ce169adac389", "volume_size": 10, "volume_type": "gp2" }