File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -382,6 +382,7 @@ resource "aws_vpc_endpoint" "ecr_api" {
382
382
vpc_endpoint_type = " Interface"
383
383
vpc_id = " ${ local . vpc_id } "
384
384
security_group_ids = [" ${ var . ecr_api_endpoint_security_group_ids } " ]
385
+ subnet_ids = [" ${ coalescelist (var. ecr_api_endpoint_subnet_ids , aws_subnet. private . * . id )} " ]
385
386
service_name = " ${ data . aws_vpc_endpoint_service . ecr_api . service_name } "
386
387
private_dns_enabled = " ${ var . ecr_api_endpoint_private_dns_enabled } "
387
388
}
@@ -401,6 +402,7 @@ resource "aws_vpc_endpoint" "ecr_dkr" {
401
402
vpc_endpoint_type = " Interface"
402
403
vpc_id = " ${ local . vpc_id } "
403
404
security_group_ids = [" ${ var . ecr_dkr_endpoint_security_group_ids } " ]
405
+ subnet_ids = [" ${ coalescelist (var. ecr_dkr_endpoint_subnet_ids , aws_subnet. private . * . id )} " ]
404
406
service_name = " ${ data . aws_vpc_endpoint_service . ecr_dkr . service_name } "
405
407
private_dns_enabled = " ${ var . ecr_dkr_endpoint_private_dns_enabled } "
406
408
}
Original file line number Diff line number Diff line change @@ -183,6 +183,11 @@ variable "enable_ecr_api_endpoint" {
183
183
default = false
184
184
}
185
185
186
+ variable "ecr_api_endpoint_subnet_ids" {
187
+ description = " The ID of one or more subnets in which to create a network interface for ECR api endpoint. If omitted, private subnets will be used."
188
+ default = []
189
+ }
190
+
186
191
variable "ecr_api_endpoint_private_dns_enabled" {
187
192
description = " Whether or not to associate a private hosted zone with the specified VPC for ECR API endpoint"
188
193
default = false
@@ -198,6 +203,11 @@ variable "enable_ecr_dkr_endpoint" {
198
203
default = false
199
204
}
200
205
206
+ variable "ecr_dkr_endpoint_subnet_ids" {
207
+ description = " The ID of one or more subnets in which to create a network interface for ECR dkr endpoint. If omitted, private subnets will be used."
208
+ default = []
209
+ }
210
+
201
211
variable "ecr_dkr_endpoint_private_dns_enabled" {
202
212
description = " Whether or not to associate a private hosted zone with the specified VPC for ECR DKR endpoint"
203
213
default = false
You can’t perform that action at this time.
0 commit comments