Skip to content

Commit 43dce8b

Browse files
authored
Merge pull request #1939 from alphagov/whi-tw/ses-vpce
Create vpc endpoints for SES
2 parents 6e97595 + 2138a23 commit 43dce8b

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

infra/deployments/deploy/tools/vpc_endpoints.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,16 @@ resource "aws_vpc_endpoint" "ssm" {
9090
Name = "tools-ssm-endpoint"
9191
}
9292
}
93+
94+
resource "aws_vpc_endpoint" "ses" {
95+
vpc_id = aws_vpc.tools.id
96+
service_name = "com.amazonaws.eu-west-2.email"
97+
vpc_endpoint_type = "Interface"
98+
private_dns_enabled = true
99+
security_group_ids = [aws_security_group.vpc_endpoints.id]
100+
subnet_ids = local.subnets_to_deploy_vpc_endpoints_to
101+
102+
tags = {
103+
Name = "tools-ses-endpoint"
104+
}
105+
}

infra/modules/environment/endpoints.tf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,20 @@ resource "aws_vpc_endpoint" "ssm" {
102102
Name = "ssm-endpoint-${var.env_name}"
103103
}
104104
}
105+
106+
resource "aws_vpc_endpoint" "ses" {
107+
vpc_id = aws_vpc.forms.id
108+
service_name = "com.amazonaws.eu-west-2.email"
109+
vpc_endpoint_type = "Interface"
110+
private_dns_enabled = true
111+
security_group_ids = [aws_security_group.vpc_endpoints.id]
112+
subnet_ids = [
113+
aws_subnet.private_a.id,
114+
aws_subnet.private_b.id,
115+
aws_subnet.private_c.id,
116+
]
117+
118+
tags = {
119+
Name = "ses-endpoint-${var.env_name}"
120+
}
121+
}

0 commit comments

Comments
 (0)