File tree 3 files changed +30
-3
lines changed
3 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,13 @@ module "vpc_endpoints" {
122
122
service = " ecs"
123
123
private_dns_enabled = true
124
124
subnet_ids = module.vpc.private_subnets
125
+ subnet_configurations = [
126
+ for v in module . vpc . private_subnet_objects :
127
+ {
128
+ ipv4 = cidrhost (v. cidr_block , 10 )
129
+ subnet_id = v.id
130
+ }
131
+ ]
125
132
},
126
133
ecs_telemetry = {
127
134
create = false
Original file line number Diff line number Diff line change @@ -26,9 +26,19 @@ module "endpoints" {
26
26
tags = { Name = "dynamodb-vpc-endpoint" }
27
27
},
28
28
sns = {
29
- service = "sns"
30
- subnet_ids = ["subnet-12345678", "subnet-87654321"]
31
- tags = { Name = "sns-vpc-endpoint" }
29
+ service = "sns"
30
+ subnet_ids = ["subnet-12345678", "subnet-87654321"]
31
+ subnet_configurations = [
32
+ {
33
+ ipv4 = "10.8.34.10"
34
+ subnet_id = "subnet-12345678"
35
+ },
36
+ {
37
+ ipv4 = "10.8.35.10"
38
+ subnet_id = "subnet-87654321"
39
+ }
40
+ ]
41
+ tags = { Name = "sns-vpc-endpoint" }
32
42
},
33
43
sqs = {
34
44
service = "sqs"
Original file line number Diff line number Diff line change @@ -46,6 +46,16 @@ resource "aws_vpc_endpoint" "this" {
46
46
}
47
47
}
48
48
49
+ dynamic "subnet_configuration" {
50
+ for_each = try (each. value . subnet_configurations , [])
51
+
52
+ content {
53
+ ipv4 = try (subnet_configuration. value . ipv4 , null )
54
+ ipv6 = try (subnet_configuration. value . ipv6 , null )
55
+ subnet_id = try (subnet_configuration. value . subnet_id , null )
56
+ }
57
+ }
58
+
49
59
tags = merge (
50
60
var. tags ,
51
61
{ " Name" = replace (each. key , " ." , " -" ) },
You can’t perform that action at this time.
0 commit comments