int128 / terraform-aws-nat-instance

Terraform module to provision a NAT Instance using an Auto Scaling Group and Spot Instance from $1/month
https://registry.terraform.io/modules/int128/nat-instance/aws/
Apache License 2.0
175 stars 90 forks source link

tag ordering #16

Closed nelg closed 4 years ago

nelg commented 4 years ago

we've had a case where plans show up as changes in the resource "aws_autoscaling_group" "this" resource, because the "name" tag in AWS, is like the 4th tag down, and in this module, the name tag is at the bottom. It then tries to update the tags, but has no effect.

I suggest using the for_each loop, instead of in the local in the variables.tf, to use it in the autoscaling group, and add multiple tag blocks , rather than a single tags attribute containing the array of tags.

int128 commented 4 years ago

Thank you for contribution!