From e6570e9453e836bc86b71ece96e2419654ece7bd Mon Sep 17 00:00:00 2001 From: Chandra Reddy Date: Fri, 16 Aug 2024 16:15:10 -0400 Subject: [PATCH] remove apprunner from infrastructure --- infrastructure/05_apprunner.tf | 91 ---- infrastructure/terraform.tfstate | 607 +++++++++++++++++++++++- infrastructure/terraform.tfstate.backup | 351 +++----------- 3 files changed, 674 insertions(+), 375 deletions(-) delete mode 100644 infrastructure/05_apprunner.tf diff --git a/infrastructure/05_apprunner.tf b/infrastructure/05_apprunner.tf deleted file mode 100644 index b2add61..0000000 --- a/infrastructure/05_apprunner.tf +++ /dev/null @@ -1,91 +0,0 @@ -resource "aws_apprunner_service" "app_services" { - for_each = { for combo in local.app_env_list : "${combo.app}-${combo.env}" => combo } - - service_name = "${each.value.app}-${each.value.env}-service" - - source_configuration { - image_repository { - image_configuration { - port = "8000" - } - image_identifier = "654654512735.dkr.ecr.us-east-1.amazonaws.com/${each.value.app}-${each.value.env}:latest" - image_repository_type = "ECR" - } - - authentication_configuration { - access_role_arn = aws_iam_role.apprunner_role.arn - } - } - - instance_configuration { - cpu = "1024" - memory = "2048" - } - - auto_scaling_configuration_arn = aws_apprunner_auto_scaling_configuration_version.app_scaling.arn - - tags = { - Environment = each.value.env - Application = each.value.app - } - - depends_on = [ - aws_ecr_repository.app_repos - ] -} - -resource "aws_iam_role" "apprunner_role" { - name = "apprunner-access-role" - - assume_role_policy = jsonencode({ - Version = "2012-10-17", - Statement = [ - { - Effect = "Allow", - Principal = { - Service = "build.apprunner.amazonaws.com" - }, - Action = "sts:AssumeRole" - }, - ] - }) -} - - -resource "aws_iam_policy" "ecr_access_policy" { - name = "apprunner-ecr-access-policy" - - policy = jsonencode({ - Version = "2012-10-17", - Statement = [ - { - Effect = "Allow", - Action = [ - "ecr:GetDownloadUrlForLayer", - "ecr:BatchGetImage", - "ecr:BatchCheckLayerAvailability" - ], - Resource = "*" - }, - { - Effect = "Allow", - Action = "ecr:GetAuthorizationToken", - Resource = "*" - } - ] - }) -} - -resource "aws_iam_role_policy_attachment" "apprunner_ecr_policy_attach" { - role = aws_iam_role.apprunner_role.name - policy_arn = aws_iam_policy.ecr_access_policy.arn -} - -resource "aws_apprunner_auto_scaling_configuration_version" "app_scaling" { - auto_scaling_configuration_name = "app-scaling-config" - - max_concurrency = 100 - max_size = 3 - min_size = 1 -} - diff --git a/infrastructure/terraform.tfstate b/infrastructure/terraform.tfstate index afc25dc..2a616a3 100644 --- a/infrastructure/terraform.tfstate +++ b/infrastructure/terraform.tfstate @@ -1,9 +1,612 @@ { "version": 4, "terraform_version": "1.7.2", - "serial": 91, + "serial": 95, "lineage": "54543b65-0785-73d9-c782-458033890453", "outputs": {}, - "resources": [], + "resources": [ + { + "mode": "managed", + "type": "aws_db_instance", + "name": "default", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 2, + "attributes": { + "address": "cm-appfolio-db.c9o06ok6uz10.us-east-1.rds.amazonaws.com", + "allocated_storage": 20, + "allow_major_version_upgrade": null, + "apply_immediately": false, + "arn": "arn:aws:rds:us-east-1:654654512735:db:cm-appfolio-db", + "auto_minor_version_upgrade": true, + "availability_zone": "us-east-1c", + "backup_retention_period": 0, + "backup_target": "region", + "backup_window": "08:32-09:02", + "blue_green_update": [], + "ca_cert_identifier": "rds-ca-rsa2048-g1", + "character_set_name": "", + "copy_tags_to_snapshot": false, + "custom_iam_instance_profile": "", + "customer_owned_ip_enabled": false, + "db_name": "", + "db_subnet_group_name": "default-subnet-group", + "dedicated_log_volume": false, + "delete_automated_backups": true, + "deletion_protection": false, + "domain": "", + "domain_auth_secret_arn": "", + "domain_dns_ips": [], + "domain_fqdn": "", + "domain_iam_role_name": "", + "domain_ou": "", + "enabled_cloudwatch_logs_exports": [], + "endpoint": "cm-appfolio-db.c9o06ok6uz10.us-east-1.rds.amazonaws.com:3306", + "engine": "mysql", + "engine_lifecycle_support": "open-source-rds-extended-support", + "engine_version": "8.0", + "engine_version_actual": "8.0.35", + "final_snapshot_identifier": null, + "hosted_zone_id": "Z2R2ITUGPM61AM", + "iam_database_authentication_enabled": false, + "id": "db-3FO5VQHD4UREN6JAF26DLRWTMI", + "identifier": "cm-appfolio-db", + "identifier_prefix": "", + "instance_class": "db.t3.micro", + "iops": 0, + "kms_key_id": "", + "latest_restorable_time": "", + "license_model": "general-public-license", + "listener_endpoint": [], + "maintenance_window": "fri:04:11-fri:04:41", + "manage_master_user_password": null, + "master_user_secret": [], + "master_user_secret_kms_key_id": null, + "max_allocated_storage": 0, + "monitoring_interval": 0, + "monitoring_role_arn": "", + "multi_az": false, + "nchar_character_set_name": "", + "network_type": "IPV4", + "option_group_name": "default:mysql-8-0", + "parameter_group_name": "default.mysql8.0", + "password": "ASasdf234Thjafh9o23ASpokl", + "performance_insights_enabled": false, + "performance_insights_kms_key_id": "", + "performance_insights_retention_period": 0, + "port": 3306, + "publicly_accessible": true, + "replica_mode": "", + "replicas": [], + "replicate_source_db": "", + "resource_id": "db-3FO5VQHD4UREN6JAF26DLRWTMI", + "restore_to_point_in_time": [], + "s3_import": [], + "skip_final_snapshot": true, + "snapshot_identifier": null, + "status": "available", + "storage_encrypted": false, + "storage_throughput": 0, + "storage_type": "gp2", + "tags": {}, + "tags_all": {}, + "timeouts": null, + "timezone": "", + "upgrade_storage_config": null, + "username": "admin", + "vpc_security_group_ids": [ + "sg-0374fb2baff964fb0" + ] + }, + "sensitive_attributes": [ + [ + { + "type": "get_attr", + "value": "password" + } + ] + ], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoyNDAwMDAwMDAwMDAwLCJkZWxldGUiOjM2MDAwMDAwMDAwMDAsInVwZGF0ZSI6NDgwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMiJ9", + "dependencies": [ + "aws_db_subnet_group.default", + "aws_security_group.rds_sg", + "aws_subnet.alternative", + "aws_subnet.main", + "aws_vpc.main" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_db_subnet_group", + "name": "default", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:rds:us-east-1:654654512735:subgrp:default-subnet-group", + "description": "Managed by Terraform", + "id": "default-subnet-group", + "name": "default-subnet-group", + "name_prefix": "", + "subnet_ids": [ + "subnet-05984c6c711f17fff", + "subnet-0d65101fe65afe6b0" + ], + "supported_network_types": [ + "IPV4" + ], + "tags": {}, + "tags_all": {}, + "vpc_id": "vpc-01c8998b8cc7af9b5" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_subnet.alternative", + "aws_subnet.main", + "aws_vpc.main" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_ecr_repository", + "name": "app_repos", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": "announcements-dev", + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ecr:us-east-1:654654512735:repository/announcements-dev", + "encryption_configuration": [ + { + "encryption_type": "AES256", + "kms_key": "" + } + ], + "force_delete": true, + "id": "announcements-dev", + "image_scanning_configuration": [ + { + "scan_on_push": false + } + ], + "image_tag_mutability": "MUTABLE", + "name": "announcements-dev", + "registry_id": "654654512735", + "repository_url": "654654512735.dkr.ecr.us-east-1.amazonaws.com/announcements-dev", + "tags": {}, + "tags_all": {}, + "timeouts": null + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxMjAwMDAwMDAwMDAwfX0=" + }, + { + "index_key": "announcements-prod", + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ecr:us-east-1:654654512735:repository/announcements-prod", + "encryption_configuration": [ + { + "encryption_type": "AES256", + "kms_key": "" + } + ], + "force_delete": true, + "id": "announcements-prod", + "image_scanning_configuration": [ + { + "scan_on_push": false + } + ], + "image_tag_mutability": "MUTABLE", + "name": "announcements-prod", + "registry_id": "654654512735", + "repository_url": "654654512735.dkr.ecr.us-east-1.amazonaws.com/announcements-prod", + "tags": {}, + "tags_all": {}, + "timeouts": null + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxMjAwMDAwMDAwMDAwfX0=" + }, + { + "index_key": "announcements-qa", + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ecr:us-east-1:654654512735:repository/announcements-qa", + "encryption_configuration": [ + { + "encryption_type": "AES256", + "kms_key": "" + } + ], + "force_delete": true, + "id": "announcements-qa", + "image_scanning_configuration": [ + { + "scan_on_push": false + } + ], + "image_tag_mutability": "MUTABLE", + "name": "announcements-qa", + "registry_id": "654654512735", + "repository_url": "654654512735.dkr.ecr.us-east-1.amazonaws.com/announcements-qa", + "tags": {}, + "tags_all": {}, + "timeouts": null + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxMjAwMDAwMDAwMDAwfX0=" + } + ] + }, + { + "mode": "managed", + "type": "aws_internet_gateway", + "name": "main", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:us-east-1:654654512735:internet-gateway/igw-066aaa71b99296e33", + "id": "igw-066aaa71b99296e33", + "owner_id": "654654512735", + "tags": {}, + "tags_all": {}, + "timeouts": null, + "vpc_id": "vpc-01c8998b8cc7af9b5" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19", + "dependencies": [ + "aws_vpc.main" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_route_table", + "name": "public", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:us-east-1:654654512735:route-table/rtb-0d987e6386074c445", + "id": "rtb-0d987e6386074c445", + "owner_id": "654654512735", + "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-066aaa71b99296e33", + "ipv6_cidr_block": "", + "local_gateway_id": "", + "nat_gateway_id": "", + "network_interface_id": "", + "transit_gateway_id": "", + "vpc_endpoint_id": "", + "vpc_peering_connection_id": "" + } + ], + "tags": {}, + "tags_all": {}, + "timeouts": null, + "vpc_id": "vpc-01c8998b8cc7af9b5" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", + "dependencies": [ + "aws_internet_gateway.main", + "aws_vpc.main" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_route_table_association", + "name": "subnet_association", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "gateway_id": "", + "id": "rtbassoc-01e3dbe9b3715e08d", + "route_table_id": "rtb-0d987e6386074c445", + "subnet_id": "subnet-05984c6c711f17fff", + "timeouts": null + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", + "dependencies": [ + "aws_internet_gateway.main", + "aws_route_table.public", + "aws_subnet.main", + "aws_vpc.main" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_route_table_association", + "name": "subnet_association_alt", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "gateway_id": "", + "id": "rtbassoc-0c9a01bf7f187a77c", + "route_table_id": "rtb-0d987e6386074c445", + "subnet_id": "subnet-0d65101fe65afe6b0", + "timeouts": null + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", + "dependencies": [ + "aws_internet_gateway.main", + "aws_route_table.public", + "aws_subnet.alternative", + "aws_vpc.main" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_security_group", + "name": "rds_sg", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-east-1:654654512735:security-group/sg-0374fb2baff964fb0", + "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-0374fb2baff964fb0", + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 3306, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 3306 + } + ], + "name": "terraform-20240816200841235000000002", + "name_prefix": "terraform-", + "owner_id": "654654512735", + "revoke_rules_on_delete": false, + "tags": {}, + "tags_all": {}, + "timeouts": null, + "vpc_id": "vpc-01c8998b8cc7af9b5" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", + "dependencies": [ + "aws_vpc.main" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_subnet", + "name": "alternative", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-east-1:654654512735:subnet/subnet-0d65101fe65afe6b0", + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-east-1b", + "availability_zone_id": "use1-az2", + "cidr_block": "10.0.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-0d65101fe65afe6b0", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": true, + "outpost_arn": "", + "owner_id": "654654512735", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": {}, + "tags_all": {}, + "timeouts": null, + "vpc_id": "vpc-01c8998b8cc7af9b5" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "aws_vpc.main" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_subnet", + "name": "main", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-east-1:654654512735:subnet/subnet-05984c6c711f17fff", + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-east-1c", + "availability_zone_id": "use1-az4", + "cidr_block": "10.0.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-05984c6c711f17fff", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": true, + "outpost_arn": "", + "owner_id": "654654512735", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": {}, + "tags_all": {}, + "timeouts": null, + "vpc_id": "vpc-01c8998b8cc7af9b5" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "aws_vpc.main" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_vpc", + "name": "main", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-east-1:654654512735:vpc/vpc-01c8998b8cc7af9b5", + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "10.0.0.0/16", + "default_network_acl_id": "acl-01ce7e2c4e0c638be", + "default_route_table_id": "rtb-0a4606ca11d004b7d", + "default_security_group_id": "sg-0133a3e8a1008b121", + "dhcp_options_id": "dopt-0448c905aa54596ac", + "enable_dns_hostnames": true, + "enable_dns_support": true, + "enable_network_address_usage_metrics": false, + "id": "vpc-01c8998b8cc7af9b5", + "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-0a4606ca11d004b7d", + "owner_id": "654654512735", + "tags": {}, + "tags_all": {} + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" + } + ] + }, + { + "mode": "managed", + "type": "null_resource", + "name": "create_databases", + "provider": "provider[\"registry.opentofu.org/hashicorp/null\"]", + "instances": [ + { + "index_key": "announcements-dev", + "schema_version": 0, + "attributes": { + "id": "1825374920776603513", + "triggers": null + }, + "sensitive_attributes": [], + "dependencies": [ + "aws_db_instance.default", + "aws_db_subnet_group.default", + "aws_security_group.rds_sg", + "aws_subnet.alternative", + "aws_subnet.main", + "aws_vpc.main" + ] + }, + { + "index_key": "announcements-prod", + "schema_version": 0, + "attributes": { + "id": "4068045178261638631", + "triggers": null + }, + "sensitive_attributes": [], + "dependencies": [ + "aws_db_instance.default", + "aws_db_subnet_group.default", + "aws_security_group.rds_sg", + "aws_subnet.alternative", + "aws_subnet.main", + "aws_vpc.main" + ] + }, + { + "index_key": "announcements-qa", + "schema_version": 0, + "attributes": { + "id": "8095755812362962033", + "triggers": null + }, + "sensitive_attributes": [], + "dependencies": [ + "aws_db_instance.default", + "aws_db_subnet_group.default", + "aws_security_group.rds_sg", + "aws_subnet.alternative", + "aws_subnet.main", + "aws_vpc.main" + ] + } + ] + } + ], "check_results": null } diff --git a/infrastructure/terraform.tfstate.backup b/infrastructure/terraform.tfstate.backup index d9b2305..eed5d6d 100644 --- a/infrastructure/terraform.tfstate.backup +++ b/infrastructure/terraform.tfstate.backup @@ -1,7 +1,7 @@ { "version": 4, "terraform_version": "1.7.2", - "serial": 88, + "serial": 94, "lineage": "54543b65-0785-73d9-c782-458033890453", "outputs": {}, "resources": [ @@ -14,18 +14,18 @@ { "schema_version": 0, "attributes": { - "arn": "arn:aws:apprunner:us-east-1:654654512735:autoscalingconfiguration/app-scaling-config/2/d1017023a0f74724b84fefcc16d2c679", + "arn": "arn:aws:apprunner:us-east-1:654654512735:autoscalingconfiguration/app-scaling-config/2/0ee09728b5ab4bd19512cadd7f423442", "auto_scaling_configuration_name": "app-scaling-config", "auto_scaling_configuration_revision": 2, - "has_associated_service": true, - "id": "arn:aws:apprunner:us-east-1:654654512735:autoscalingconfiguration/app-scaling-config/2/d1017023a0f74724b84fefcc16d2c679", + "has_associated_service": false, + "id": "arn:aws:apprunner:us-east-1:654654512735:autoscalingconfiguration/app-scaling-config/2/0ee09728b5ab4bd19512cadd7f423442", "is_default": false, "latest": true, "max_concurrency": 100, "max_size": 3, "min_size": 1, "status": "active", - "tags": {}, + "tags": null, "tags_all": {} }, "sensitive_attributes": [], @@ -33,212 +33,6 @@ } ] }, - { - "mode": "managed", - "type": "aws_apprunner_service", - "name": "app_services", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": "announcements-dev", - "status": "tainted", - "schema_version": 0, - "attributes": { - "arn": null, - "auto_scaling_configuration_arn": "arn:aws:apprunner:us-east-1:654654512735:autoscalingconfiguration/app-scaling-config/2/d1017023a0f74724b84fefcc16d2c679", - "encryption_configuration": [], - "health_check_configuration": null, - "id": "arn:aws:apprunner:us-east-1:654654512735:service/announcements-dev-service/f2f9aac6114348da8f62b2cd87c25f43", - "instance_configuration": [ - { - "cpu": "1024", - "instance_role_arn": "", - "memory": "2048" - } - ], - "network_configuration": null, - "observability_configuration": [], - "service_id": null, - "service_name": "announcements-dev-service", - "service_url": null, - "source_configuration": [ - { - "authentication_configuration": [ - { - "access_role_arn": "arn:aws:iam::654654512735:role/apprunner-access-role", - "connection_arn": "" - } - ], - "auto_deployments_enabled": true, - "code_repository": [], - "image_repository": [ - { - "image_configuration": [ - { - "port": "8000", - "runtime_environment_secrets": null, - "runtime_environment_variables": null, - "start_command": "" - } - ], - "image_identifier": "654654512735.dkr.ecr.us-east-1.amazonaws.com/announcements-dev:latest", - "image_repository_type": "ECR" - } - ] - } - ], - "status": null, - "tags": { - "Application": "announcements", - "Environment": "dev" - }, - "tags_all": { - "Application": "announcements", - "Environment": "dev" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "aws_apprunner_auto_scaling_configuration_version.app_scaling", - "aws_ecr_repository.app_repos", - "aws_iam_role.apprunner_role" - ] - }, - { - "index_key": "announcements-prod", - "status": "tainted", - "schema_version": 0, - "attributes": { - "arn": null, - "auto_scaling_configuration_arn": "arn:aws:apprunner:us-east-1:654654512735:autoscalingconfiguration/app-scaling-config/2/d1017023a0f74724b84fefcc16d2c679", - "encryption_configuration": [], - "health_check_configuration": null, - "id": "arn:aws:apprunner:us-east-1:654654512735:service/announcements-prod-service/995a33c3778b4e51910d91214295b867", - "instance_configuration": [ - { - "cpu": "1024", - "instance_role_arn": "", - "memory": "2048" - } - ], - "network_configuration": null, - "observability_configuration": [], - "service_id": null, - "service_name": "announcements-prod-service", - "service_url": null, - "source_configuration": [ - { - "authentication_configuration": [ - { - "access_role_arn": "arn:aws:iam::654654512735:role/apprunner-access-role", - "connection_arn": "" - } - ], - "auto_deployments_enabled": true, - "code_repository": [], - "image_repository": [ - { - "image_configuration": [ - { - "port": "8000", - "runtime_environment_secrets": null, - "runtime_environment_variables": null, - "start_command": "" - } - ], - "image_identifier": "654654512735.dkr.ecr.us-east-1.amazonaws.com/announcements-prod:latest", - "image_repository_type": "ECR" - } - ] - } - ], - "status": null, - "tags": { - "Application": "announcements", - "Environment": "prod" - }, - "tags_all": { - "Application": "announcements", - "Environment": "prod" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "aws_apprunner_auto_scaling_configuration_version.app_scaling", - "aws_ecr_repository.app_repos", - "aws_iam_role.apprunner_role" - ] - }, - { - "index_key": "announcements-qa", - "status": "tainted", - "schema_version": 0, - "attributes": { - "arn": null, - "auto_scaling_configuration_arn": "arn:aws:apprunner:us-east-1:654654512735:autoscalingconfiguration/app-scaling-config/2/d1017023a0f74724b84fefcc16d2c679", - "encryption_configuration": [], - "health_check_configuration": null, - "id": "arn:aws:apprunner:us-east-1:654654512735:service/announcements-qa-service/3eff561ba4e84f0691a1cfa951c8adeb", - "instance_configuration": [ - { - "cpu": "1024", - "instance_role_arn": "", - "memory": "2048" - } - ], - "network_configuration": null, - "observability_configuration": [], - "service_id": null, - "service_name": "announcements-qa-service", - "service_url": null, - "source_configuration": [ - { - "authentication_configuration": [ - { - "access_role_arn": "arn:aws:iam::654654512735:role/apprunner-access-role", - "connection_arn": "" - } - ], - "auto_deployments_enabled": true, - "code_repository": [], - "image_repository": [ - { - "image_configuration": [ - { - "port": "8000", - "runtime_environment_secrets": null, - "runtime_environment_variables": null, - "start_command": "" - } - ], - "image_identifier": "654654512735.dkr.ecr.us-east-1.amazonaws.com/announcements-qa:latest", - "image_repository_type": "ECR" - } - ] - } - ], - "status": null, - "tags": { - "Application": "announcements", - "Environment": "qa" - }, - "tags_all": { - "Application": "announcements", - "Environment": "qa" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "aws_apprunner_auto_scaling_configuration_version.app_scaling", - "aws_ecr_repository.app_repos", - "aws_iam_role.apprunner_role" - ] - } - ] - }, { "mode": "managed", "type": "aws_db_instance", @@ -254,10 +48,10 @@ "apply_immediately": false, "arn": "arn:aws:rds:us-east-1:654654512735:db:cm-appfolio-db", "auto_minor_version_upgrade": true, - "availability_zone": "us-east-1b", + "availability_zone": "us-east-1c", "backup_retention_period": 0, "backup_target": "region", - "backup_window": "03:03-03:33", + "backup_window": "08:32-09:02", "blue_green_update": [], "ca_cert_identifier": "rds-ca-rsa2048-g1", "character_set_name": "", @@ -271,11 +65,11 @@ "deletion_protection": false, "domain": "", "domain_auth_secret_arn": "", - "domain_dns_ips": [], + "domain_dns_ips": null, "domain_fqdn": "", "domain_iam_role_name": "", "domain_ou": "", - "enabled_cloudwatch_logs_exports": [], + "enabled_cloudwatch_logs_exports": null, "endpoint": "cm-appfolio-db.c9o06ok6uz10.us-east-1.rds.amazonaws.com:3306", "engine": "mysql", "engine_lifecycle_support": "open-source-rds-extended-support", @@ -284,7 +78,7 @@ "final_snapshot_identifier": null, "hosted_zone_id": "Z2R2ITUGPM61AM", "iam_database_authentication_enabled": false, - "id": "db-E2YHLYEHUJQAXFRA4EADXL3WS4", + "id": "db-3FO5VQHD4UREN6JAF26DLRWTMI", "identifier": "cm-appfolio-db", "identifier_prefix": "", "instance_class": "db.t3.micro", @@ -293,7 +87,7 @@ "latest_restorable_time": "", "license_model": "general-public-license", "listener_endpoint": [], - "maintenance_window": "mon:09:46-mon:10:16", + "maintenance_window": "fri:04:11-fri:04:41", "manage_master_user_password": null, "master_user_secret": [], "master_user_secret_kms_key_id": null, @@ -305,7 +99,7 @@ "network_type": "IPV4", "option_group_name": "default:mysql-8-0", "parameter_group_name": "default.mysql8.0", - "password": "my_secure_passcode", + "password": "ASasdf234Thjafh9o23ASpokl", "performance_insights_enabled": false, "performance_insights_kms_key_id": "", "performance_insights_retention_period": 0, @@ -314,7 +108,7 @@ "replica_mode": "", "replicas": [], "replicate_source_db": "", - "resource_id": "db-E2YHLYEHUJQAXFRA4EADXL3WS4", + "resource_id": "db-3FO5VQHD4UREN6JAF26DLRWTMI", "restore_to_point_in_time": [], "s3_import": [], "skip_final_snapshot": true, @@ -323,14 +117,14 @@ "storage_encrypted": false, "storage_throughput": 0, "storage_type": "gp2", - "tags": {}, + "tags": null, "tags_all": {}, "timeouts": null, "timezone": "", "upgrade_storage_config": null, "username": "admin", "vpc_security_group_ids": [ - "sg-03bee5a69571c738a" + "sg-0374fb2baff964fb0" ] }, "sensitive_attributes": [ @@ -367,15 +161,15 @@ "name": "default-subnet-group", "name_prefix": "", "subnet_ids": [ - "subnet-096e455d5c7a3a422", - "subnet-0d2e6be1cde7f217b" + "subnet-05984c6c711f17fff", + "subnet-0d65101fe65afe6b0" ], "supported_network_types": [ "IPV4" ], - "tags": {}, + "tags": null, "tags_all": {}, - "vpc_id": "vpc-0f0173b2df9535dd6" + "vpc_id": "vpc-01c8998b8cc7af9b5" }, "sensitive_attributes": [], "private": "bnVsbA==", @@ -415,7 +209,7 @@ "name": "announcements-dev", "registry_id": "654654512735", "repository_url": "654654512735.dkr.ecr.us-east-1.amazonaws.com/announcements-dev", - "tags": {}, + "tags": null, "tags_all": {}, "timeouts": null }, @@ -444,7 +238,7 @@ "name": "announcements-prod", "registry_id": "654654512735", "repository_url": "654654512735.dkr.ecr.us-east-1.amazonaws.com/announcements-prod", - "tags": {}, + "tags": null, "tags_all": {}, "timeouts": null }, @@ -473,7 +267,7 @@ "name": "announcements-qa", "registry_id": "654654512735", "repository_url": "654654512735.dkr.ecr.us-east-1.amazonaws.com/announcements-qa", - "tags": {}, + "tags": null, "tags_all": {}, "timeouts": null }, @@ -492,15 +286,15 @@ "schema_version": 0, "attributes": { "arn": "arn:aws:iam::654654512735:policy/apprunner-ecr-access-policy", - "attachment_count": 1, + "attachment_count": 0, "description": "", "id": "arn:aws:iam::654654512735:policy/apprunner-ecr-access-policy", "name": "apprunner-ecr-access-policy", "name_prefix": "", "path": "/", "policy": "{\"Statement\":[{\"Action\":[\"ecr:GetDownloadUrlForLayer\",\"ecr:BatchGetImage\",\"ecr:BatchCheckLayerAvailability\"],\"Effect\":\"Allow\",\"Resource\":\"*\"},{\"Action\":\"ecr:GetAuthorizationToken\",\"Effect\":\"Allow\",\"Resource\":\"*\"}],\"Version\":\"2012-10-17\"}", - "policy_id": "ANPAZQ3DTDZP43U566H74", - "tags": {}, + "policy_id": "ANPAZQ3DTDZPUKZYSYSYB", + "tags": null, "tags_all": {} }, "sensitive_attributes": [], @@ -519,27 +313,20 @@ "attributes": { "arn": "arn:aws:iam::654654512735:role/apprunner-access-role", "assume_role_policy": "{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"build.apprunner.amazonaws.com\"}}],\"Version\":\"2012-10-17\"}", - "create_date": "2024-08-16T16:25:28Z", + "create_date": "2024-08-16T20:08:29Z", "description": "", "force_detach_policies": false, "id": "apprunner-access-role", - "inline_policy": [ - { - "name": "AWSRevokeOlderSessions", - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"*\"],\"Condition\":{\"DateLessThan\":{\"aws:TokenIssueTime\":\"2024-08-16T17:12:14.157Z\"}},\"Effect\":\"Deny\",\"Resource\":[\"*\"]}]}" - } - ], - "managed_policy_arns": [ - "arn:aws:iam::654654512735:policy/apprunner-ecr-access-policy" - ], + "inline_policy": [], + "managed_policy_arns": [], "max_session_duration": 3600, "name": "apprunner-access-role", "name_prefix": "", "path": "/", "permissions_boundary": "", - "tags": {}, + "tags": null, "tags_all": {}, - "unique_id": "AROAZQ3DTDZPRYJPVAD2J" + "unique_id": "AROAZQ3DTDZPRIKF4BUO4" }, "sensitive_attributes": [], "private": "bnVsbA==" @@ -555,7 +342,7 @@ { "schema_version": 0, "attributes": { - "id": "apprunner-access-role-20240816162528323500000001", + "id": "apprunner-access-role-20240816200830091800000001", "policy_arn": "arn:aws:iam::654654512735:policy/apprunner-ecr-access-policy", "role": "apprunner-access-role" }, @@ -577,13 +364,13 @@ { "schema_version": 0, "attributes": { - "arn": "arn:aws:ec2:us-east-1:654654512735:internet-gateway/igw-0dcdfce5a928d0b9d", - "id": "igw-0dcdfce5a928d0b9d", + "arn": "arn:aws:ec2:us-east-1:654654512735:internet-gateway/igw-066aaa71b99296e33", + "id": "igw-066aaa71b99296e33", "owner_id": "654654512735", - "tags": {}, + "tags": null, "tags_all": {}, "timeouts": null, - "vpc_id": "vpc-0f0173b2df9535dd6" + "vpc_id": "vpc-01c8998b8cc7af9b5" }, "sensitive_attributes": [], "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19", @@ -602,8 +389,8 @@ { "schema_version": 0, "attributes": { - "arn": "arn:aws:ec2:us-east-1:654654512735:route-table/rtb-07c1aff52017884c9", - "id": "rtb-07c1aff52017884c9", + "arn": "arn:aws:ec2:us-east-1:654654512735:route-table/rtb-0d987e6386074c445", + "id": "rtb-0d987e6386074c445", "owner_id": "654654512735", "propagating_vgws": [], "route": [ @@ -613,7 +400,7 @@ "core_network_arn": "", "destination_prefix_list_id": "", "egress_only_gateway_id": "", - "gateway_id": "igw-0dcdfce5a928d0b9d", + "gateway_id": "igw-066aaa71b99296e33", "ipv6_cidr_block": "", "local_gateway_id": "", "nat_gateway_id": "", @@ -623,10 +410,10 @@ "vpc_peering_connection_id": "" } ], - "tags": {}, + "tags": null, "tags_all": {}, "timeouts": null, - "vpc_id": "vpc-0f0173b2df9535dd6" + "vpc_id": "vpc-01c8998b8cc7af9b5" }, "sensitive_attributes": [], "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", @@ -647,9 +434,9 @@ "schema_version": 0, "attributes": { "gateway_id": "", - "id": "rtbassoc-00f461b65155427d3", - "route_table_id": "rtb-07c1aff52017884c9", - "subnet_id": "subnet-0d2e6be1cde7f217b", + "id": "rtbassoc-01e3dbe9b3715e08d", + "route_table_id": "rtb-0d987e6386074c445", + "subnet_id": "subnet-05984c6c711f17fff", "timeouts": null }, "sensitive_attributes": [], @@ -673,9 +460,9 @@ "schema_version": 0, "attributes": { "gateway_id": "", - "id": "rtbassoc-0cb00355904328353", - "route_table_id": "rtb-07c1aff52017884c9", - "subnet_id": "subnet-096e455d5c7a3a422", + "id": "rtbassoc-0c9a01bf7f187a77c", + "route_table_id": "rtb-0d987e6386074c445", + "subnet_id": "subnet-0d65101fe65afe6b0", "timeouts": null }, "sensitive_attributes": [], @@ -698,7 +485,7 @@ { "schema_version": 1, "attributes": { - "arn": "arn:aws:ec2:us-east-1:654654512735:security-group/sg-03bee5a69571c738a", + "arn": "arn:aws:ec2:us-east-1:654654512735:security-group/sg-0374fb2baff964fb0", "description": "Managed by Terraform", "egress": [ { @@ -715,7 +502,7 @@ "to_port": 0 } ], - "id": "sg-03bee5a69571c738a", + "id": "sg-0374fb2baff964fb0", "ingress": [ { "cidr_blocks": [ @@ -731,14 +518,14 @@ "to_port": 3306 } ], - "name": "terraform-20240816162539407200000002", + "name": "terraform-20240816200841235000000002", "name_prefix": "terraform-", "owner_id": "654654512735", "revoke_rules_on_delete": false, - "tags": {}, + "tags": null, "tags_all": {}, "timeouts": null, - "vpc_id": "vpc-0f0173b2df9535dd6" + "vpc_id": "vpc-01c8998b8cc7af9b5" }, "sensitive_attributes": [], "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", @@ -757,7 +544,7 @@ { "schema_version": 1, "attributes": { - "arn": "arn:aws:ec2:us-east-1:654654512735:subnet/subnet-096e455d5c7a3a422", + "arn": "arn:aws:ec2:us-east-1:654654512735:subnet/subnet-0d65101fe65afe6b0", "assign_ipv6_address_on_creation": false, "availability_zone": "us-east-1b", "availability_zone_id": "use1-az2", @@ -767,7 +554,7 @@ "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-096e455d5c7a3a422", + "id": "subnet-0d65101fe65afe6b0", "ipv6_cidr_block": "", "ipv6_cidr_block_association_id": "", "ipv6_native": false, @@ -776,10 +563,10 @@ "outpost_arn": "", "owner_id": "654654512735", "private_dns_hostname_type_on_launch": "ip-name", - "tags": {}, + "tags": null, "tags_all": {}, "timeouts": null, - "vpc_id": "vpc-0f0173b2df9535dd6" + "vpc_id": "vpc-01c8998b8cc7af9b5" }, "sensitive_attributes": [], "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", @@ -798,7 +585,7 @@ { "schema_version": 1, "attributes": { - "arn": "arn:aws:ec2:us-east-1:654654512735:subnet/subnet-0d2e6be1cde7f217b", + "arn": "arn:aws:ec2:us-east-1:654654512735:subnet/subnet-05984c6c711f17fff", "assign_ipv6_address_on_creation": false, "availability_zone": "us-east-1c", "availability_zone_id": "use1-az4", @@ -808,7 +595,7 @@ "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-0d2e6be1cde7f217b", + "id": "subnet-05984c6c711f17fff", "ipv6_cidr_block": "", "ipv6_cidr_block_association_id": "", "ipv6_native": false, @@ -817,10 +604,10 @@ "outpost_arn": "", "owner_id": "654654512735", "private_dns_hostname_type_on_launch": "ip-name", - "tags": {}, + "tags": null, "tags_all": {}, "timeouts": null, - "vpc_id": "vpc-0f0173b2df9535dd6" + "vpc_id": "vpc-01c8998b8cc7af9b5" }, "sensitive_attributes": [], "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", @@ -839,17 +626,17 @@ { "schema_version": 1, "attributes": { - "arn": "arn:aws:ec2:us-east-1:654654512735:vpc/vpc-0f0173b2df9535dd6", + "arn": "arn:aws:ec2:us-east-1:654654512735:vpc/vpc-01c8998b8cc7af9b5", "assign_generated_ipv6_cidr_block": false, "cidr_block": "10.0.0.0/16", - "default_network_acl_id": "acl-044622538dd3a452b", - "default_route_table_id": "rtb-057909b952cd7af9e", - "default_security_group_id": "sg-099926fded9028a44", + "default_network_acl_id": "acl-01ce7e2c4e0c638be", + "default_route_table_id": "rtb-0a4606ca11d004b7d", + "default_security_group_id": "sg-0133a3e8a1008b121", "dhcp_options_id": "dopt-0448c905aa54596ac", "enable_dns_hostnames": true, "enable_dns_support": true, "enable_network_address_usage_metrics": false, - "id": "vpc-0f0173b2df9535dd6", + "id": "vpc-01c8998b8cc7af9b5", "instance_tenancy": "default", "ipv4_ipam_pool_id": null, "ipv4_netmask_length": null, @@ -858,9 +645,9 @@ "ipv6_cidr_block_network_border_group": "", "ipv6_ipam_pool_id": "", "ipv6_netmask_length": 0, - "main_route_table_id": "rtb-057909b952cd7af9e", + "main_route_table_id": "rtb-0a4606ca11d004b7d", "owner_id": "654654512735", - "tags": {}, + "tags": null, "tags_all": {} }, "sensitive_attributes": [], @@ -878,7 +665,7 @@ "index_key": "announcements-dev", "schema_version": 0, "attributes": { - "id": "6489021364927640016", + "id": "1825374920776603513", "triggers": null }, "sensitive_attributes": [], @@ -895,7 +682,7 @@ "index_key": "announcements-prod", "schema_version": 0, "attributes": { - "id": "5159699377309570765", + "id": "4068045178261638631", "triggers": null }, "sensitive_attributes": [], @@ -912,7 +699,7 @@ "index_key": "announcements-qa", "schema_version": 0, "attributes": { - "id": "4942270219861943391", + "id": "8095755812362962033", "triggers": null }, "sensitive_attributes": [],