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 556 forks source link

Bug with Update LT version #172

Closed gregory-lecomte closed 2 years ago

gregory-lecomte commented 2 years ago

Description

Hello, I found an issue on LT version update. when I apply a change on LT, it's generate a new version and terraform display an error following this version update.

Versions

Reproduction

Steps to reproduce the behavior: Just try to modify a Launch template and terraform apply

Expected behavior

Apply LT update without error and update default LT version

Actual behavior

Display the following error message when the parameter "update_default_version" is true :

 Error: Provider produced inconsistent final plan
│ 
│ When expanding the plan for module.asg_gitlab_runner_manager.aws_autoscaling_group.this[0] to include new values learned so far during apply, provider
│ "registry.terraform.io/hashicorp/aws" produced an invalid new value for .launch_template[0].version: was cty.StringVal("4"), but now cty.StringVal("5").
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

If we do a second time a terraform apply we don't have error displayed, but the LT template isn't update

Additional context

bryantbiggs commented 2 years ago

hi @coopengo-glecomte - please file an issue with the upstream provider https://github.com/hashicorp/terraform-provider-aws/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc for this issue. It will help you can provide them with a way to reproduce the error you are seeing as well

antonbabenko commented 2 years ago

@coopengo-glecomte Maybe it is also related to the missing update_default_version = true - my assumption without seeing any code.

@bryantbiggs I am thinking loud... I wonder how can we demand code snippets from people when they open issues? It would save us so much time...

gregory-lecomte commented 2 years ago

@coopengo-glecomte Maybe it is also related to the missing update_default_version = true - my assumption without seeing any code.

@bryantbiggs I am thinking loud... I wonder how can we demand code snippets from people when they open issues? It would save us so much time...

Hi @antonbabenko I confirm that the parameter has been set in my config.

antonbabenko commented 2 years ago

Ok, looks like This is a bug in the provider, which should be reported in the provider's own issue tracker. as @bryantbiggs said in his previous comment.

gregory-lecomte commented 2 years ago

Yes, I've opened a new issue on the link shared by @bryantbiggs : https://github.com/hashicorp/terraform-provider-aws/issues/22264

bryantbiggs commented 2 years ago

@bryantbiggs I am thinking loud... I wonder how can we demand code snippets from people when they open issues? It would save us so much time...

@antonbabenko ya, it would be nice to have something that automatically checks if a repro block has been added to the issue

github-actions[bot] commented 1 year 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.