Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed launch template not picked up by autoscaling group #202

Closed
1 task done
jstehlik-ohpen opened this issue Aug 15, 2022 · 4 comments · Fixed by #204
Closed
1 task done

Renamed launch template not picked up by autoscaling group #202

jstehlik-ohpen opened this issue Aug 15, 2022 · 4 comments · Fixed by #204
Labels

Comments

@jstehlik-ohpen
Copy link

Description

After renaming a launch template created by this module (which causes replacement), the associated autoscaling group does not pick up the new launch template, but references the old one.

  • ✋ I have searched the open/closed issues and my issue is not listed.

Versions

  • Module version [Required]: 6.5.1

  • Terraform version: ~> 1.0

  • Provider version(s):

    • aws: ~> 4.0

Reproduction Code [Required]

Steps to reproduce the behavior:

  1. Create autoscaling group with launch template
launch_template_name            = "old-launch-template"
launch_template_use_name_prefix = false
  1. Rename launch template in module call
launch_template_name            = "new-launch-template"
launch_template_use_name_prefix = false

Expected behavior

After renaming launch template (or other change causing replacement) created by this module, autoscaling group uses the new launch template

Actual behavior

After renaming launch template, autoscaling attempts to use the old launch template

Terminal Output Screenshot(s)

# module.ecs_cluster[0].module.asg_linux.aws_autoscaling_group.this[0] will be updated in-place
  ~ resource "aws_autoscaling_group" "this" {
        id                        = "tst-main-ecs-cluster-linux"
        name                      = "tst-main-ecs-cluster-linux"
        # (23 unchanged attributes hidden)

      ~ launch_template {
            id      = "lt-086c081e7ef0e0ffc"
          ~ name    = "tst-main-ecs-cluster-20220801142903803500000001" -> "tst-main-ecs-cluster-linux"
          ~ version = "1" -> (known after apply)
        }

        # (12 unchanged blocks hidden)
    }

# module.ecs_cluster[0].module.asg_linux.aws_launch_template.this[0] must be replaced
+/- resource "aws_launch_template" "this" {
      ~ arn                     = "arn:aws:ec2:***:************:launch-template/lt-086c081e7ef0e0ffc" -> (known after apply)
      ~ default_version         = 1 -> (known after apply)
      - disable_api_stop        = false -> null
      - disable_api_termination = false -> null
      ~ id                      = "lt-086c081e7ef0e0ffc" -> (known after apply)
@github-actions
Copy link

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale label Sep 15, 2022
@github-actions
Copy link

This issue was automatically closed because of stale in 10 days

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2022
@antonbabenko
Copy link
Member

This issue has been resolved in version 7.0.0 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants