terraform-aws-modules / terraform-aws-autoscaling

Terraform module to create AWS Auto Scaling resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/autoscaling/aws
Apache License 2.0
292 stars 557 forks source link

create_traffic_source_attachment does not work as expected #278

Closed MaxPayneFH closed 2 months ago

MaxPayneFH commented 2 months ago

I'm trying to use the convenient create option on your module to reference a map to only create some resources in a certain terraform workspace, however all of the create flags in the terraform-aws-modules/autoscaling/aws module, work correctly for this purpose except the create_traffic_source_attachment = false.

When running terraform plan it always complains that _traffic_sourceidentifier is pointing to an object without attributes because it is referencing an ALB module that also as the create flag set to false(works fine on that module BTW).

I've tried this with version 7.4 to 7.7 of your module and the issue is present in all of them.

Could you please change your module to not expect the _traffic_sourceidentifier variable to be populated when _create_traffic_sourceattachment is set to false ?

MaxPayneFH commented 2 months ago

Forgot an important detail, if I create _aws_autoscaling_traffic_sourceattachment as a standalone resource outside of the module referencing the exact same locals, I don't get any error and succeed in having it created only in certain workspaces.

antonbabenko commented 2 months ago

This issue has been resolved in version 8.0.0 :tada:

github-actions[bot] commented 1 month ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.