hashicorp/terraform-aws-nomad

Module nomad-cluster : aws_autoscaling_attachment broken

so-development opened this issue · 1 comments

Hi,

I think the same issue that was reported for terraform-aws-consul (hashicorp/terraform-aws-consul#183) also exists for nomad.

When I try to create an "aws_autoscaling_attachment" by using the autoscaling group "autoscaling_group" of the module "nomad-cluster" I experience the following behavior:

First apply: Target groups are added
Second apply: Target groups are removed
Third apply: Target groups are added
...

Regarding to https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_attachment I guess the following snippet should also be added for the autoscaling group here:

  lifecycle {
    ignore_changes = [load_balancers, target_group_arns]
  }

The same change was made for terraform-aws consul here: hashicorp/terraform-aws-consul#188

Thanks for the fix in #78!