From 5b0ed6029ca477a70a117311e45aee263d37176b Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 29 Nov 2024 09:40:08 +0700 Subject: [PATCH] [#286] Revert adding of aws_vpc_endpoint --- .../images/architecture/diagram-complete.svg | 2 +- src/generators/addons/aws/modules/core/vpc.ts | 1 - templates/addons/aws/modules/vpc/main.tf | 19 ------------------- templates/addons/aws/modules/vpc/variables.tf | 5 ----- 4 files changed, 1 insertion(+), 26 deletions(-) diff --git a/.github/wiki/assets/images/architecture/diagram-complete.svg b/.github/wiki/assets/images/architecture/diagram-complete.svg index 06b104e3..8d2964b0 100644 --- a/.github/wiki/assets/images/architecture/diagram-complete.svg +++ b/.github/wiki/assets/images/architecture/diagram-complete.svg @@ -1 +1 @@ - + diff --git a/src/generators/addons/aws/modules/core/vpc.ts b/src/generators/addons/aws/modules/core/vpc.ts index ad3a0552..eddc2aab 100644 --- a/src/generators/addons/aws/modules/core/vpc.ts +++ b/src/generators/addons/aws/modules/core/vpc.ts @@ -20,7 +20,6 @@ const vpcModuleContent = dedent` source = "../modules/vpc" env_namespace = local.env_namespace - region = var.region }`; const applyAwsVpc = async (options: AwsOptions) => { diff --git a/templates/addons/aws/modules/vpc/main.tf b/templates/addons/aws/modules/vpc/main.tf index a4a20c02..0deec79b 100644 --- a/templates/addons/aws/modules/vpc/main.tf +++ b/templates/addons/aws/modules/vpc/main.tf @@ -15,22 +15,3 @@ module "vpc" { one_nat_gateway_per_az = false enable_dns_hostnames = true } - -data "aws_route_tables" "private_route_table" { - vpc_id = module.vpc.vpc_id - - filter { - name = "tag:Name" - values = ["${var.env_namespace}-vpc-private"] - } -} - -resource "aws_vpc_endpoint" "logs" { - vpc_id = module.vpc.vpc_id - service_name = "com.amazonaws.${var.region}.logs" - route_table_ids = data.aws_route_tables.private_route_table.ids - - tags = { - Name = "${var.env_namespace}-vpc-endpoint-logs" - } -} diff --git a/templates/addons/aws/modules/vpc/variables.tf b/templates/addons/aws/modules/vpc/variables.tf index b06ba14d..aa8b9f5f 100644 --- a/templates/addons/aws/modules/vpc/variables.tf +++ b/templates/addons/aws/modules/vpc/variables.tf @@ -2,8 +2,3 @@ variable "env_namespace" { description = "The namespace with environment for the VPCs, used as the prefix for the VPC names, e.g. acme-web-staging" type = string } - -variable "region" { - description = "AWS region" - type = string -}