Skip to content

Commit 2080852

Browse files
add the s3 endpoint resource
1 parent b613ec6 commit 2080852

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

modules/comet_vpc/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,13 @@ module "vpc" {
3838
public_subnet_tags = var.eks_enabled ? { "kubernetes.io/role/elb" = 1 } : null
3939
private_subnet_tags = var.eks_enabled ? { "kubernetes.io/role/internal-elb" = 1 } : null
4040

41+
tags = local.tags
42+
}
43+
44+
resource "aws_vpc_endpoint" "s3" {
45+
vpc_id = module.vpc.vpc_id
46+
service_name = "com.amazonaws.${var.region}.s3"
47+
vpc_endpoint_type = "Gateway"
48+
route_table_ids = module.vpc.private_route_table_ids
4149
tags = local.tags
4250
}

modules/comet_vpc/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,9 @@ variable "eks_enabled" {
1111
variable "single_nat_gateway" {
1212
description = "Controls whether single NAT gateway used for all public subnets"
1313
type = bool
14+
}
15+
16+
variable "region" {
17+
description = "AWS region to provision resources in"
18+
type = string
1419
}

0 commit comments

Comments
 (0)