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

aws_autoscaling_group tag is changed on every apply #16026

Closed
moonyoungheo opened this issue Sep 6, 2017 · 4 comments
Closed

aws_autoscaling_group tag is changed on every apply #16026

moonyoungheo opened this issue Sep 6, 2017 · 4 comments

Comments

@moonyoungheo
Copy link

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

If your issue relates to a specific Terraform provider, please open it in the provider's own repository. The index of providers is at https://github.com/terraform-providers .

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please try upgrading because your issue may have already been fixed.

$ terraform -v
Terraform v0.10.2

Terraform Configuration Files

# Copy-paste your Terraform configurations here.
#
# For large Terraform configs, please use a service like Dropbox and
# share a link to the ZIP file. For security, you can also encrypt the
# files using our GPG public key.
resource "aws_autoscaling_group" "default" {
  name = "asg-${var.region_id}-${var.environment}-${var.name}-vpc${var.vpc_no}-${var.application}-001"

  availability_zones   = ["${var.availability_zones}"]
  vpc_zone_identifier  = ["${var.private_app_subnet_ids}"]
  launch_configuration = "${aws_launch_configuration.default.id}"
  min_size             = "${var.min_size}"
  max_size             = "${var.max_size}"
  desired_capacity     = "${var.desired_capacity}"
  enabled_metrics      = ["GroupMinSize", "GroupMaxSize", "GroupDesiredCapacity", "GroupInServiceInstances", "GroupPendingInstances", "GroupStandbyInstances", "GroupTerminatingInstances", "GroupTotalInstances"]

  tag {
    key                 = "Name"
    value               = "ec2-${var.region_id}-${var.environment}-${var.name}-vpc${var.vpc_no}-${var.application}-001"
    propagate_at_launch = true
  }

  tag {
    key                 = "ApplicationService"
    value               = "${var.application_service}"
    propagate_at_launch = true
  }

  tag {
    key                 = "ApplicationRole"
    value               = "AutoScalingGroup"
    propagate_at_launch = true
  }

  tag {
    key                 = "Cluster"
    value               = "n"
    propagate_at_launch = true
  }

  tag {
    key                 = "Environment"
    value               = "${var.environment}"
    propagate_at_launch = true
  }

  tag {
    key                 = "Version"
    value               = "001"
    propagate_at_launch = true
  }

  tag {
    key                 = "BuildDate"
    value               = "${var.build_date}"
    propagate_at_launch = true
  }

  tag {
    key                 = "AutomationDateTime"
    value               = "N/A"
    propagate_at_launch = true
  }

  tag {
    key                 = "AutomationOptinOptout"
    value               = "n"
    propagate_at_launch = true
  }

  tag {
    key                 = "Owner"
    value               = "Platform"
    propagate_at_launch = true
  }

  tag {
    key                 = "BusinessUnit"
    value               = "Platform"
    propagate_at_launch = true
  }

  tag {
    key                 = "Project"
    value               = "Platform"
    propagate_at_launch = true
  }

  tag {
    key                 = "Region"
    value               = "${var.region}"
    propagate_at_launch = true
  }

  tag {
    key                 = "Confidentiality"
    value               = "Highly Confidential"
    propagate_at_launch = true
  }

  tag {
    key                 = "Confidentiality"
    value               = "AutoScalingGroup"
    propagate_at_launch = true
  }

  tag {
    key                 = "Compliance"
    value               = "PCI"
    propagate_at_launch = true
  }

  lifecycle {
    create_before_destroy = true
  }
}

Debug Output

Full debug output can be obtained by running Terraform with the environment variable TF_LOG=trace. Please create a GitHub Gist containing the debug output. Please do not paste the debug output in the issue, since debug output is long.

Debug output may contain sensitive information. Please review it before posting publicly, and if you are concerned feel free to encrypt the files using the HashiCorp security public key.

Crash Output

If the console output indicates that Terraform crashed, please share a link to a GitHub Gist containing the output of the crash.log file.

Expected Behavior

What should have happened?

Template has not been changed anything so aws_autoscaling_group tag must not be changed on every change

Actual Behavior

What actually happened?

  ~ module.ecs_cluster.aws_autoscaling_group.default
      tag.#:                              "15" => "16"
      tag.1001254645.key:                 "Compliance" => "Compliance"
      tag.1001254645.propagate_at_launch: "true" => "true"
      tag.1001254645.value:               "PCI" => "PCI"
      tag.1030868569.key:                 "AutomationOptinOptout" => "AutomationOptinOptout"
      tag.1030868569.propagate_at_launch: "true" => "true"
      tag.1030868569.value:               "n" => "n"
      tag.1302504204.key:                 "Owner" => "Owner"
      tag.1302504204.propagate_at_launch: "true" => "true"
      tag.1302504204.value:               "Platform" => "Platform"
      tag.1659509620.key:                 "" => "Confidentiality"
      tag.1659509620.propagate_at_launch: "" => "true"
      tag.1659509620.value:               "" => "Highly Confidential"
      tag.1672063264.key:                 "Confidentiality" => "Confidentiality"
      tag.1672063264.propagate_at_launch: "true" => "true"
      tag.1672063264.value:               "AutoScalingGroup" => "AutoScalingGroup"
      tag.1913245155.key:                 "Project" => "Project"
      tag.1913245155.propagate_at_launch: "true" => "true"
      tag.1913245155.value:               "Platform" => "Platform"
      tag.1918643764.key:                 "Region" => "Region"
      tag.1918643764.propagate_at_launch: "true" => "true"
      tag.1918643764.value:               "eu-west-1" => "eu-west-1"
      tag.2058228540.key:                 "BuildDate" => "BuildDate"
      tag.2058228540.propagate_at_launch: "true" => "true"
      tag.2058228540.value:               "20170712" => "20170712"
      tag.2067016155.key:                 "ApplicationRole" => "ApplicationRole"
      tag.2067016155.propagate_at_launch: "true" => "true"
      tag.2067016155.value:               "AutoScalingGroup" => "AutoScalingGroup"
      tag.2071688994.key:                 "Name" => "Name"
      tag.2071688994.propagate_at_launch: "true" => "true"
      tag.2071688994.value:               "ec2-euw1-dev-commercial-vpc001-spint-001" => "ec2-euw1-dev-commercial-vpc001-spint-001"
      tag.337936437.key:                  "BusinessUnit" => "BusinessUnit"
      tag.337936437.propagate_at_launch:  "true" => "true"
      tag.337936437.value:                "Platform" => "Platform"
      tag.395285238.key:                  "Version" => "Version"
      tag.395285238.propagate_at_launch:  "true" => "true"
      tag.395285238.value:                "001" => "001"
      tag.501627836.key:                  "ApplicationService" => "ApplicationService"
      tag.501627836.propagate_at_launch:  "true" => "true"
      tag.501627836.value:                "shared" => "shared"
      tag.776695200.key:                  "Environment" => "Environment"
      tag.776695200.propagate_at_launch:  "true" => "true"
      tag.776695200.value:                "dev" => "dev"
      tag.899351132.key:                  "AutomationDateTime" => "AutomationDateTime"
      tag.899351132.propagate_at_launch:  "true" => "true"
      tag.899351132.value:                "N/A" => "N/A"
      tag.970032257.key:                  "Cluster" => "Cluster"
      tag.970032257.propagate_at_launch:  "true" => "true"
      tag.970032257.value:                "n" => "n"


Plan: 0 to add, 1 to change, 0 to destroy.

Steps to Reproduce

Please list the full steps required to reproduce the issue, for example:

  1. terraform init
  2. terraform apply

Important Factoids

Are there anything atypical about your situation that we should know? For example: is Terraform running in a wrapper script or in a CI system? Are you passing any unusual command line options or environment variables to opt-in to non-default behavior?

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

@hashibot
Copy link
Contributor

hashibot commented Sep 6, 2017

This issue has been automatically migrated to hashicorp/terraform-provider-aws#1597 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to this issue and let us know.

@moonyoungheo
Copy link
Author

Hi
I have not any response on #1597 and #16026
I still have the issue
Could you advise for the issue?

@vladimirtiukhtin
Copy link

Having same issues, but with security groups. Terraform just simply does not update its state file...

@ghost
Copy link

ghost commented Mar 31, 2020

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.

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants