From 4f46c717467e0cd140bdd6ada794f98e882ce2a0 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 15 Apr 2024 23:33:12 +0100 Subject: [PATCH] update --- 2-simple-example/iac/.terraform.lock.hcl | 19 + 2-simple-example/iac/data.tf | 6 + 2-simple-example/iac/env/dev.tfvars | 3 + 2-simple-example/iac/locals.tf | 10 + 2-simple-example/iac/main.tf | 41 + 2-simple-example/iac/outputs.tf | 27 + 2-simple-example/iac/terraform.tfstate | 1973 +++++++++++++++++ 2-simple-example/iac/terraform.tfstate.backup | 1973 +++++++++++++++++ 2-simple-example/iac/variables.tf | 46 + 2-simple-example/iac/vpc.tf | 36 + 3-remote-states/iac/.terraform.lock.hcl | 19 + 3-remote-states/iac/data.tf | 6 + 3-remote-states/iac/env/dev.tfvars | 3 + 3-remote-states/iac/locals.tf | 10 + 3-remote-states/iac/main.tf | 41 + 3-remote-states/iac/outputs.tf | 27 + 3-remote-states/iac/terraform.tfstate | 1973 +++++++++++++++++ 3-remote-states/iac/terraform.tfstate.backup | 1973 +++++++++++++++++ 3-remote-states/iac/variables.tf | 46 + 3-remote-states/iac/vpc.tf | 36 + demo/iac/.terraform.tfstate.lock.info | 1 - demo/iac/terraform.tfstate | 1568 +------------ 22 files changed, 8270 insertions(+), 1567 deletions(-) create mode 100644 2-simple-example/iac/.terraform.lock.hcl create mode 100644 2-simple-example/iac/data.tf create mode 100644 2-simple-example/iac/env/dev.tfvars create mode 100644 2-simple-example/iac/locals.tf create mode 100644 2-simple-example/iac/main.tf create mode 100644 2-simple-example/iac/outputs.tf create mode 100644 2-simple-example/iac/terraform.tfstate create mode 100644 2-simple-example/iac/terraform.tfstate.backup create mode 100644 2-simple-example/iac/variables.tf create mode 100644 2-simple-example/iac/vpc.tf create mode 100644 3-remote-states/iac/.terraform.lock.hcl create mode 100644 3-remote-states/iac/data.tf create mode 100644 3-remote-states/iac/env/dev.tfvars create mode 100644 3-remote-states/iac/locals.tf create mode 100644 3-remote-states/iac/main.tf create mode 100644 3-remote-states/iac/outputs.tf create mode 100644 3-remote-states/iac/terraform.tfstate create mode 100644 3-remote-states/iac/terraform.tfstate.backup create mode 100644 3-remote-states/iac/variables.tf create mode 100644 3-remote-states/iac/vpc.tf delete mode 100644 demo/iac/.terraform.tfstate.lock.info diff --git a/2-simple-example/iac/.terraform.lock.hcl b/2-simple-example/iac/.terraform.lock.hcl new file mode 100644 index 0000000..e943d28 --- /dev/null +++ b/2-simple-example/iac/.terraform.lock.hcl @@ -0,0 +1,19 @@ +# This file is maintained automatically by "tofu init". +# Manual edits may be lost in future updates. + +provider "registry.opentofu.org/hashicorp/aws" { + version = "5.45.0" + hashes = [ + "h1:A8MJa+VwONA4BNO5xzeleguJbrblNLnXBImHTK/qgFg=", + "zh:1d71c406aeaf4ba762eb62e4595ab9c9f8da1a2c9b74bb4277c0acfd9678ae65", + "zh:3b00b13154eadedb37bca99bf7cbd556fa9472e6900c970effa17a270ee9f721", + "zh:6f264e8b70153925ac8abfa83ebffe2c2d5a27ab5557a6b16124269b08ac2441", + "zh:80f7d552faf5c43d7dc22c6c1f7e70557b9f01c67db07abbb0330d5d3fc0e464", + "zh:863a2a2e6ae5b42fc46b209d8f2761c882d46aca481a8c49ef221d290b4fd88e", + "zh:8e3bddeb2da7e6bcfd0b0221a083778d2f7fc5cd64f55de7d8d79bd1f7378bae", + "zh:c726104e46cd743bbf240101d7975f44091d893b6e97b46070df0041779b04d2", + "zh:db73a89b462fdd6eb6f32e6ed464430a895fc2e54fb629e8b99773fc32a6a7a8", + "zh:e35179b89eba358f521ffd4546345b4d0683ca3364a9deb8f3b7b4bf60be6f02", + "zh:e7b54a0faecd34a9c73729d1d1f0cfc1b8f56bae789f95987002616f1265ce72", + ] +} diff --git a/2-simple-example/iac/data.tf b/2-simple-example/iac/data.tf new file mode 100644 index 0000000..d03f402 --- /dev/null +++ b/2-simple-example/iac/data.tf @@ -0,0 +1,6 @@ +data "aws_availability_zones" "available" {} + +data "aws_security_group" "default" { + name = "default" + vpc_id = module.vpc.vpc_id +} diff --git a/2-simple-example/iac/env/dev.tfvars b/2-simple-example/iac/env/dev.tfvars new file mode 100644 index 0000000..307622d --- /dev/null +++ b/2-simple-example/iac/env/dev.tfvars @@ -0,0 +1,3 @@ +name = "Ric Harvey" +environment = "dev" +ami_id = "ami-0f5eb0451af853a24" diff --git a/2-simple-example/iac/locals.tf b/2-simple-example/iac/locals.tf new file mode 100644 index 0000000..522566c --- /dev/null +++ b/2-simple-example/iac/locals.tf @@ -0,0 +1,10 @@ +locals { + default_tags = merge( + var.additional_tags, + { + Maintainer = "Ric" + Owner = var.name + Environment = var.environment + ManagedBy = "terraform" + }) +} diff --git a/2-simple-example/iac/main.tf b/2-simple-example/iac/main.tf new file mode 100644 index 0000000..0e184a6 --- /dev/null +++ b/2-simple-example/iac/main.tf @@ -0,0 +1,41 @@ +provider "aws" { + region = var.region +} + + +resource "aws_security_group" "web_server_sg_tf" { + name = "web-server-sg-tf" + description = "Allow HTTP to web server" + vpc_id = module.vpc.vpc_id + +ingress { + description = "HTTP ingress" + from_port = 80 + to_port = 80 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } + +ingress { + description = "HTTPS ingress" + from_port = 443 + to_port = 443 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } + +egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } +} + +resource "aws_instance" "test_ami" { + ami = var.ami_id + instance_type = "t3.micro" + associate_public_ip_address = true + subnet_id = module.vpc.public_subnets[0] + vpc_security_group_ids = [aws_security_group.web_server_sg_tf.id] +} diff --git a/2-simple-example/iac/outputs.tf b/2-simple-example/iac/outputs.tf new file mode 100644 index 0000000..899dcc7 --- /dev/null +++ b/2-simple-example/iac/outputs.tf @@ -0,0 +1,27 @@ +# VPC +output "vpc_id" { + description = "The ID of the VPC" + value = module.vpc.vpc_id +} + +# Subnets +output "private_subnets" { + description = "List of IDs of private subnets" + value = module.vpc.private_subnets +} + +output "public_subnets" { + description = "List of IDs of public subnets" + value = module.vpc.public_subnets +} + +output "database_subnets" { + description = "List of IDs of database subnets" + value = module.vpc.database_subnets +} + +# NAT gateways +output "nat_public_ips" { + description = "List of public Elastic IPs created for AWS NAT Gateway" + value = module.vpc.nat_public_ips +} diff --git a/2-simple-example/iac/terraform.tfstate b/2-simple-example/iac/terraform.tfstate new file mode 100644 index 0000000..72f885e --- /dev/null +++ b/2-simple-example/iac/terraform.tfstate @@ -0,0 +1,1973 @@ +{ + "version": 4, + "terraform_version": "1.6.2", + "serial": 56, + "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==" + } + ] + } + ], + "check_results": null +} diff --git a/2-simple-example/iac/terraform.tfstate.backup b/2-simple-example/iac/terraform.tfstate.backup new file mode 100644 index 0000000..d10ee66 --- /dev/null +++ b/2-simple-example/iac/terraform.tfstate.backup @@ -0,0 +1,1973 @@ +{ + "version": 4, + "terraform_version": "1.6.2", + "serial": 53, + "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-0a8f105ae508c43ab", + "arn": "arn:aws:ec2:eu-west-1:355614969320:instance/i-0ae6918992f5f10ab", + "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-0ae6918992f5f10ab", + "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-0265997040deef568", + "private_dns": "ip-20-10-11-17.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.17", + "public_dns": "ec2-3-255-150-157.eu-west-1.compute.amazonaws.com", + "public_ip": "3.255.150.157", + "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-0161ba8ec437199f7", + "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==" + } + ] + } + ], + "check_results": null +} diff --git a/2-simple-example/iac/variables.tf b/2-simple-example/iac/variables.tf new file mode 100644 index 0000000..c8ac925 --- /dev/null +++ b/2-simple-example/iac/variables.tf @@ -0,0 +1,46 @@ +variable "name" { + description = "Solution name" + type = string + default = "my-vpc" +} + +variable "environment" { + description = "Execution environment" + type = string + default = "development" +} + +variable "region" { + description = "AWS region" + type = string + default = "eu-west-1" +} + +variable "private_subnet_suffix" { + description = "Suffix to append to private subnets name" + type = string + default = "private-" +} + +variable "public_subnet_suffix" { + description = "Suffix to append to public subnets name" + type = string + default = "public-" +} + +variable "database_subnet_suffix" { + description = "Suffix to append to database subnets name" + type = string + default = "rds-" +} + +variable "additional_tags" { + description = "Additional default resource tags" + type = map(string) + default = {} +} + +variable "ami_id" { + description = "ami to use for example" + type = string +} diff --git a/2-simple-example/iac/vpc.tf b/2-simple-example/iac/vpc.tf new file mode 100644 index 0000000..1562f3c --- /dev/null +++ b/2-simple-example/iac/vpc.tf @@ -0,0 +1,36 @@ +module "vpc" { + source = "terraform-aws-modules/vpc/aws" + version = "~> 3" + + name = "${var.name}-${var.environment}" + cidr = "20.10.0.0/16" # 10.0.0.0/8 is reserved for EC2-Classic + + azs = data.aws_availability_zones.available.names + private_subnets = ["20.10.1.0/24", "20.10.2.0/24", "20.10.3.0/24"] + public_subnets = ["20.10.11.0/24", "20.10.12.0/24", "20.10.13.0/24"] + database_subnets = ["20.10.21.0/24", "20.10.22.0/24", "20.10.23.0/24"] + + private_subnet_tags = { "name": "${var.private_subnet_suffix}-${var.name}-${var.environment}" } + public_subnet_tags = { "name": "${var.public_subnet_suffix}-${var.name}-${var.environment}" } + database_subnet_tags = { "name": "${var.database_subnet_suffix}-${var.name}-${var.environment}" } + + create_database_subnet_group = true + + enable_nat_gateway = true + single_nat_gateway = true + + enable_dhcp_options = false + + # Default security group - ingress/egress rules cleared to deny all + manage_default_security_group = true + default_security_group_ingress = [] + default_security_group_egress = [] + + # VPC Flow Logs (Cloudwatch log group and IAM role will be created) + enable_flow_log = true + create_flow_log_cloudwatch_log_group = true + create_flow_log_cloudwatch_iam_role = true + flow_log_max_aggregation_interval = 60 + + tags = local.default_tags +} diff --git a/3-remote-states/iac/.terraform.lock.hcl b/3-remote-states/iac/.terraform.lock.hcl new file mode 100644 index 0000000..e943d28 --- /dev/null +++ b/3-remote-states/iac/.terraform.lock.hcl @@ -0,0 +1,19 @@ +# This file is maintained automatically by "tofu init". +# Manual edits may be lost in future updates. + +provider "registry.opentofu.org/hashicorp/aws" { + version = "5.45.0" + hashes = [ + "h1:A8MJa+VwONA4BNO5xzeleguJbrblNLnXBImHTK/qgFg=", + "zh:1d71c406aeaf4ba762eb62e4595ab9c9f8da1a2c9b74bb4277c0acfd9678ae65", + "zh:3b00b13154eadedb37bca99bf7cbd556fa9472e6900c970effa17a270ee9f721", + "zh:6f264e8b70153925ac8abfa83ebffe2c2d5a27ab5557a6b16124269b08ac2441", + "zh:80f7d552faf5c43d7dc22c6c1f7e70557b9f01c67db07abbb0330d5d3fc0e464", + "zh:863a2a2e6ae5b42fc46b209d8f2761c882d46aca481a8c49ef221d290b4fd88e", + "zh:8e3bddeb2da7e6bcfd0b0221a083778d2f7fc5cd64f55de7d8d79bd1f7378bae", + "zh:c726104e46cd743bbf240101d7975f44091d893b6e97b46070df0041779b04d2", + "zh:db73a89b462fdd6eb6f32e6ed464430a895fc2e54fb629e8b99773fc32a6a7a8", + "zh:e35179b89eba358f521ffd4546345b4d0683ca3364a9deb8f3b7b4bf60be6f02", + "zh:e7b54a0faecd34a9c73729d1d1f0cfc1b8f56bae789f95987002616f1265ce72", + ] +} diff --git a/3-remote-states/iac/data.tf b/3-remote-states/iac/data.tf new file mode 100644 index 0000000..d03f402 --- /dev/null +++ b/3-remote-states/iac/data.tf @@ -0,0 +1,6 @@ +data "aws_availability_zones" "available" {} + +data "aws_security_group" "default" { + name = "default" + vpc_id = module.vpc.vpc_id +} diff --git a/3-remote-states/iac/env/dev.tfvars b/3-remote-states/iac/env/dev.tfvars new file mode 100644 index 0000000..307622d --- /dev/null +++ b/3-remote-states/iac/env/dev.tfvars @@ -0,0 +1,3 @@ +name = "Ric Harvey" +environment = "dev" +ami_id = "ami-0f5eb0451af853a24" diff --git a/3-remote-states/iac/locals.tf b/3-remote-states/iac/locals.tf new file mode 100644 index 0000000..522566c --- /dev/null +++ b/3-remote-states/iac/locals.tf @@ -0,0 +1,10 @@ +locals { + default_tags = merge( + var.additional_tags, + { + Maintainer = "Ric" + Owner = var.name + Environment = var.environment + ManagedBy = "terraform" + }) +} diff --git a/3-remote-states/iac/main.tf b/3-remote-states/iac/main.tf new file mode 100644 index 0000000..0e184a6 --- /dev/null +++ b/3-remote-states/iac/main.tf @@ -0,0 +1,41 @@ +provider "aws" { + region = var.region +} + + +resource "aws_security_group" "web_server_sg_tf" { + name = "web-server-sg-tf" + description = "Allow HTTP to web server" + vpc_id = module.vpc.vpc_id + +ingress { + description = "HTTP ingress" + from_port = 80 + to_port = 80 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } + +ingress { + description = "HTTPS ingress" + from_port = 443 + to_port = 443 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } + +egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } +} + +resource "aws_instance" "test_ami" { + ami = var.ami_id + instance_type = "t3.micro" + associate_public_ip_address = true + subnet_id = module.vpc.public_subnets[0] + vpc_security_group_ids = [aws_security_group.web_server_sg_tf.id] +} diff --git a/3-remote-states/iac/outputs.tf b/3-remote-states/iac/outputs.tf new file mode 100644 index 0000000..899dcc7 --- /dev/null +++ b/3-remote-states/iac/outputs.tf @@ -0,0 +1,27 @@ +# VPC +output "vpc_id" { + description = "The ID of the VPC" + value = module.vpc.vpc_id +} + +# Subnets +output "private_subnets" { + description = "List of IDs of private subnets" + value = module.vpc.private_subnets +} + +output "public_subnets" { + description = "List of IDs of public subnets" + value = module.vpc.public_subnets +} + +output "database_subnets" { + description = "List of IDs of database subnets" + value = module.vpc.database_subnets +} + +# NAT gateways +output "nat_public_ips" { + description = "List of public Elastic IPs created for AWS NAT Gateway" + value = module.vpc.nat_public_ips +} diff --git a/3-remote-states/iac/terraform.tfstate b/3-remote-states/iac/terraform.tfstate new file mode 100644 index 0000000..72f885e --- /dev/null +++ b/3-remote-states/iac/terraform.tfstate @@ -0,0 +1,1973 @@ +{ + "version": 4, + "terraform_version": "1.6.2", + "serial": 56, + "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==" + } + ] + } + ], + "check_results": null +} diff --git a/3-remote-states/iac/terraform.tfstate.backup b/3-remote-states/iac/terraform.tfstate.backup new file mode 100644 index 0000000..d10ee66 --- /dev/null +++ b/3-remote-states/iac/terraform.tfstate.backup @@ -0,0 +1,1973 @@ +{ + "version": 4, + "terraform_version": "1.6.2", + "serial": 53, + "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-0a8f105ae508c43ab", + "arn": "arn:aws:ec2:eu-west-1:355614969320:instance/i-0ae6918992f5f10ab", + "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-0ae6918992f5f10ab", + "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-0265997040deef568", + "private_dns": "ip-20-10-11-17.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.17", + "public_dns": "ec2-3-255-150-157.eu-west-1.compute.amazonaws.com", + "public_ip": "3.255.150.157", + "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-0161ba8ec437199f7", + "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==" + } + ] + } + ], + "check_results": null +} diff --git a/3-remote-states/iac/variables.tf b/3-remote-states/iac/variables.tf new file mode 100644 index 0000000..c8ac925 --- /dev/null +++ b/3-remote-states/iac/variables.tf @@ -0,0 +1,46 @@ +variable "name" { + description = "Solution name" + type = string + default = "my-vpc" +} + +variable "environment" { + description = "Execution environment" + type = string + default = "development" +} + +variable "region" { + description = "AWS region" + type = string + default = "eu-west-1" +} + +variable "private_subnet_suffix" { + description = "Suffix to append to private subnets name" + type = string + default = "private-" +} + +variable "public_subnet_suffix" { + description = "Suffix to append to public subnets name" + type = string + default = "public-" +} + +variable "database_subnet_suffix" { + description = "Suffix to append to database subnets name" + type = string + default = "rds-" +} + +variable "additional_tags" { + description = "Additional default resource tags" + type = map(string) + default = {} +} + +variable "ami_id" { + description = "ami to use for example" + type = string +} diff --git a/3-remote-states/iac/vpc.tf b/3-remote-states/iac/vpc.tf new file mode 100644 index 0000000..1562f3c --- /dev/null +++ b/3-remote-states/iac/vpc.tf @@ -0,0 +1,36 @@ +module "vpc" { + source = "terraform-aws-modules/vpc/aws" + version = "~> 3" + + name = "${var.name}-${var.environment}" + cidr = "20.10.0.0/16" # 10.0.0.0/8 is reserved for EC2-Classic + + azs = data.aws_availability_zones.available.names + private_subnets = ["20.10.1.0/24", "20.10.2.0/24", "20.10.3.0/24"] + public_subnets = ["20.10.11.0/24", "20.10.12.0/24", "20.10.13.0/24"] + database_subnets = ["20.10.21.0/24", "20.10.22.0/24", "20.10.23.0/24"] + + private_subnet_tags = { "name": "${var.private_subnet_suffix}-${var.name}-${var.environment}" } + public_subnet_tags = { "name": "${var.public_subnet_suffix}-${var.name}-${var.environment}" } + database_subnet_tags = { "name": "${var.database_subnet_suffix}-${var.name}-${var.environment}" } + + create_database_subnet_group = true + + enable_nat_gateway = true + single_nat_gateway = true + + enable_dhcp_options = false + + # Default security group - ingress/egress rules cleared to deny all + manage_default_security_group = true + default_security_group_ingress = [] + default_security_group_egress = [] + + # VPC Flow Logs (Cloudwatch log group and IAM role will be created) + enable_flow_log = true + create_flow_log_cloudwatch_log_group = true + create_flow_log_cloudwatch_iam_role = true + flow_log_max_aggregation_interval = 60 + + tags = local.default_tags +} diff --git a/demo/iac/.terraform.tfstate.lock.info b/demo/iac/.terraform.tfstate.lock.info deleted file mode 100644 index 53cb3f8..0000000 --- a/demo/iac/.terraform.tfstate.lock.info +++ /dev/null @@ -1 +0,0 @@ -{"ID":"1156b298-a473-5fa6-a198-84eabc580877","Operation":"OperationTypeApply","Info":"","Who":"ric@batfink","Version":"1.6.2","Created":"2024-04-15T20:40:09.835286786Z","Path":"terraform.tfstate"} \ No newline at end of file diff --git a/demo/iac/terraform.tfstate b/demo/iac/terraform.tfstate index 2bff77c..0abac90 100644 --- a/demo/iac/terraform.tfstate +++ b/demo/iac/terraform.tfstate @@ -1,1573 +1,9 @@ { "version": 4, "terraform_version": "1.6.2", - "serial": 274, + "serial": 306, "lineage": "eee76b09-c66c-0cf5-be4a-cdd9e6b807e9", "outputs": {}, - "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": "managed", - "type": "aws_ecs_service", - "name": "service", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "alarms": [], - "capacity_provider_strategy": [], - "cluster": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", - "deployment_circuit_breaker": [ - { - "enable": false, - "rollback": false - } - ], - "deployment_controller": [ - { - "type": "ECS" - } - ], - "deployment_maximum_percent": 200, - "deployment_minimum_healthy_percent": 100, - "desired_count": 1, - "enable_ecs_managed_tags": false, - "enable_execute_command": false, - "force_new_deployment": null, - "health_check_grace_period_seconds": 0, - "iam_role": "/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS", - "id": "arn:aws:ecs:eu-west-1:355614969320:service/chat-app-demo/valkey", - "launch_type": "FARGATE", - "load_balancer": [], - "name": "valkey", - "network_configuration": [ - { - "assign_public_ip": false, - "security_groups": [ - "sg-0e041494928dc0a6b" - ], - "subnets": [ - "subnet-03484242e7e025e98", - "subnet-08a36304b08dcd4df", - "subnet-0d743b4c62e3de6de" - ] - } - ], - "ordered_placement_strategy": [], - "placement_constraints": [], - "platform_version": "LATEST", - "propagate_tags": "NONE", - "scheduling_strategy": "REPLICA", - "service_connect_configuration": [ - { - "enabled": true, - "log_configuration": [], - "namespace": "chat-app-demo", - "service": [ - { - "client_alias": [ - { - "dns_name": "valkey", - "port": 6379 - } - ], - "discovery_name": "valkey", - "ingress_port_override": 0, - "port_name": "valkey", - "timeout": [], - "tls": [] - } - ] - } - ], - "service_registries": [], - "tags": {}, - "tags_all": {}, - "task_definition": "service:3", - "timeouts": null, - "triggers": {}, - "wait_for_steady_state": false - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19", - "dependencies": [ - "aws_ecs_task_definition.task", - "aws_security_group.sg", - "data.aws_availability_zones.available", - "module.ecs_cluster.aws_cloudwatch_log_group.this", - "module.ecs_cluster.aws_ecs_cluster.this", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "mode": "managed", - "type": "aws_ecs_task_definition", - "name": "task", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ecs:eu-west-1:355614969320:task-definition/service:4", - "arn_without_revision": "arn:aws:ecs:eu-west-1:355614969320:task-definition/service", - "container_definitions": "[{\"cpu\":512,\"environment\":[],\"essential\":true,\"image\":\"valkey/valkey:7.2.4-rc1-alpine\",\"memory\":1024,\"mountPoints\":[],\"name\":\"valkey\",\"portMappings\":[{\"containerPort\":6379,\"hostPort\":6379,\"name\":\"valkey\",\"protocol\":\"tcp\"}],\"systemControls\":[],\"volumesFrom\":[]}]", - "cpu": "512", - "ephemeral_storage": [], - "execution_role_arn": "", - "family": "service", - "id": "service", - "inference_accelerator": [], - "ipc_mode": "", - "memory": "1024", - "network_mode": "awsvpc", - "pid_mode": "", - "placement_constraints": [], - "proxy_configuration": [], - "requires_compatibilities": [ - "EC2", - "FARGATE" - ], - "revision": 4, - "runtime_platform": [], - "skip_destroy": false, - "tags": {}, - "tags_all": {}, - "task_role_arn": "", - "track_latest": false, - "volume": [] - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" - } - ] - }, - { - "mode": "managed", - "type": "aws_security_group", - "name": "sg", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:security-group/sg-0e041494928dc0a6b", - "description": "Managed by Terraform", - "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-0e041494928dc0a6b", - "ingress": [ - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "Port 80", - "from_port": 6379, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 6379 - }, - { - "cidr_blocks": [], - "description": "", - "from_port": 0, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "-1", - "security_groups": [], - "self": true, - "to_port": 0 - } - ], - "name": "ecs", - "name_prefix": "", - "owner_id": "355614969320", - "revoke_rules_on_delete": false, - "tags": {}, - "tags_all": {}, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", - "dependencies": [ - "module.vpc.aws_vpc.this" - ] - } - ] - }, - { - "mode": "managed", - "type": "aws_service_discovery_http_namespace", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "arn": "arn:aws:servicediscovery:eu-west-1:355614969320:namespace/ns-7exezy2cesetek5e", - "description": "CloudMap namespace for chat-app-demo", - "http_name": "chat-app-demo", - "id": "ns-7exezy2cesetek5e", - "name": "chat-app-demo", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - } - ] - }, - { - "module": "module.alb", - "mode": "managed", - "type": "aws_lb_target_group", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": "ex_ecs", - "schema_version": 0, - "attributes": { - "arn": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:targetgroup/tf-20240415175838841400000009/035dee14007ac0e1", - "arn_suffix": "targetgroup/tf-20240415175838841400000009/035dee14007ac0e1", - "connection_termination": null, - "deregistration_delay": "5", - "health_check": [ - { - "enabled": true, - "healthy_threshold": 5, - "interval": 30, - "matcher": "200", - "path": "/", - "port": "traffic-port", - "protocol": "HTTP", - "timeout": 5, - "unhealthy_threshold": 2 - } - ], - "id": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:targetgroup/tf-20240415175838841400000009/035dee14007ac0e1", - "ip_address_type": "ipv4", - "lambda_multi_value_headers_enabled": false, - "load_balancer_arns": [ - "arn:aws:elasticloadbalancing:eu-west-1:355614969320:loadbalancer/app/chat-app-demo/9cf8ea90daa21fc1" - ], - "load_balancing_algorithm_type": "round_robin", - "load_balancing_anomaly_mitigation": "off", - "load_balancing_cross_zone_enabled": "true", - "name": "tf-20240415175838841400000009", - "name_prefix": "tf-", - "port": 80, - "preserve_client_ip": null, - "protocol": "HTTP", - "protocol_version": "HTTP1", - "proxy_protocol_v2": false, - "slow_start": 0, - "stickiness": [ - { - "cookie_duration": 86400, - "cookie_name": "", - "enabled": false, - "type": "lb_cookie" - } - ], - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "target_failover": [ - { - "on_deregistration": null, - "on_unhealthy": null - } - ], - "target_health_state": [ - { - "enable_unhealthy_connection_termination": null - } - ], - "target_type": "ip", - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.vpc.aws_vpc.this" - ], - "create_before_destroy": true - } - ] - }, - { - "module": "module.alb", - "mode": "managed", - "type": "aws_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-062ee908d87078647", - "description": "Security group for chat-app-demo application load balancer", - "egress": [ - { - "cidr_blocks": [ - "10.0.0.0/16" - ], - "description": "", - "from_port": 0, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "-1", - "security_groups": [], - "self": false, - "to_port": 0 - } - ], - "id": "sg-062ee908d87078647", - "ingress": [ - { - "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": "chat-app-demo-2024041517583920720000000a", - "name_prefix": "chat-app-demo-", - "owner_id": "355614969320", - "revoke_rules_on_delete": false, - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", - "dependencies": [ - "module.vpc.aws_vpc.this" - ], - "create_before_destroy": true - } - ] - }, - { - "module": "module.ecs_cluster", - "mode": "managed", - "type": "aws_cloudwatch_log_group", - "name": "this", - "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/ecs/chat-app-demo", - "id": "/aws/ecs/chat-app-demo", - "kms_key_id": "", - "log_group_class": "STANDARD", - "name": "/aws/ecs/chat-app-demo", - "name_prefix": "", - "retention_in_days": 90, - "skip_destroy": false, - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - } - ] - }, - { - "module": "module.ecs_cluster", - "mode": "managed", - "type": "aws_ecs_cluster", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", - "configuration": [ - { - "execute_command_configuration": [ - { - "kms_key_id": "", - "log_configuration": [], - "logging": "DEFAULT" - } - ] - } - ], - "id": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", - "name": "chat-app-demo", - "service_connect_defaults": [], - "setting": [ - { - "name": "containerInsights", - "value": "enabled" - } - ], - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ecs_cluster.aws_cloudwatch_log_group.this" - ] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_caller_identity", - "name": "current", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "account_id": "355614969320", - "arn": "arn:aws:iam::355614969320:user/rharvey", - "id": "355614969320", - "user_id": "AIDAIICBK3Q64EOQBD5HM" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_ecs_task_definition", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo:11", - "arn_without_revision": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo", - "execution_role_arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826752300000004", - "family": "chat-app-demo", - "id": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo:11", - "network_mode": "awsvpc", - "revision": 11, - "status": "ACTIVE", - "task_definition": "chat-app-demo", - "task_role_arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826751700000003" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_iam_policy_document", - "name": "task_exec_assume", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "id": "2291109037", - "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"ECSTaskExecutionAssumeRole\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ecs-tasks.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": [ - "ecs-tasks.amazonaws.com" - ], - "type": "Service" - } - ], - "resources": [], - "sid": "ECSTaskExecutionAssumeRole" - } - ], - "version": "2012-10-17" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_iam_policy_document", - "name": "tasks_assume", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "id": "780565365", - "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"ECSTasksAssumeRole\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ecs-tasks.amazonaws.com\"\n },\n \"Condition\": {\n \"ArnLike\": {\n \"aws:SourceArn\": \"arn:aws:ecs:eu-west-1:355614969320:*\"\n },\n \"StringEquals\": {\n \"aws:SourceAccount\": \"355614969320\"\n }\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": [ - { - "test": "ArnLike", - "values": [ - "arn:aws:ecs:eu-west-1:355614969320:*" - ], - "variable": "aws:SourceArn" - }, - { - "test": "StringEquals", - "values": [ - "355614969320" - ], - "variable": "aws:SourceAccount" - } - ], - "effect": "Allow", - "not_actions": [], - "not_principals": [], - "not_resources": [], - "principals": [ - { - "identifiers": [ - "ecs-tasks.amazonaws.com" - ], - "type": "Service" - } - ], - "resources": [], - "sid": "ECSTasksAssumeRole" - } - ], - "version": "2012-10-17" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_partition", - "name": "current", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "dns_suffix": "amazonaws.com", - "id": "aws", - "partition": "aws", - "reverse_dns_prefix": "com.amazonaws" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_region", - "name": "current", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "description": "Europe (Ireland)", - "endpoint": "ec2.eu-west-1.amazonaws.com", - "id": "eu-west-1", - "name": "eu-west-1" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_subnet", - "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:subnet/subnet-0d743b4c62e3de6de", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1a", - "availability_zone_id": "euw1-az1", - "available_ip_address_count": 4091, - "cidr_block": "10.0.0.0/20", - "customer_owned_ipv4_pool": "", - "default_for_az": false, - "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, - "filter": null, - "id": "subnet-0d743b4c62e3de6de", - "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", - "state": "available", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_ecs_service", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "alarms": [], - "capacity_provider_strategy": [], - "cluster": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", - "deployment_circuit_breaker": [ - { - "enable": false, - "rollback": false - } - ], - "deployment_controller": [ - { - "type": "ECS" - } - ], - "deployment_maximum_percent": 200, - "deployment_minimum_healthy_percent": 66, - "desired_count": 1, - "enable_ecs_managed_tags": true, - "enable_execute_command": true, - "force_new_deployment": true, - "health_check_grace_period_seconds": 0, - "iam_role": "/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS", - "id": "arn:aws:ecs:eu-west-1:355614969320:service/chat-app-demo/chat-app-demo", - "launch_type": "FARGATE", - "load_balancer": [ - { - "container_name": "chat-app", - "container_port": 3000, - "elb_name": "", - "target_group_arn": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:targetgroup/tf-20240415175838841400000009/035dee14007ac0e1" - } - ], - "name": "chat-app-demo", - "network_configuration": [ - { - "assign_public_ip": false, - "security_groups": [ - "sg-05ad2646d8cc5f4a3" - ], - "subnets": [ - "subnet-03484242e7e025e98", - "subnet-08a36304b08dcd4df", - "subnet-0d743b4c62e3de6de" - ] - } - ], - "ordered_placement_strategy": [], - "placement_constraints": [], - "platform_version": "LATEST", - "propagate_tags": "NONE", - "scheduling_strategy": "REPLICA", - "service_connect_configuration": [ - { - "enabled": true, - "log_configuration": [], - "namespace": "arn:aws:servicediscovery:eu-west-1:355614969320:namespace/ns-7exezy2cesetek5e", - "service": [ - { - "client_alias": [ - { - "dns_name": "chat-app", - "port": 3000 - } - ], - "discovery_name": "chat-app", - "ingress_port_override": 0, - "port_name": "chat-app", - "timeout": [], - "tls": [] - } - ] - } - ], - "service_registries": [], - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "ServiceTag": "Tag on service level" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "ServiceTag": "Tag on service level" - }, - "task_definition": "chat-app-demo:11", - "timeouts": { - "create": null, - "delete": null, - "update": null - }, - "triggers": {}, - "wait_for_steady_state": false - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19", - "dependencies": [ - "aws_service_discovery_http_namespace.this", - "data.aws_availability_zones.available", - "module.alb.aws_lb_target_group.this", - "module.ecs_cluster.aws_cloudwatch_log_group.this", - "module.ecs_cluster.aws_ecs_cluster.this", - "module.ecs_service.aws_ecs_task_definition.this", - "module.ecs_service.aws_iam_policy.service", - "module.ecs_service.aws_iam_role.service", - "module.ecs_service.aws_iam_role.task_exec", - "module.ecs_service.aws_iam_role.tasks", - "module.ecs_service.aws_iam_role_policy_attachment.service", - "module.ecs_service.aws_security_group.this", - "module.ecs_service.data.aws_caller_identity.current", - "module.ecs_service.data.aws_ecs_task_definition.this", - "module.ecs_service.data.aws_iam_policy_document.service", - "module.ecs_service.data.aws_iam_policy_document.service_assume", - "module.ecs_service.data.aws_iam_policy_document.task_exec_assume", - "module.ecs_service.data.aws_iam_policy_document.tasks_assume", - "module.ecs_service.data.aws_partition.current", - "module.ecs_service.data.aws_region.current", - "module.ecs_service.data.aws_subnet.this", - "module.ecs_service.module.container_definition.aws_cloudwatch_log_group.this", - "module.ecs_service.module.container_definition.data.aws_region.current", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_ecs_task_definition", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo:11", - "arn_without_revision": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo", - "container_definitions": "[{\"cpu\":512,\"environment\":[{\"name\":\"REDIS_ENDPOINT\",\"value\":\"valkey\"}],\"essential\":true,\"image\":\"richarvey/chat-app:latest\",\"interactive\":false,\"linuxParameters\":{\"initProcessEnabled\":true},\"logConfiguration\":{\"logDriver\":\"awslogs\",\"options\":{\"awslogs-group\":\"/aws/ecs/chat-app-demo/chat-app\",\"awslogs-region\":\"eu-west-1\",\"awslogs-stream-prefix\":\"ecs\"}},\"memory\":1024,\"memoryReservation\":100,\"mountPoints\":[],\"name\":\"chat-app\",\"portMappings\":[{\"containerPort\":3000,\"hostPort\":3000,\"name\":\"chat-app\",\"protocol\":\"tcp\"}],\"privileged\":false,\"pseudoTerminal\":false,\"readonlyRootFilesystem\":true,\"startTimeout\":30,\"stopTimeout\":120,\"systemControls\":[],\"user\":\"0\",\"volumesFrom\":[]}]", - "cpu": "1024", - "ephemeral_storage": [], - "execution_role_arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826752300000004", - "family": "chat-app-demo", - "id": "chat-app-demo", - "inference_accelerator": [], - "ipc_mode": "", - "memory": "4096", - "network_mode": "awsvpc", - "pid_mode": "", - "placement_constraints": [], - "proxy_configuration": [], - "requires_compatibilities": [ - "FARGATE" - ], - "revision": 11, - "runtime_platform": [ - { - "cpu_architecture": "X86_64", - "operating_system_family": "LINUX" - } - ], - "skip_destroy": false, - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "task_role_arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826751700000003", - "track_latest": false, - "volume": [] - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", - "dependencies": [ - "module.ecs_service.aws_iam_role.task_exec", - "module.ecs_service.aws_iam_role.tasks", - "module.ecs_service.data.aws_caller_identity.current", - "module.ecs_service.data.aws_iam_policy_document.task_exec_assume", - "module.ecs_service.data.aws_iam_policy_document.tasks_assume", - "module.ecs_service.data.aws_partition.current", - "module.ecs_service.data.aws_region.current", - "module.ecs_service.module.container_definition.aws_cloudwatch_log_group.this", - "module.ecs_service.module.container_definition.data.aws_region.current" - ], - "create_before_destroy": true - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_iam_role", - "name": "task_exec", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826752300000004", - "assume_role_policy": "{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"ecs-tasks.amazonaws.com\"},\"Sid\":\"ECSTaskExecutionAssumeRole\"}],\"Version\":\"2012-10-17\"}", - "create_date": "2024-04-15T17:58:27Z", - "description": "Task execution role for chat-app-demo", - "force_detach_policies": true, - "id": "chat-app-demo-20240415175826752300000004", - "inline_policy": [], - "managed_policy_arns": [ - "arn:aws:iam::355614969320:policy/chat-app-demo-20240415175826751600000002" - ], - "max_session_duration": 3600, - "name": "chat-app-demo-20240415175826752300000004", - "name_prefix": "chat-app-demo-", - "path": "/", - "permissions_boundary": "", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "unique_id": "AROAVFTCNZXUE6COZ2VQP" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ecs_service.data.aws_iam_policy_document.task_exec_assume" - ], - "create_before_destroy": true - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_iam_role", - "name": "tasks", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826751700000003", - "assume_role_policy": "{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Condition\":{\"ArnLike\":{\"aws:SourceArn\":\"arn:aws:ecs:eu-west-1:355614969320:*\"},\"StringEquals\":{\"aws:SourceAccount\":\"355614969320\"}},\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"ecs-tasks.amazonaws.com\"},\"Sid\":\"ECSTasksAssumeRole\"}],\"Version\":\"2012-10-17\"}", - "create_date": "2024-04-15T17:58:27Z", - "description": "", - "force_detach_policies": true, - "id": "chat-app-demo-20240415175826751700000003", - "inline_policy": [ - { - "name": "chat-app-demo-20240415175827755900000005", - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"ssmmessages:OpenDataChannel\",\"ssmmessages:OpenControlChannel\",\"ssmmessages:CreateDataChannel\",\"ssmmessages:CreateControlChannel\"],\"Effect\":\"Allow\",\"Resource\":\"*\",\"Sid\":\"ECSExec\"}]}" - } - ], - "managed_policy_arns": [], - "max_session_duration": 3600, - "name": "chat-app-demo-20240415175826751700000003", - "name_prefix": "chat-app-demo-", - "path": "/", - "permissions_boundary": "", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "unique_id": "AROAVFTCNZXUKB5TCDIJT" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ecs_service.data.aws_caller_identity.current", - "module.ecs_service.data.aws_iam_policy_document.tasks_assume", - "module.ecs_service.data.aws_partition.current", - "module.ecs_service.data.aws_region.current" - ], - "create_before_destroy": true - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_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-05ad2646d8cc5f4a3", - "description": "Managed by Terraform", - "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-05ad2646d8cc5f4a3", - "ingress": [ - { - "cidr_blocks": [], - "description": "Service port", - "from_port": 3000, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [ - "sg-062ee908d87078647" - ], - "self": false, - "to_port": 3000 - } - ], - "name": "chat-app-demo-2024041517583976900000000b", - "name_prefix": "chat-app-demo-", - "owner_id": "355614969320", - "revoke_rules_on_delete": false, - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", - "dependencies": [ - "data.aws_availability_zones.available", - "module.ecs_service.data.aws_subnet.this", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ], - "create_before_destroy": true - } - ] - }, - { - "module": "module.ecs_service.module.container_definition[\"chat-app\"]", - "mode": "data", - "type": "aws_region", - "name": "current", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "description": "Europe (Ireland)", - "endpoint": "ec2.eu-west-1.amazonaws.com", - "id": "eu-west-1", - "name": "eu-west-1" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service.module.container_definition[\"chat-app\"]", - "mode": "managed", - "type": "aws_cloudwatch_log_group", - "name": "this", - "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/ecs/chat-app-demo/chat-app", - "id": "/aws/ecs/chat-app-demo/chat-app", - "kms_key_id": "", - "log_group_class": "STANDARD", - "name": "/aws/ecs/chat-app-demo/chat-app", - "name_prefix": "", - "retention_in_days": 14, - "skip_destroy": false, - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "create_before_destroy": true - } - ] - }, - { - "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-0c25b6348ee8d15d3", - "id": "igw-0c25b6348ee8d15d3", - "owner_id": "355614969320", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19", - "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-0d743b4c62e3de6de", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1a", - "availability_zone_id": "euw1-az1", - "cidr_block": "10.0.0.0/20", - "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-0d743b4c62e3de6de", - "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": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ], - "create_before_destroy": true - }, - { - "index_key": 1, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-08a36304b08dcd4df", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1b", - "availability_zone_id": "euw1-az2", - "cidr_block": "10.0.16.0/20", - "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-08a36304b08dcd4df", - "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": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ], - "create_before_destroy": true - }, - { - "index_key": 2, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-03484242e7e025e98", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1c", - "availability_zone_id": "euw1-az3", - "cidr_block": "10.0.32.0/20", - "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-03484242e7e025e98", - "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": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ], - "create_before_destroy": true - } - ] - }, - { - "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-08c4d0f2a7397c568", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1a", - "availability_zone_id": "euw1-az1", - "cidr_block": "10.0.48.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-08c4d0f2a7397c568", - "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": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "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-020b69a138405c937", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1b", - "availability_zone_id": "euw1-az2", - "cidr_block": "10.0.49.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-020b69a138405c937", - "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": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "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-0b0690ac033109c33", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1c", - "availability_zone_id": "euw1-az3", - "cidr_block": "10.0.50.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-0b0690ac033109c33", - "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": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "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-036c1349ddd4a46ce", - "assign_generated_ipv6_cidr_block": false, - "cidr_block": "10.0.0.0/16", - "default_network_acl_id": "acl-031a5e6f57caa75df", - "default_route_table_id": "rtb-0c6af805470c20114", - "default_security_group_id": "sg-015ea6038f4f7ff71", - "dhcp_options_id": "dopt-a93124cb", - "enable_dns_hostnames": true, - "enable_dns_support": true, - "enable_network_address_usage_metrics": false, - "id": "vpc-036c1349ddd4a46ce", - "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-0c6af805470c20114", - "owner_id": "355614969320", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - } - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", - "create_before_destroy": true - } - ] - } - ], + "resources": [], "check_results": null }