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
289 stars 553 forks source link

fix: Errors on `ignore_desired_capacity_changes = true` with mixed_instances_policy #183

Closed smaruy30 closed 2 years ago

smaruy30 commented 2 years ago

Description

fix: Errors on ignore_desired_capacity_changes = true with mixed_instances_policy

Motivation and Context

Configured the mixed_instances_policy object just like the example shows, but encounterd the following errors while applying an autoscaling group with ignore_desired_capacity_changes = true.

```
Error: Invalid function argument

  on .terraform/modules/asg/main.tf line 468, in resource "aws_autoscaling_group" "idc":
 468:             instance_type     = lookup(override.value, "instance_type", null)
    ├────────────────
    │ override.value is tuple with 6 elements

Invalid value for "inputMap" parameter: lookup() requires a map as the first argument.

Error: Invalid function argument

  on .terraform/modules/asg/main.tf line 469, in resource "aws_autoscaling_group" "idc":
 469:             weighted_capacity = lookup(override.value, "weighted_capacity", null)
    ├────────────────
    │ override.value is tuple with 6 elements

Invalid value for "inputMap" parameter: lookup() requires a map as the first argument.
```

If you set ignore_desired_capacity_changes = false with the same mixed_instance_policy, then terraform apply does not report these errors.

Breaking Changes

There are no breaking changes. It is a bug fix.

How Has This Been Tested?

Tested with Terraform v1.1.4

smaruy30 commented 2 years ago

@bryantbiggs This MR is not proceeding for 2weeks. Can you suggest me any actions missing from me?

bryantbiggs commented 2 years ago

@smaruy30 we'll need a reproduction showing the issue and then that will most likely get added as a test case so we can validate and sure functionality is maintained going forward

antonbabenko commented 2 years ago

This issue has been resolved in version 6.0.0 :tada:

smaruy30 commented 2 years ago

@antonbabenko Thanks for the update!

github-actions[bot] commented 1 year ago

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.