From a7cd82b7b697ff9c99387d3f0514edd126d57ea5 Mon Sep 17 00:00:00 2001 From: Samuel Berston Date: Tue, 26 Nov 2024 21:19:27 -0800 Subject: [PATCH] vpc - vpc endpoints security group --- terraform/vpc.tf | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/terraform/vpc.tf b/terraform/vpc.tf index 0679025..b184bd4 100644 --- a/terraform/vpc.tf +++ b/terraform/vpc.tf @@ -76,3 +76,23 @@ module "vpc_endpoints" { ManagedBy = "terraform" } } + +resource "aws_security_group" "vpc_endpoints" { + name = "vpc-endpoints-sg" + description = "Security group for VPC endpoints" + vpc_id = module.vpc.vpc_id + + ingress { + from_port = 443 + to_port = 443 + protocol = "tcp" + cidr_blocks = [module.vpc.vpc_cidr_block] + description = "Allow HTTPS traffic from within VPC" + } + + tags = { + Name = "vpc-endpoints-sg" + Environment = "production" + ManagedBy = "terraform" + } +} \ No newline at end of file