Skip to content

Commit bba0625

Browse files
Nihisilhoangmirs
andauthored
[#286] Fix: Terraform plan can't be applied because of VPC endpoint misconfiguration (#309)
Co-authored-by: Hoang Mirs <hoang.mirs@gmail.com>
1 parent 677fbb4 commit bba0625

File tree

4 files changed

+1
-26
lines changed

4 files changed

+1
-26
lines changed

.github/wiki/assets/images/architecture/diagram-complete.svg

Lines changed: 1 addition & 1 deletion
Loading

src/generators/addons/aws/modules/core/vpc.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const vpcModuleContent = dedent`
2020
source = "../modules/vpc"
2121
2222
env_namespace = local.env_namespace
23-
region = var.region
2423
}`;
2524

2625
const applyAwsVpc = async (options: AwsOptions) => {

templates/addons/aws/modules/vpc/main.tf

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,3 @@ module "vpc" {
1515
one_nat_gateway_per_az = false
1616
enable_dns_hostnames = true
1717
}
18-
19-
data "aws_route_tables" "private_route_table" {
20-
vpc_id = module.vpc.vpc_id
21-
22-
filter {
23-
name = "tag:Name"
24-
values = ["${var.env_namespace}-vpc-private"]
25-
}
26-
}
27-
28-
resource "aws_vpc_endpoint" "logs" {
29-
vpc_id = module.vpc.vpc_id
30-
service_name = "com.amazonaws.${var.region}.logs"
31-
route_table_ids = data.aws_route_tables.private_route_table.ids
32-
33-
tags = {
34-
Name = "${var.env_namespace}-vpc-endpoint-logs"
35-
}
36-
}

templates/addons/aws/modules/vpc/variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,3 @@ variable "env_namespace" {
22
description = "The namespace with environment for the VPCs, used as the prefix for the VPC names, e.g. acme-web-staging"
33
type = string
44
}
5-
6-
variable "region" {
7-
description = "AWS region"
8-
type = string
9-
}

0 commit comments

Comments
 (0)