From 2f41de7c390895cbbd36d20ae23cd19e0615f9dd Mon Sep 17 00:00:00 2001 From: Soren Martius Date: Tue, 11 Jun 2024 18:10:41 +0200 Subject: [PATCH] chore: cleanup examples --- .tool-versions | 4 +- imports/modules/alb.tm.hcl | 107 ----------------- imports/modules/ecs-fargate-cluster.tm.hcl | 29 ----- imports/modules/ecs-fargate-service.tm.hcl | 113 ------------------ imports/modules/vpc.tm.hcl | 38 ------ stacks/terraform/config.tm.hcl | 6 - stacks/terraform/prod/config.tm.hcl | 27 ----- stacks/terraform/prod/us-east-1/alb/alb.tf | 90 -------------- .../terraform/prod/us-east-1/alb/backend.tf | 11 -- .../prod/us-east-1/alb/import.tm.hcl | 3 - .../terraform/prod/us-east-1/alb/stack.tm.hcl | 9 -- .../terraform/prod/us-east-1/alb/terraform.tf | 16 --- .../us-east-1/ecs-fargate-cluster/backend.tf | 11 -- .../ecs-fargate-cluster.tf | 24 ---- .../ecs-fargate-cluster/import.tm.hcl | 3 - .../ecs-fargate-cluster/stack.tm.hcl | 6 - .../ecs-fargate-cluster/terraform.tf | 16 --- .../ecs-fargate-services/nginx/backend.tf | 11 -- .../nginx/ecs_fargate_service.tf | 96 --------------- .../ecs-fargate-services/nginx/import.tm.hcl | 3 - .../ecs-fargate-services/nginx/stack.tm.hcl | 11 -- .../ecs-fargate-services/nginx/terraform.tf | 16 --- .../terraform/prod/us-east-1/vpc/backend.tf | 11 -- .../prod/us-east-1/vpc/import.tm.hcl | 3 - .../terraform/prod/us-east-1/vpc/stack.tm.hcl | 6 - .../terraform/prod/us-east-1/vpc/terraform.tf | 16 --- stacks/terraform/prod/us-east-1/vpc/vpc.tf | 35 ------ 27 files changed, 2 insertions(+), 719 deletions(-) delete mode 100644 imports/modules/alb.tm.hcl delete mode 100644 imports/modules/ecs-fargate-cluster.tm.hcl delete mode 100644 imports/modules/ecs-fargate-service.tm.hcl delete mode 100644 imports/modules/vpc.tm.hcl delete mode 100644 stacks/terraform/config.tm.hcl delete mode 100644 stacks/terraform/prod/config.tm.hcl delete mode 100644 stacks/terraform/prod/us-east-1/alb/alb.tf delete mode 100644 stacks/terraform/prod/us-east-1/alb/backend.tf delete mode 100644 stacks/terraform/prod/us-east-1/alb/import.tm.hcl delete mode 100644 stacks/terraform/prod/us-east-1/alb/stack.tm.hcl delete mode 100644 stacks/terraform/prod/us-east-1/alb/terraform.tf delete mode 100644 stacks/terraform/prod/us-east-1/ecs-fargate-cluster/backend.tf delete mode 100644 stacks/terraform/prod/us-east-1/ecs-fargate-cluster/ecs-fargate-cluster.tf delete mode 100644 stacks/terraform/prod/us-east-1/ecs-fargate-cluster/import.tm.hcl delete mode 100644 stacks/terraform/prod/us-east-1/ecs-fargate-cluster/stack.tm.hcl delete mode 100644 stacks/terraform/prod/us-east-1/ecs-fargate-cluster/terraform.tf delete mode 100644 stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/backend.tf delete mode 100644 stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/ecs_fargate_service.tf delete mode 100644 stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/import.tm.hcl delete mode 100644 stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/stack.tm.hcl delete mode 100644 stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/terraform.tf delete mode 100644 stacks/terraform/prod/us-east-1/vpc/backend.tf delete mode 100644 stacks/terraform/prod/us-east-1/vpc/import.tm.hcl delete mode 100644 stacks/terraform/prod/us-east-1/vpc/stack.tm.hcl delete mode 100644 stacks/terraform/prod/us-east-1/vpc/terraform.tf delete mode 100644 stacks/terraform/prod/us-east-1/vpc/vpc.tf diff --git a/.tool-versions b/.tool-versions index dfb05ca..bed23e1 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,4 +1,4 @@ -terraform 1.7.5 +terraform 1.8.5 terramate 0.9.0-rc4 pre-commit 3.6.2 -opentofu 1.6.2 +opentofu 1.7.2 diff --git a/imports/modules/alb.tm.hcl b/imports/modules/alb.tm.hcl deleted file mode 100644 index 94fb073..0000000 --- a/imports/modules/alb.tm.hcl +++ /dev/null @@ -1,107 +0,0 @@ -generate_hcl "alb.tf" { - inherit = false - - content { - resource "null_resource" "initial_deployment_trigger" {} - - data "aws_vpc" "vpc" { - tags = global.tags - - depends_on = [ - null_resource.initial_deployment_trigger - ] - } - - data "aws_subnets" "subnets" { - filter { - name = "vpc-id" - values = [data.aws_vpc.vpc.id] - } - - tags = { - Tier = "public" - } - } - - module "alb" { - source = "terraform-aws-modules/alb/aws" - version = global.terraform.module.version.alb - - name = global.alb.name - - load_balancer_type = "application" - - vpc_id = data.aws_vpc.vpc.id - subnets = data.aws_subnets.subnets.ids - - enable_deletion_protection = false - - # Security Group - security_group_ingress_rules = { - all_http = { - from_port = 80 - to_port = 80 - ip_protocol = "tcp" - cidr_ipv4 = "0.0.0.0/0" - } - } - security_group_egress_rules = { - all = { - ip_protocol = "-1" - cidr_ipv4 = global.vpc.cidr - } - } - - listeners = { - ex_http = { - port = 80 - protocol = "HTTP" - - forward = { - target_group_key = "ex_ecs" - } - } - } - - target_groups = { - ex_ecs = { - backend_protocol = "HTTP" - backend_port = 80 - target_type = "ip" - deregistration_delay = 5 - load_balancing_cross_zone_enabled = true - - health_check = { - enabled = true - healthy_threshold = 5 - interval = 30 - matcher = "200" - path = "/" - port = "traffic-port" - protocol = "HTTP" - timeout = 5 - unhealthy_threshold = 2 - } - - # There's nothing to attach here in this definition. Instead, - # ECS will attach the IPs of the tasks to this target group - create_attachment = false - } - } - - tags = tm_try(global.tags, {}) - } - - output "security_group_arn" { - value = module.alb.security_group_arn - } - - output "security_group_id" { - value = module.alb.security_group_id - } - - output "target_group" { - value = module.alb.target_groups.ex_ecs - } - } -} diff --git a/imports/modules/ecs-fargate-cluster.tm.hcl b/imports/modules/ecs-fargate-cluster.tm.hcl deleted file mode 100644 index 982a042..0000000 --- a/imports/modules/ecs-fargate-cluster.tm.hcl +++ /dev/null @@ -1,29 +0,0 @@ -generate_hcl "ecs-fargate-cluster.tf" { - inherit = false - - content { - module "ecs_cluster" { - source = "terraform-aws-modules/ecs/aws//modules/cluster" - version = global.terraform.module.version.ecs_cluster - - cluster_name = global.ecs.cluster_name - - # Capacity provider - fargate_capacity_providers = tm_try(global.ecs_fargate.fargate_capacity_providers, { - FARGATE = { - default_capacity_provider_strategy = { - weight = 50 - base = 20 - } - } - FARGATE_SPOT = { - default_capacity_provider_strategy = { - weight = 50 - } - } - }) - - tags = tm_try(global.tags, {}) - } - } -} diff --git a/imports/modules/ecs-fargate-service.tm.hcl b/imports/modules/ecs-fargate-service.tm.hcl deleted file mode 100644 index 86a5481..0000000 --- a/imports/modules/ecs-fargate-service.tm.hcl +++ /dev/null @@ -1,113 +0,0 @@ -generate_hcl "ecs_fargate_service.tf" { - inherit = false - - lets { - container_port = 80 - } - - content { - resource "null_resource" "initial_deployment_trigger" {} - - data "aws_ecs_cluster" "ecs_cluster" { - cluster_name = global.ecs.cluster_name - - depends_on = [ - null_resource.initial_deployment_trigger - ] - } - - data "aws_vpc" "vpc" { - tags = global.tags - - depends_on = [ - null_resource.initial_deployment_trigger - ] - } - - data "aws_subnets" "subnets" { - filter { - name = "vpc-id" - values = [data.aws_vpc.vpc.id] - } - - tags = { - Tier = "private" - } - } - - data "aws_lb_target_group" "target_group" { - name = "tf-20240422214757001900000002" - - depends_on = [ - null_resource.initial_deployment_trigger - ] - } - - data "aws_security_group" "security_group" { - id = "sg-0c8333576937a6733" - - depends_on = [ - null_resource.initial_deployment_trigger - ] - } - - module "ecs_service" { - source = "terraform-aws-modules/ecs/aws//modules/service" - version = global.terraform.module.version.ecs_service - - name = terramate.stack.path.basename - cluster_arn = data.aws_ecs_cluster.ecs_cluster.arn - - # cpu = 1024 - # memory = 4096 - - # Container definition(s) - container_definitions = { - ("nginx") = { - cpu = 256 - memory = 512 - essential = true - image = "public.ecr.aws/nginx/nginx:1.25-bookworm" - port_mappings = [ - { - name = "nginx" - containerPort = let.container_port - hostPort = let.container_port - protocol = "tcp" - } - ] - readonly_root_filesystem = false - } - } - - load_balancer = { - service = { - target_group_arn = data.aws_lb_target_group.target_group.arn - container_name = "nginx" - container_port = let.container_port - } - } - - subnet_ids = data.aws_subnets.subnets.ids - security_group_rules = { - alb_ingress_3000 = { - type = "ingress" - from_port = let.container_port - to_port = let.container_port - protocol = "tcp" - description = "Service port" - source_security_group_id = data.aws_security_group.security_group.id - } - egress_all = { - type = "egress" - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["0.0.0.0/0"] - } - } - - tags = tm_try(global.tags, {}) - } - } -} diff --git a/imports/modules/vpc.tm.hcl b/imports/modules/vpc.tm.hcl deleted file mode 100644 index 38e9ca1..0000000 --- a/imports/modules/vpc.tm.hcl +++ /dev/null @@ -1,38 +0,0 @@ -generate_hcl "vpc.tf" { - inherit = false - - content { - module "vpc" { - source = "terraform-aws-modules/vpc/aws" - version = global.terraform.module.version.vpc - - name = global.vpc.name - cidr = global.vpc.cidr - - azs = global.vpc.azs - private_subnets = [ - tm_cidrsubnet(global.vpc.cidr, 8, 1), - tm_cidrsubnet(global.vpc.cidr, 8, 2), - tm_cidrsubnet(global.vpc.cidr, 8, 3) - ] - public_subnets = [ - tm_cidrsubnet(global.vpc.cidr, 8, 101), - tm_cidrsubnet(global.vpc.cidr, 8, 102), - tm_cidrsubnet(global.vpc.cidr, 8, 103) - ] - - enable_nat_gateway = tm_try(global.vpc.enable_nat_gateway, true) - enable_vpn_gateway = tm_try(global.vpc.enable_vpn_gateway, true) - - public_subnet_tags = { - Tier = "public" - } - - private_subnet_tags = { - Tier = "private" - } - - tags = tm_try(global.tags, {}) - } - } -} diff --git a/stacks/terraform/config.tm.hcl b/stacks/terraform/config.tm.hcl deleted file mode 100644 index e2d44de..0000000 --- a/stacks/terraform/config.tm.hcl +++ /dev/null @@ -1,6 +0,0 @@ -globals "terraform" "module" "version" { - alb = "9.9.0" - vpc = "5.7.1" - ecs_cluster = "5.11.1" - ecs_service = "5.11.1" -} diff --git a/stacks/terraform/prod/config.tm.hcl b/stacks/terraform/prod/config.tm.hcl deleted file mode 100644 index 1dcc58c..0000000 --- a/stacks/terraform/prod/config.tm.hcl +++ /dev/null @@ -1,27 +0,0 @@ -globals "terraform" "module" "version" { - alb = "9.9.0" - vpc = "5.7.1" - ecs_cluster = "5.11.1" - ecs_service = "5.11.1" -} - -globals "vpc" { - name = "prd-vpc" - cidr = "10.0.0.0/16" - azs = ["us-east-1a", "us-east-1b", "us-east-1c"] -} - -globals "ecs" { - cluster_name = "prd-ecs-cluster" -} - -globals "alb" { - name = "production-alb" -} - -globals { - tags = { - Environment = "prd" - Terraform = "true" - } -} diff --git a/stacks/terraform/prod/us-east-1/alb/alb.tf b/stacks/terraform/prod/us-east-1/alb/alb.tf deleted file mode 100644 index 919c634..0000000 --- a/stacks/terraform/prod/us-east-1/alb/alb.tf +++ /dev/null @@ -1,90 +0,0 @@ -// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT - -resource "null_resource" "initial_deployment_trigger" { -} -data "aws_vpc" "vpc" { - depends_on = [ - null_resource.initial_deployment_trigger, - ] - tags = { - Environment = "prd" - Terraform = "true" - } -} -data "aws_subnets" "subnets" { - tags = { - Tier = "public" - } - filter { - name = "vpc-id" - values = [ - data.aws_vpc.vpc.id, - ] - } -} -module "alb" { - enable_deletion_protection = false - listeners = { - ex_http = { - forward = { - target_group_key = "ex_ecs" - } - port = 80 - protocol = "HTTP" - } - } - load_balancer_type = "application" - name = "production-alb" - security_group_egress_rules = { - all = { - cidr_ipv4 = "10.0.0.0/16" - ip_protocol = "-1" - } - } - security_group_ingress_rules = { - all_http = { - cidr_ipv4 = "0.0.0.0/0" - from_port = 80 - ip_protocol = "tcp" - to_port = 80 - } - } - source = "terraform-aws-modules/alb/aws" - subnets = data.aws_subnets.subnets.ids - tags = { - Environment = "prd" - Terraform = "true" - } - target_groups = { - ex_ecs = { - backend_port = 80 - backend_protocol = "HTTP" - create_attachment = false - 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 - } - load_balancing_cross_zone_enabled = true - target_type = "ip" - } - } - version = "9.9.0" - vpc_id = data.aws_vpc.vpc.id -} -output "security_group_arn" { - value = module.alb.security_group_arn -} -output "security_group_id" { - value = module.alb.security_group_id -} -output "target_group" { - value = module.alb.target_groups.ex_ecs -} diff --git a/stacks/terraform/prod/us-east-1/alb/backend.tf b/stacks/terraform/prod/us-east-1/alb/backend.tf deleted file mode 100644 index a842cac..0000000 --- a/stacks/terraform/prod/us-east-1/alb/backend.tf +++ /dev/null @@ -1,11 +0,0 @@ -// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT - -terraform { - backend "s3" { - bucket = "terramate-example-terraform-state-backend" - dynamodb_table = "terraform-lock" - encrypt = true - key = "terraform/stacks/by-id/93e0c782-1635-48cd-8717-d0728438fbac/terraform.tfstate" - region = "us-east-1" - } -} diff --git a/stacks/terraform/prod/us-east-1/alb/import.tm.hcl b/stacks/terraform/prod/us-east-1/alb/import.tm.hcl deleted file mode 100644 index a6a5f92..0000000 --- a/stacks/terraform/prod/us-east-1/alb/import.tm.hcl +++ /dev/null @@ -1,3 +0,0 @@ -import { - source = "/imports/modules/alb.tm.hcl" -} diff --git a/stacks/terraform/prod/us-east-1/alb/stack.tm.hcl b/stacks/terraform/prod/us-east-1/alb/stack.tm.hcl deleted file mode 100644 index e6d356f..0000000 --- a/stacks/terraform/prod/us-east-1/alb/stack.tm.hcl +++ /dev/null @@ -1,9 +0,0 @@ -stack { - name = "Production Application Load Balancer (ALB)" - description = "Production Application Load Balancer (ALB) deployed in us-east-1" - id = "93e0c782-1635-48cd-8717-d0728438fbac" - tags = ["loadbalancing"] - after = [ - "tag:networking" - ] -} diff --git a/stacks/terraform/prod/us-east-1/alb/terraform.tf b/stacks/terraform/prod/us-east-1/alb/terraform.tf deleted file mode 100644 index 3828f6e..0000000 --- a/stacks/terraform/prod/us-east-1/alb/terraform.tf +++ /dev/null @@ -1,16 +0,0 @@ -// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT - -terraform { - required_version = "1.7.5" -} -terraform { - required_providers { - aws = { - source = "hashicorp/aws" - version = "~> 5.48" - } - } -} -provider "aws" { - region = "us-east-1" -} diff --git a/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/backend.tf b/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/backend.tf deleted file mode 100644 index 14cd05a..0000000 --- a/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/backend.tf +++ /dev/null @@ -1,11 +0,0 @@ -// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT - -terraform { - backend "s3" { - bucket = "terramate-example-terraform-state-backend" - dynamodb_table = "terraform-lock" - encrypt = true - key = "terraform/stacks/by-id/ac1cbc21-a7d8-451e-a12e-f390bbcc1a51/terraform.tfstate" - region = "us-east-1" - } -} diff --git a/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/ecs-fargate-cluster.tf b/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/ecs-fargate-cluster.tf deleted file mode 100644 index 185408a..0000000 --- a/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/ecs-fargate-cluster.tf +++ /dev/null @@ -1,24 +0,0 @@ -// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT - -module "ecs_cluster" { - cluster_name = "prd-ecs-cluster" - fargate_capacity_providers = { - FARGATE = { - default_capacity_provider_strategy = { - base = 20 - weight = 50 - } - } - FARGATE_SPOT = { - default_capacity_provider_strategy = { - weight = 50 - } - } - } - source = "terraform-aws-modules/ecs/aws//modules/cluster" - tags = { - Environment = "prd" - Terraform = "true" - } - version = "5.11.1" -} diff --git a/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/import.tm.hcl b/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/import.tm.hcl deleted file mode 100644 index c32d872..0000000 --- a/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/import.tm.hcl +++ /dev/null @@ -1,3 +0,0 @@ -import { - source = "/imports/modules/ecs-fargate-cluster.tm.hcl" -} diff --git a/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/stack.tm.hcl b/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/stack.tm.hcl deleted file mode 100644 index f4df749..0000000 --- a/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/stack.tm.hcl +++ /dev/null @@ -1,6 +0,0 @@ -stack { - name = "ECS Fargate Cluster Production" - description = "Production ECS Fargate Cluster deployed in us-east-1" - id = "ac1cbc21-a7d8-451e-a12e-f390bbcc1a51" - tags = ["ecs-cluster"] -} diff --git a/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/terraform.tf b/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/terraform.tf deleted file mode 100644 index 3828f6e..0000000 --- a/stacks/terraform/prod/us-east-1/ecs-fargate-cluster/terraform.tf +++ /dev/null @@ -1,16 +0,0 @@ -// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT - -terraform { - required_version = "1.7.5" -} -terraform { - required_providers { - aws = { - source = "hashicorp/aws" - version = "~> 5.48" - } - } -} -provider "aws" { - region = "us-east-1" -} diff --git a/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/backend.tf b/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/backend.tf deleted file mode 100644 index 6774caf..0000000 --- a/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/backend.tf +++ /dev/null @@ -1,11 +0,0 @@ -// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT - -terraform { - backend "s3" { - bucket = "terramate-example-terraform-state-backend" - dynamodb_table = "terraform-lock" - encrypt = true - key = "terraform/stacks/by-id/df307956-cf80-4621-ab63-124a90cc65d1/terraform.tfstate" - region = "us-east-1" - } -} diff --git a/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/ecs_fargate_service.tf b/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/ecs_fargate_service.tf deleted file mode 100644 index 5f951ea..0000000 --- a/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/ecs_fargate_service.tf +++ /dev/null @@ -1,96 +0,0 @@ -// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT - -resource "null_resource" "initial_deployment_trigger" { -} -data "aws_ecs_cluster" "ecs_cluster" { - cluster_name = "prd-ecs-cluster" - depends_on = [ - null_resource.initial_deployment_trigger, - ] -} -data "aws_vpc" "vpc" { - depends_on = [ - null_resource.initial_deployment_trigger, - ] - tags = { - Environment = "prd" - Terraform = "true" - } -} -data "aws_subnets" "subnets" { - tags = { - Tier = "private" - } - filter { - name = "vpc-id" - values = [ - data.aws_vpc.vpc.id, - ] - } -} -data "aws_lb_target_group" "target_group" { - depends_on = [ - null_resource.initial_deployment_trigger, - ] - name = "tf-20240422214757001900000002" -} -data "aws_security_group" "security_group" { - depends_on = [ - null_resource.initial_deployment_trigger, - ] - id = "sg-0c8333576937a6733" -} -module "ecs_service" { - cluster_arn = data.aws_ecs_cluster.ecs_cluster.arn - container_definitions = { - nginx = { - cpu = 256 - essential = true - image = "public.ecr.aws/nginx/nginx:1.25-bookworm" - memory = 512 - port_mappings = [ - { - containerPort = 80 - hostPort = 80 - name = "nginx" - protocol = "tcp" - }, - ] - readonly_root_filesystem = false - } - } - load_balancer = { - service = { - target_group_arn = data.aws_lb_target_group.target_group.arn - container_name = "nginx" - container_port = 80 - } - } - name = "nginx" - security_group_rules = { - alb_ingress_3000 = { - type = "ingress" - from_port = 80 - to_port = 80 - protocol = "tcp" - description = "Service port" - source_security_group_id = data.aws_security_group.security_group.id - } - egress_all = { - type = "egress" - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = [ - "0.0.0.0/0", - ] - } - } - source = "terraform-aws-modules/ecs/aws//modules/service" - subnet_ids = data.aws_subnets.subnets.ids - tags = { - Environment = "prd" - Terraform = "true" - } - version = "5.11.1" -} diff --git a/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/import.tm.hcl b/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/import.tm.hcl deleted file mode 100644 index d3ccb26..0000000 --- a/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/import.tm.hcl +++ /dev/null @@ -1,3 +0,0 @@ -import { - source = "/imports/modules/ecs-fargate-service.tm.hcl" -} diff --git a/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/stack.tm.hcl b/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/stack.tm.hcl deleted file mode 100644 index 5ebcd8f..0000000 --- a/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/stack.tm.hcl +++ /dev/null @@ -1,11 +0,0 @@ -stack { - name = "ECS Nginx Service Production" - description = "Production ECS Nginx Service deployed in us-east-1" - id = "df307956-cf80-4621-ab63-124a90cc65d1" - after = [ - "tag:networking", - "tag:loadbalancer", - "tag:ecs-cluster", - ] - -} diff --git a/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/terraform.tf b/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/terraform.tf deleted file mode 100644 index 3828f6e..0000000 --- a/stacks/terraform/prod/us-east-1/ecs-fargate-services/nginx/terraform.tf +++ /dev/null @@ -1,16 +0,0 @@ -// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT - -terraform { - required_version = "1.7.5" -} -terraform { - required_providers { - aws = { - source = "hashicorp/aws" - version = "~> 5.48" - } - } -} -provider "aws" { - region = "us-east-1" -} diff --git a/stacks/terraform/prod/us-east-1/vpc/backend.tf b/stacks/terraform/prod/us-east-1/vpc/backend.tf deleted file mode 100644 index 1b6cdd9..0000000 --- a/stacks/terraform/prod/us-east-1/vpc/backend.tf +++ /dev/null @@ -1,11 +0,0 @@ -// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT - -terraform { - backend "s3" { - bucket = "terramate-example-terraform-state-backend" - dynamodb_table = "terraform-lock" - encrypt = true - key = "terraform/stacks/by-id/6f9c219c-cb68-4cac-8753-d94336f565e7/terraform.tfstate" - region = "us-east-1" - } -} diff --git a/stacks/terraform/prod/us-east-1/vpc/import.tm.hcl b/stacks/terraform/prod/us-east-1/vpc/import.tm.hcl deleted file mode 100644 index 92d3a8d..0000000 --- a/stacks/terraform/prod/us-east-1/vpc/import.tm.hcl +++ /dev/null @@ -1,3 +0,0 @@ -import { - source = "/imports/modules/vpc.tm.hcl" -} diff --git a/stacks/terraform/prod/us-east-1/vpc/stack.tm.hcl b/stacks/terraform/prod/us-east-1/vpc/stack.tm.hcl deleted file mode 100644 index f10f414..0000000 --- a/stacks/terraform/prod/us-east-1/vpc/stack.tm.hcl +++ /dev/null @@ -1,6 +0,0 @@ -stack { - name = "Production Virtual Private Network (VPC)" - description = "Production Virtual Private Network (VPC) deployed in us-east-1" - id = "6f9c219c-cb68-4cac-8753-d94336f565e7" - tags = ["networking"] -} diff --git a/stacks/terraform/prod/us-east-1/vpc/terraform.tf b/stacks/terraform/prod/us-east-1/vpc/terraform.tf deleted file mode 100644 index 3828f6e..0000000 --- a/stacks/terraform/prod/us-east-1/vpc/terraform.tf +++ /dev/null @@ -1,16 +0,0 @@ -// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT - -terraform { - required_version = "1.7.5" -} -terraform { - required_providers { - aws = { - source = "hashicorp/aws" - version = "~> 5.48" - } - } -} -provider "aws" { - region = "us-east-1" -} diff --git a/stacks/terraform/prod/us-east-1/vpc/vpc.tf b/stacks/terraform/prod/us-east-1/vpc/vpc.tf deleted file mode 100644 index 87f6bcb..0000000 --- a/stacks/terraform/prod/us-east-1/vpc/vpc.tf +++ /dev/null @@ -1,35 +0,0 @@ -// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT - -module "vpc" { - azs = [ - "us-east-1a", - "us-east-1b", - "us-east-1c", - ] - cidr = "10.0.0.0/16" - enable_nat_gateway = true - enable_vpn_gateway = true - name = "prd-vpc" - private_subnet_tags = { - Tier = "private" - } - private_subnets = [ - "10.0.1.0/24", - "10.0.2.0/24", - "10.0.3.0/24", - ] - public_subnet_tags = { - Tier = "public" - } - public_subnets = [ - "10.0.101.0/24", - "10.0.102.0/24", - "10.0.103.0/24", - ] - source = "terraform-aws-modules/vpc/aws" - tags = { - Environment = "prd" - Terraform = "true" - } - version = "5.7.1" -}