Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Commit f2aca71

Browse files
authored
Adding ntgw s3 overrides (#29)
* adding overrides for nat_gateway and vpc_endpoints * fixing var type
1 parent 362d7ff commit f2aca71

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,12 @@ resource "aws_vpc_endpoint" "s3" {
190190
route_table_ids = [for route_table in data.aws_route_table.all_non_public_route_tables : route_table.id]
191191

192192
tags = {
193-
Name = "${var.project}-${var.env}-s3-endpoint"
193+
Name = coalesce(var.vpc_endpoint_lookup_overrides, "${var.project}-${var.env}-s3-endpoint")
194194
}
195195
}
196196

197197
data "aws_eips" "nat_gateways" {
198198
tags = {
199-
Name = "${var.project}-*-${var.env}-nat-gateway-*"
199+
Name = coalesce(var.nat_gateways_lookup_overrides, "${var.project}-*-${var.env}-nat-gateway-*")
200200
}
201201
}

variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,15 @@ variable "create_s3_vpc_endpoint" {
6363
description = "toggle on/off the creation of s3 vpc endpoint"
6464
default = true
6565
}
66+
67+
variable "vpc_endpoint_lookup_overrides" {
68+
description = "Some vpc endpoints don't follow standard naming conventions. Use this map to override the query used for looking up Subnets. Ex: { private = \"foo-west-nonpublic-*\" }"
69+
default = ""
70+
type = string
71+
}
72+
73+
variable "nat_gateways_lookup_overrides" {
74+
description = "Some nat gateways don't follow standard naming conventions. Use this map to override the query used for looking up Subnets. Ex: { private = \"foo-west-nonpublic-*\" }"
75+
default = ""
76+
type = string
77+
}

0 commit comments

Comments
 (0)