Skip to content

Commit

Permalink
Merge pull request #360 from ministryofjustice/nd-510
Browse files Browse the repository at this point in the history
Added route for s3 endpoint
  • Loading branch information
jamesgreen-moj authored Sep 13, 2024
2 parents e21e421 + 1014aac commit f61a2a6
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions modules/servers_vpc/endpoints.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,23 @@ resource "aws_vpc_endpoint" "monitoring" {


resource "aws_vpc_endpoint" "s3" {
vpc_id = module.vpc.vpc_id
route_table_ids = module.vpc.private_route_table_ids
service_name = "com.amazonaws.${var.region}.s3"
tags = var.tags
vpc_id = module.vpc.vpc_id
route_table_ids = concat(
module.vpc.private_route_table_ids,
module.vpc.public_route_table_ids
)
service_name = "com.amazonaws.${var.region}.s3"
tags = var.tags
}

resource "aws_vpc_endpoint" "sts" {
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.public_subnets
service_name = "com.amazonaws.${var.region}.sts"
vpc_endpoint_type = "Interface"
private_dns_enabled = true
security_group_ids = [aws_security_group.endpoints.id]
tags = var.tags
}


Expand Down

0 comments on commit f61a2a6

Please sign in to comment.