From 05108d3f94fdf476b5194f99c9db671628d4185a Mon Sep 17 00:00:00 2001 From: Logan Date: Thu, 2 Apr 2026 22:36:41 -0500 Subject: [PATCH] remove dev environment --- app/server/services/ts/common/expressUtils.ts | 1 - deployment/infrastructure/main.tf | 15 - deployment/infrastructure/terraform.tfstate | 553 +----------------- .../infrastructure/terraform.tfstate.backup | 24 +- 4 files changed, 32 insertions(+), 561 deletions(-) diff --git a/app/server/services/ts/common/expressUtils.ts b/app/server/services/ts/common/expressUtils.ts index f4e313c..0385b08 100644 --- a/app/server/services/ts/common/expressUtils.ts +++ b/app/server/services/ts/common/expressUtils.ts @@ -5,7 +5,6 @@ const origins = [ "http://localhost", "http://localhost:8080", "http://18.190.215.135", //prod webserver - "http://3.142.125.202", //dev webserver ]; export function buildCorsConfig(opts?: { methods?: string[] }) { diff --git a/deployment/infrastructure/main.tf b/deployment/infrastructure/main.tf index 01ada4e..2386d00 100644 --- a/deployment/infrastructure/main.tf +++ b/deployment/infrastructure/main.tf @@ -104,18 +104,3 @@ module "prod" { gateway_id = aws_internet_gateway.default.id route_table_id = aws_route_table.route_table.id } - - -module "dev" { - source = "./modules/finus" - - environment_name = "dev" - ssh_key_pair_name = "finus-dev" - security_group_ids = [aws_security_group.default.id] - webserver_security_group_ids = [aws_security_group.webserver.id] - backend_security_group_ids = [aws_security_group.services.id] - subnet_id = aws_subnet.dev.id - vpc_id = aws_vpc.finus.id - gateway_id = aws_internet_gateway.default.id - route_table_id = aws_route_table.route_table.id -} diff --git a/deployment/infrastructure/terraform.tfstate b/deployment/infrastructure/terraform.tfstate index 8a641c7..ed13165 100644 --- a/deployment/infrastructure/terraform.tfstate +++ b/deployment/infrastructure/terraform.tfstate @@ -1,7 +1,7 @@ { "version": 4, "terraform_version": "1.14.7", - "serial": 122, + "serial": 128, "lineage": "ae3e9505-c9b9-9084-580e-4ba9a7f0ba2f", "outputs": {}, "resources": [ @@ -175,7 +175,21 @@ "attributes": { "arn": "arn:aws:ec2:us-east-2:177559564758:security-group/sg-0e428a46b850e036a", "description": "Managed by Terraform", - "egress": [], + "egress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "MySQL from anywhere", + "from_port": 3306, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 3306 + } + ], "id": "sg-0e428a46b850e036a", "ingress": [ { @@ -249,7 +263,7 @@ "owner_id": "177559564758", "region": "us-east-2", "revoke_rules_on_delete": false, - "tags": null, + "tags": {}, "tags_all": {}, "timeouts": null, "vpc_id": "vpc-0e13d5c774ed2b3c8" @@ -421,539 +435,6 @@ } ] }, - { - "module": "module.dev", - "mode": "data", - "type": "aws_ami", - "name": "amazon_linux", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "allow_unsafe_filter": null, - "architecture": "x86_64", - "arn": "arn:aws:ec2:us-east-2::image/ami-0b0b78dcacbab728f", - "block_device_mappings": [ - { - "device_name": "/dev/xvda", - "ebs": { - "delete_on_termination": "true", - "encrypted": "false", - "iops": "3000", - "snapshot_id": "snap-0afc5230d5113aa86", - "throughput": "125", - "volume_initialization_rate": "0", - "volume_size": "8", - "volume_type": "gp3" - }, - "no_device": "", - "virtual_name": "" - } - ], - "boot_mode": "uefi-preferred", - "creation_date": "2026-03-03T18:01:43.000Z", - "deprecation_time": "2026-06-01T23:47:00.000Z", - "description": "Amazon Linux 2023 AMI 2023.10.20260302.1 x86_64 HVM kernel-6.1", - "ena_support": true, - "executable_users": null, - "filter": [ - { - "name": "image-id", - "values": [ - "ami-0b0b78dcacbab728f" - ] - } - ], - "hypervisor": "xen", - "id": "ami-0b0b78dcacbab728f", - "image_id": "ami-0b0b78dcacbab728f", - "image_location": "amazon/al2023-ami-2023.10.20260302.1-kernel-6.1-x86_64", - "image_owner_alias": "amazon", - "image_type": "machine", - "imds_support": "v2.0", - "include_deprecated": false, - "kernel_id": "", - "last_launched_time": "", - "most_recent": false, - "name": "al2023-ami-2023.10.20260302.1-kernel-6.1-x86_64", - "name_regex": null, - "owner_id": "137112412989", - "owners": null, - "platform": "", - "platform_details": "Linux/UNIX", - "product_codes": [], - "public": true, - "ramdisk_id": "", - "region": "us-east-2", - "root_device_name": "/dev/xvda", - "root_device_type": "ebs", - "root_snapshot_id": "snap-0afc5230d5113aa86", - "sriov_net_support": "simple", - "state": "available", - "state_reason": { - "code": "UNSET", - "message": "UNSET" - }, - "tags": {}, - "timeouts": null, - "tpm_support": "", - "uefi_data": null, - "usage_operation": "RunInstances", - "virtualization_type": "hvm" - }, - "sensitive_attributes": [], - "identity_schema_version": 0 - } - ] - }, - { - "module": "module.dev", - "mode": "managed", - "type": "aws_eip", - "name": "backend", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "address": null, - "allocation_id": "eipalloc-04f46a5b83e1a6af0", - "arn": "arn:aws:ec2:us-east-2:177559564758:elastic-ip/eipalloc-04f46a5b83e1a6af0", - "associate_with_private_ip": null, - "association_id": "eipassoc-0818aa83d85c2f91b", - "carrier_ip": "", - "customer_owned_ip": "", - "customer_owned_ipv4_pool": "", - "domain": "vpc", - "id": "eipalloc-04f46a5b83e1a6af0", - "instance": "i-008147727278f7080", - "ipam_pool_id": null, - "network_border_group": "us-east-2", - "network_interface": "eni-0f364cdcae030e0e6", - "private_dns": "ip-10-0-221-90.us-east-2.compute.internal", - "private_ip": "10.0.221.90", - "ptr_record": "", - "public_dns": "ec2-16-58-118-74.us-east-2.compute.amazonaws.com", - "public_ip": "16.58.118.74", - "public_ipv4_pool": "amazon", - "region": "us-east-2", - "tags": { - "Name": "finus-dev-backend" - }, - "tags_all": { - "Name": "finus-dev-backend" - }, - "timeouts": null - }, - "sensitive_attributes": [], - "identity_schema_version": 0, - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxODAwMDAwMDAwMDAsInJlYWQiOjkwMDAwMDAwMDAwMCwidXBkYXRlIjozMDAwMDAwMDAwMDB9fQ==", - "dependencies": [ - "aws_security_group.default", - "aws_security_group.services", - "aws_subnet.dev", - "aws_vpc.finus", - "module.dev.aws_instance.backend", - "module.dev.data.aws_ami.amazon_linux" - ] - } - ] - }, - { - "module": "module.dev", - "mode": "managed", - "type": "aws_eip", - "name": "webserver", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "address": null, - "allocation_id": "eipalloc-0857b784b20a92dad", - "arn": "arn:aws:ec2:us-east-2:177559564758:elastic-ip/eipalloc-0857b784b20a92dad", - "associate_with_private_ip": null, - "association_id": "eipassoc-06e143e0fc9004868", - "carrier_ip": "", - "customer_owned_ip": "", - "customer_owned_ipv4_pool": "", - "domain": "vpc", - "id": "eipalloc-0857b784b20a92dad", - "instance": "i-020ba441d6c3c0258", - "ipam_pool_id": null, - "network_border_group": "us-east-2", - "network_interface": "eni-03283cda15cf431d3", - "private_dns": "ip-10-0-140-152.us-east-2.compute.internal", - "private_ip": "10.0.140.152", - "ptr_record": "", - "public_dns": "ec2-3-142-125-202.us-east-2.compute.amazonaws.com", - "public_ip": "3.142.125.202", - "public_ipv4_pool": "amazon", - "region": "us-east-2", - "tags": { - "Name": "finus-dev-webserver" - }, - "tags_all": { - "Name": "finus-dev-webserver" - }, - "timeouts": null - }, - "sensitive_attributes": [], - "identity_schema_version": 0, - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxODAwMDAwMDAwMDAsInJlYWQiOjkwMDAwMDAwMDAwMCwidXBkYXRlIjozMDAwMDAwMDAwMDB9fQ==", - "dependencies": [ - "aws_security_group.default", - "aws_security_group.webserver", - "aws_subnet.dev", - "aws_vpc.finus", - "module.dev.aws_instance.webserver", - "module.dev.data.aws_ami.amazon_linux" - ] - } - ] - }, - { - "module": "module.dev", - "mode": "managed", - "type": "aws_instance", - "name": "backend", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 2, - "attributes": { - "ami": "ami-0b0b78dcacbab728f", - "arn": "arn:aws:ec2:us-east-2:177559564758:instance/i-008147727278f7080", - "associate_public_ip_address": true, - "availability_zone": "us-east-2c", - "capacity_reservation_specification": [ - { - "capacity_reservation_preference": "open", - "capacity_reservation_target": [] - } - ], - "cpu_options": [ - { - "amd_sev_snp": "", - "core_count": 1, - "nested_virtualization": "", - "threads_per_core": 1 - } - ], - "credit_specification": [ - { - "cpu_credits": "standard" - } - ], - "disable_api_stop": false, - "disable_api_termination": false, - "ebs_block_device": [], - "ebs_optimized": false, - "enable_primary_ipv6": null, - "enclave_options": [ - { - "enabled": false - } - ], - "ephemeral_block_device": [], - "force_destroy": false, - "get_password_data": false, - "hibernation": false, - "host_id": "", - "host_resource_group_arn": null, - "iam_instance_profile": "", - "id": "i-008147727278f7080", - "instance_initiated_shutdown_behavior": "stop", - "instance_lifecycle": "", - "instance_market_options": [], - "instance_state": "running", - "instance_type": "t2.nano", - "ipv6_address_count": 0, - "ipv6_addresses": [], - "key_name": "finus-dev", - "launch_template": [], - "maintenance_options": [ - { - "auto_recovery": "default" - } - ], - "metadata_options": [ - { - "http_endpoint": "enabled", - "http_protocol_ipv6": "disabled", - "http_put_response_hop_limit": 2, - "http_tokens": "required", - "instance_metadata_tags": "disabled" - } - ], - "monitoring": false, - "network_interface": [], - "outpost_arn": "", - "password_data": "", - "placement_group": "", - "placement_group_id": "", - "placement_partition_number": 0, - "primary_network_interface": [ - { - "delete_on_termination": true, - "network_interface_id": "eni-0f364cdcae030e0e6" - } - ], - "primary_network_interface_id": "eni-0f364cdcae030e0e6", - "private_dns": "ip-10-0-221-90.us-east-2.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": "10.0.221.90", - "public_dns": "", - "public_ip": "16.58.118.74", - "region": "us-east-2", - "root_block_device": [ - { - "delete_on_termination": true, - "device_name": "/dev/xvda", - "encrypted": false, - "iops": 3000, - "kms_key_id": "", - "tags": {}, - "tags_all": {}, - "throughput": 125, - "volume_id": "vol-0c0b46050d4eb986e", - "volume_size": 8, - "volume_type": "gp3" - } - ], - "secondary_network_interface": [], - "secondary_private_ips": [], - "security_groups": [], - "source_dest_check": true, - "spot_instance_request_id": "", - "subnet_id": "subnet-09d5718b3434ec2be", - "tags": { - "Name": "finus-dev-backend" - }, - "tags_all": { - "Name": "finus-dev-backend" - }, - "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-0c03eb59bd6270fcf", - "sg-0e428a46b850e036a" - ] - }, - "sensitive_attributes": [], - "identity_schema_version": 0, - "identity": { - "account_id": "177559564758", - "id": "i-008147727278f7080", - "region": "us-east-2" - }, - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMCwicmVhZCI6OTAwMDAwMDAwMDAwLCJ1cGRhdGUiOjYwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMiJ9", - "dependencies": [ - "aws_security_group.default", - "aws_security_group.services", - "aws_subnet.dev", - "aws_vpc.finus", - "module.dev.data.aws_ami.amazon_linux" - ] - } - ] - }, - { - "module": "module.dev", - "mode": "managed", - "type": "aws_instance", - "name": "webserver", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 2, - "attributes": { - "ami": "ami-0b0b78dcacbab728f", - "arn": "arn:aws:ec2:us-east-2:177559564758:instance/i-020ba441d6c3c0258", - "associate_public_ip_address": true, - "availability_zone": "us-east-2c", - "capacity_reservation_specification": [ - { - "capacity_reservation_preference": "open", - "capacity_reservation_target": [] - } - ], - "cpu_options": [ - { - "amd_sev_snp": "", - "core_count": 1, - "nested_virtualization": "", - "threads_per_core": 1 - } - ], - "credit_specification": [ - { - "cpu_credits": "standard" - } - ], - "disable_api_stop": false, - "disable_api_termination": false, - "ebs_block_device": [], - "ebs_optimized": false, - "enable_primary_ipv6": null, - "enclave_options": [ - { - "enabled": false - } - ], - "ephemeral_block_device": [], - "force_destroy": false, - "get_password_data": false, - "hibernation": false, - "host_id": "", - "host_resource_group_arn": null, - "iam_instance_profile": "", - "id": "i-020ba441d6c3c0258", - "instance_initiated_shutdown_behavior": "stop", - "instance_lifecycle": "", - "instance_market_options": [], - "instance_state": "running", - "instance_type": "t2.nano", - "ipv6_address_count": 0, - "ipv6_addresses": [], - "key_name": "finus-dev", - "launch_template": [], - "maintenance_options": [ - { - "auto_recovery": "default" - } - ], - "metadata_options": [ - { - "http_endpoint": "enabled", - "http_protocol_ipv6": "disabled", - "http_put_response_hop_limit": 2, - "http_tokens": "required", - "instance_metadata_tags": "disabled" - } - ], - "monitoring": false, - "network_interface": [], - "outpost_arn": "", - "password_data": "", - "placement_group": "", - "placement_group_id": "", - "placement_partition_number": 0, - "primary_network_interface": [ - { - "delete_on_termination": true, - "network_interface_id": "eni-03283cda15cf431d3" - } - ], - "primary_network_interface_id": "eni-03283cda15cf431d3", - "private_dns": "ip-10-0-140-152.us-east-2.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": "10.0.140.152", - "public_dns": "", - "public_ip": "3.142.125.202", - "region": "us-east-2", - "root_block_device": [ - { - "delete_on_termination": true, - "device_name": "/dev/xvda", - "encrypted": false, - "iops": 3000, - "kms_key_id": "", - "tags": {}, - "tags_all": {}, - "throughput": 125, - "volume_id": "vol-09e9f25279b1c2ac1", - "volume_size": 8, - "volume_type": "gp3" - } - ], - "secondary_network_interface": [], - "secondary_private_ips": [], - "security_groups": [], - "source_dest_check": true, - "spot_instance_request_id": "", - "subnet_id": "subnet-09d5718b3434ec2be", - "tags": { - "Name": "finus-dev-webserver" - }, - "tags_all": { - "Name": "finus-dev-webserver" - }, - "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-0973f01390a9d839a", - "sg-0c03eb59bd6270fcf" - ] - }, - "sensitive_attributes": [], - "identity_schema_version": 0, - "identity": { - "account_id": "177559564758", - "id": "i-020ba441d6c3c0258", - "region": "us-east-2" - }, - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMCwicmVhZCI6OTAwMDAwMDAwMDAwLCJ1cGRhdGUiOjYwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMiJ9", - "dependencies": [ - "aws_security_group.default", - "aws_security_group.webserver", - "aws_subnet.dev", - "aws_vpc.finus", - "module.dev.data.aws_ami.amazon_linux" - ] - } - ] - }, - { - "module": "module.dev", - "mode": "managed", - "type": "aws_route_table_association", - "name": "assoc", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-04712335fcc923e95", - "region": "us-east-2", - "route_table_id": "rtb-0f24beedbed7e02a3", - "subnet_id": "subnet-09d5718b3434ec2be", - "timeouts": null - }, - "sensitive_attributes": [], - "identity_schema_version": 0, - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "aws_internet_gateway.default", - "aws_route_table.route_table", - "aws_subnet.dev", - "aws_vpc.finus" - ] - } - ] - }, { "module": "module.prod", "mode": "data", diff --git a/deployment/infrastructure/terraform.tfstate.backup b/deployment/infrastructure/terraform.tfstate.backup index cdbe6d6..8a641c7 100644 --- a/deployment/infrastructure/terraform.tfstate.backup +++ b/deployment/infrastructure/terraform.tfstate.backup @@ -1,7 +1,7 @@ { "version": 4, "terraform_version": "1.14.7", - "serial": 117, + "serial": 122, "lineage": "ae3e9505-c9b9-9084-580e-4ba9a7f0ba2f", "outputs": {}, "resources": [ @@ -197,7 +197,7 @@ "owner_id": "177559564758", "region": "us-east-2", "revoke_rules_on_delete": false, - "tags": null, + "tags": {}, "tags_all": {}, "timeouts": null, "vpc_id": "vpc-0e13d5c774ed2b3c8" @@ -223,13 +223,12 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { - "status": "tainted", "schema_version": 1, "attributes": { - "arn": null, + "arn": "arn:aws:ec2:us-east-2:177559564758:security-group/sg-0973f01390a9d839a", "description": "Managed by Terraform", "egress": [], - "id": "sg-09cfeb172160ecaa3", + "id": "sg-0973f01390a9d839a", "ingress": [ { "cidr_blocks": [ @@ -239,24 +238,29 @@ "from_port": 80, "ipv6_cidr_blocks": [], "prefix_list_ids": [], - "protocol": "http", + "protocol": "tcp", "security_groups": [], "self": false, "to_port": 80 } ], "name": "finus-webserver", - "name_prefix": null, - "owner_id": null, + "name_prefix": "", + "owner_id": "177559564758", "region": "us-east-2", "revoke_rules_on_delete": false, "tags": null, - "tags_all": null, + "tags_all": {}, "timeouts": null, "vpc_id": "vpc-0e13d5c774ed2b3c8" }, "sensitive_attributes": [], "identity_schema_version": 0, + "identity": { + "account_id": "177559564758", + "id": "sg-0973f01390a9d839a", + "region": "us-east-2" + }, "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", "dependencies": [ "aws_vpc.finus" @@ -899,6 +903,7 @@ "user_data_replace_on_change": false, "volume_tags": null, "vpc_security_group_ids": [ + "sg-0973f01390a9d839a", "sg-0c03eb59bd6270fcf" ] }, @@ -1431,6 +1436,7 @@ "user_data_replace_on_change": false, "volume_tags": null, "vpc_security_group_ids": [ + "sg-0973f01390a9d839a", "sg-0c03eb59bd6270fcf" ] },