diff --git a/.spacelift/config.yml b/.spacelift/config.yml index ebdc40f05..8ec282938 100644 --- a/.spacelift/config.yml +++ b/.spacelift/config.yml @@ -1,4 +1,4 @@ version: 1 -module_version: 0.3.4 +module_version: 0.3.5 diff --git a/main.tf b/main.tf index 70fa5d7c4..e098a2e0e 100644 --- a/main.tf +++ b/main.tf @@ -1135,10 +1135,11 @@ resource "aws_nat_gateway" "this" { tags = merge( { "Name" = format( - "${var.name_prefix}-${var.short_aws_region}%s-natgw", + "${var.name_prefix}-${var.short_aws_region}%s-natgw-%s", substr(element(var.azs, var.single_nat_gateway ? 0 : count.index), length(element(var.azs, var.single_nat_gateway ? 0 : count.index)) - 1, 1 - ) + ), + var.nat_gateway_suffix ) }, var.tags, diff --git a/variables.tf b/variables.tf index e82156f41..453578a24 100644 --- a/variables.tf +++ b/variables.tf @@ -1263,6 +1263,12 @@ variable "enable_tgw_nat_gateway" { default = false } +variable "nat_gateway_suffix" { + description = "Suffix to append to AWS NAT gateway name" + type = string + default = "main" +} + ################################################################################ # Customer Gateways ################################################################################