Allows the user to optionally disable the creation and management of NAT Gateways by alterNAT by setting create_nat_gateways=false
. When set, The user can manage NAT gateways separately - within the vpc module, for example - and alterNAT will work with those rather than provision its own.
When using create_nat_gateways=false
, you must allow alterNAT to manage the 0.0.0.0/0
route. That is, do not use an aws_route
resource for the NAT Gateway with 0.0.0.0/0
as a destination. alterNAT expects to be able to manage the route on its own using the NAT instance userdata script and the replace-route Lambda function. You can either remove the aws_route
resource from your configuration or set:
lifecycle {
ignore_changes = all
}
on the resource to ensure that Terraform ignores it.