banyansecurity / terraform-aws-banyan-accesstier2

Apache License 2.0
1 stars 7 forks source link

fix: asg rebuilding on launch config rebuild #5

Closed pjain-taylor-lyra closed 1 year ago

pjain-taylor-lyra commented 1 year ago

We are converting our existing Netagent 1 access tier built using the AWS Ubuntu module to the new Netagent 2 version. We've noticed that the Auto Scaling group name is no longer "${var.name_prefix}-accesstier-asg", but aws_launch_configuration.conf.name. This introduces a breaking change where anytime the AMI is updated, the launch template will be re-created, and subsequently the autoscaling group will be re-created. This does not seem intended, so I am proposing adjustments as follows:

  1. (Required) Change aws_autoscaling_group.asg.name from aws_launch_configuration.conf.name to "${var.name}-accesstier-asg"
  2. (Optional) Change aws_launch_configuration.conf.name_prefix from "${var.name}-accesstier-conf" back to "${var.name}-accesstier-conf-"

Only the first change is necessary, the second change seems to be a revision of the old naming standard, which may also not be intended.

tdesikan commented 1 year ago

yikes! will review and merge asap