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

resource/aws_autoscaling_group: Ignore ordering differences for tags argument #13515

Merged
merged 1 commit into from
May 27, 2020

Conversation

bflad
Copy link
Contributor

@bflad bflad commented May 27, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #13469

Release note for CHANGELOG:

* resource/aws_autoscaling_group: Ignore ordering differences for `tags` argument

Now that we are properly setting this attribute into the Terraform state, it highlighted ordering issues, which was not previously caught by the acceptance testing for the resource.

Previously (after test configuration adjustment):

--- FAIL: TestAccAWSAutoScalingGroup_basic (147.82s)
    TestAccAWSAutoScalingGroup_basic: testing.go:684: Step 0 error: After applying this step, the plan was not empty:

        DIFF:

        UPDATE: aws_autoscaling_group.bar
...
          tags.#:                     "3" => "3"
          tags.0.key:                 "FromTags1" => "FromTags1"
          tags.0.propagate_at_launch: "true" => "true"
          tags.0.value:               "value1" => "value1"
          tags.1.key:                 "FromTags2" => "FromTags3"
          tags.1.propagate_at_launch: "true" => "true"
          tags.1.value:               "value2" => "value3"
          tags.2.key:                 "FromTags3" => "FromTags2"
          tags.2.propagate_at_launch: "true" => "true"
          tags.2.value:               "value3" => "value2"
...

Output from acceptance testing:

--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups (187.12s)
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity (342.93s)
--- PASS: TestAccAWSAutoScalingGroup_autoGeneratedName (79.14s)
--- PASS: TestAccAWSAutoScalingGroup_basic (267.48s)
--- PASS: TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier (78.67s)
--- PASS: TestAccAWSAutoScalingGroup_emptyAvailabilityZones (91.64s)
--- PASS: TestAccAWSAutoScalingGroup_enablingMetrics (207.54s)
--- PASS: TestAccAWSAutoScalingGroup_initialLifecycleHook (304.85s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate (87.94s)
--- PASS: TestAccAWSAutoScalingGroup_LaunchTemplate_IAMInstanceProfile (99.20s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate_update (175.02s)
--- PASS: TestAccAWSAutoScalingGroup_launchTempPartitionNum (90.52s)
--- PASS: TestAccAWSAutoScalingGroup_LoadBalancers (569.76s)
--- PASS: TestAccAWSAutoScalingGroup_MaxInstanceLifetime (87.50s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy (83.65s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandAllocationStrategy (56.61s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandBaseCapacity (160.95s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandPercentageAboveBaseCapacity (83.85s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotAllocationStrategy (116.76s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotInstancePools (112.29s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotMaxPrice (160.14s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_LaunchTemplateName (88.11s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_Version (116.78s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_InstanceType (123.93s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_WeightedCapacity (168.12s)
--- PASS: TestAccAWSAutoScalingGroup_namePrefix (78.08s)
--- PASS: TestAccAWSAutoScalingGroup_serviceLinkedRoleARN (53.32s)
--- PASS: TestAccAWSAutoScalingGroup_suspendingProcesses (242.59s)
--- PASS: TestAccAWSAutoScalingGroup_tags (287.70s)
--- PASS: TestAccAWSAutoScalingGroup_TargetGroupArns (316.34s)
--- PASS: TestAccAWSAutoScalingGroup_terminationPolicies (154.29s)
--- PASS: TestAccAWSAutoScalingGroup_VpcUpdates (175.10s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (423.35s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer_ToTargetGroup (428.41s)
--- PASS: TestAccAWSAutoScalingGroup_withMetrics (114.18s)
--- PASS: TestAccAWSAutoScalingGroup_withPlacementGroup (175.16s)

…` argument

Reference: #13469

Now that we are properly setting this attribute into the Terraform state, it highlighted ordering issues, which was not previously caught by the acceptance testing for the resource.

Previously (after test configuration adjustment):

```
--- FAIL: TestAccAWSAutoScalingGroup_basic (147.82s)
    TestAccAWSAutoScalingGroup_basic: testing.go:684: Step 0 error: After applying this step, the plan was not empty:

        DIFF:

        UPDATE: aws_autoscaling_group.bar
...
          tags.#:                     "3" => "3"
          tags.0.key:                 "FromTags1" => "FromTags1"
          tags.0.propagate_at_launch: "true" => "true"
          tags.0.value:               "value1" => "value1"
          tags.1.key:                 "FromTags2" => "FromTags3"
          tags.1.propagate_at_launch: "true" => "true"
          tags.1.value:               "value2" => "value3"
          tags.2.key:                 "FromTags3" => "FromTags2"
          tags.2.propagate_at_launch: "true" => "true"
          tags.2.value:               "value3" => "value2"
...
```

Output from acceptance testing:

```
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups (187.12s)
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity (342.93s)
--- PASS: TestAccAWSAutoScalingGroup_autoGeneratedName (79.14s)
--- PASS: TestAccAWSAutoScalingGroup_basic (267.48s)
--- PASS: TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier (78.67s)
--- PASS: TestAccAWSAutoScalingGroup_emptyAvailabilityZones (91.64s)
--- PASS: TestAccAWSAutoScalingGroup_enablingMetrics (207.54s)
--- PASS: TestAccAWSAutoScalingGroup_initialLifecycleHook (304.85s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate (87.94s)
--- PASS: TestAccAWSAutoScalingGroup_LaunchTemplate_IAMInstanceProfile (99.20s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate_update (175.02s)
--- PASS: TestAccAWSAutoScalingGroup_launchTempPartitionNum (90.52s)
--- PASS: TestAccAWSAutoScalingGroup_LoadBalancers (569.76s)
--- PASS: TestAccAWSAutoScalingGroup_MaxInstanceLifetime (87.50s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy (83.65s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandAllocationStrategy (56.61s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandBaseCapacity (160.95s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandPercentageAboveBaseCapacity (83.85s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotAllocationStrategy (116.76s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotInstancePools (112.29s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotMaxPrice (160.14s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_LaunchTemplateName (88.11s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_Version (116.78s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_InstanceType (123.93s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_WeightedCapacity (168.12s)
--- PASS: TestAccAWSAutoScalingGroup_namePrefix (78.08s)
--- PASS: TestAccAWSAutoScalingGroup_serviceLinkedRoleARN (53.32s)
--- PASS: TestAccAWSAutoScalingGroup_suspendingProcesses (242.59s)
--- PASS: TestAccAWSAutoScalingGroup_tags (287.70s)
--- PASS: TestAccAWSAutoScalingGroup_TargetGroupArns (316.34s)
--- PASS: TestAccAWSAutoScalingGroup_terminationPolicies (154.29s)
--- PASS: TestAccAWSAutoScalingGroup_VpcUpdates (175.10s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (423.35s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer_ToTargetGroup (428.41s)
--- PASS: TestAccAWSAutoScalingGroup_withMetrics (114.18s)
--- PASS: TestAccAWSAutoScalingGroup_withPlacementGroup (175.16s)
```
@bflad bflad added bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. labels May 27, 2020
@bflad bflad requested a review from a team May 27, 2020 17:10
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. service/autoscaling Issues and PRs that pertain to the autoscaling service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels May 27, 2020
@bflad bflad added this to the v2.64.0 milestone May 27, 2020
Copy link
Contributor

@appilon appilon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes me sad to use more sets but whatever works.

@bflad bflad merged commit 24927ba into master May 27, 2020
@bflad bflad deleted the b-aws_autoscaling_group-tags-TypeSet branch May 27, 2020 17:33
bflad added a commit that referenced this pull request May 27, 2020
@ghost
Copy link

ghost commented May 29, 2020

This has been released in version 2.64.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Jun 27, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Jun 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/autoscaling Issues and PRs that pertain to the autoscaling service. size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected diffs on aws_autoscaling_group since v2.63.0
2 participants