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

Update Autoscaling Group with enabled_metrics #3899

Merged
merged 1 commit into from
Mar 28, 2018
Merged

Update Autoscaling Group with enabled_metrics #3899

merged 1 commit into from
Mar 28, 2018

Conversation

alucillo
Copy link

Fixed bug where the update step did not detect changes to the enabled_metrics list if it was empty.

#1098

  ~ module.us_east_2.aws_autoscaling_group.worker
      enabled_metrics.#:                         "0" => "8"
      enabled_metrics.119681000:                 "" => "GroupStandbyInstances"
      enabled_metrics.1940933563:                "" => "GroupTotalInstances"
      enabled_metrics.308948767:                 "" => "GroupPendingInstances"
      enabled_metrics.3267518000:                "" => "GroupTerminatingInstances"
      enabled_metrics.3394537085:                "" => "GroupDesiredCapacity"
      enabled_metrics.3551801763:                "" => "GroupInServiceInstances"
      enabled_metrics.4118539418:                "" => "GroupMinSize"
      enabled_metrics.4136111317:                "" => "GroupMaxSize"

@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label Mar 23, 2018
@bflad bflad added bug Addresses a defect in current functionality. service/autoscaling Issues and PRs that pertain to the autoscaling service. labels Mar 23, 2018
@bflad
Copy link
Contributor

bflad commented Mar 27, 2018

@alucillo this looks like a good change 👍

Can you please also update at least TestAccAWSAutoScalingGroup_basic to include resource.TestCheckResourceAttr("aws_autoscaling_group.bar", "enabled_metrics.#", "0"),? Even better would be an acceptance test that recreates the failure case in #1098. Another option is adding a TestStep with ImportState: true on a configuration with enabled_metrics defined as that would also catch this.

@bflad bflad added this to the v1.13.0 milestone Mar 27, 2018
@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Mar 27, 2018
@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label Mar 27, 2018
@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label Mar 27, 2018
@alucillo
Copy link
Author

I added the line you requested to TestAccAWSAutoScalingGroup_basic. I don't know if I'll have enough time to add the other acceptance test(s), but if I do I'll make another commit later.

@bflad bflad removed the waiting-response Maintainers are waiting on response from community or contributor. label Mar 28, 2018
@bflad bflad self-requested a review March 28, 2018 16:29
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for this fix! 🚀

18 tests passed (all tests)
=== RUN   TestAccAWSAutoScalingGroup_serviceLinkedRoleARN
--- PASS: TestAccAWSAutoScalingGroup_serviceLinkedRoleARN (58.85s)
=== RUN   TestAccAWSAutoScalingGroup_namePrefix
--- PASS: TestAccAWSAutoScalingGroup_namePrefix (59.51s)
=== RUN   TestAccAWSAutoScalingGroup_emptyAvailabilityZones
--- PASS: TestAccAWSAutoScalingGroup_emptyAvailabilityZones (81.05s)
=== RUN   TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier
--- PASS: TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier (84.77s)
=== RUN   TestAccAWSAutoScalingGroup_autoGeneratedName
--- PASS: TestAccAWSAutoScalingGroup_autoGeneratedName (87.05s)
=== RUN   TestAccAWSAutoScalingGroup_withMetrics
--- PASS: TestAccAWSAutoScalingGroup_withMetrics (93.76s)
=== RUN   TestAccAWSAutoScalingGroup_VpcUpdates
--- PASS: TestAccAWSAutoScalingGroup_VpcUpdates (117.21s)
=== RUN   TestAccAWSAutoScalingGroup_terminationPolicies
--- PASS: TestAccAWSAutoScalingGroup_terminationPolicies (120.97s)
=== RUN   TestAccAWSAutoScalingGroup_ALB_TargetGroups
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups (126.57s)
=== RUN   TestAccAWSAutoScalingGroup_withPlacementGroup
--- PASS: TestAccAWSAutoScalingGroup_withPlacementGroup (139.76s)
=== RUN   TestAccAWSAutoScalingGroup_importBasic
--- PASS: TestAccAWSAutoScalingGroup_importBasic (173.16s)
=== RUN   TestAccAWSAutoScalingGroup_enablingMetrics
--- PASS: TestAccAWSAutoScalingGroup_enablingMetrics (212.73s)
=== RUN   TestAccAWSAutoScalingGroup_initialLifecycleHook
--- PASS: TestAccAWSAutoScalingGroup_initialLifecycleHook (230.56s)
=== RUN   TestAccAWSAutoScalingGroup_suspendingProcesses
--- PASS: TestAccAWSAutoScalingGroup_suspendingProcesses (239.69s)
=== RUN   TestAccAWSAutoScalingGroup_basic
--- PASS: TestAccAWSAutoScalingGroup_basic (246.86s)
=== RUN   TestAccAWSAutoScalingGroup_tags
--- PASS: TestAccAWSAutoScalingGroup_tags (266.35s)
=== RUN   TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity (337.96s)
=== RUN   TestAccAWSAutoScalingGroup_WithLoadBalancer
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (349.72s)

@bflad bflad merged commit f943940 into hashicorp:master Mar 28, 2018
bflad added a commit that referenced this pull request Mar 28, 2018
@alucillo alucillo deleted the alucillo/autoscaling-group-fix-enable-metrics branch March 28, 2018 23:19
@bflad
Copy link
Contributor

bflad commented Mar 29, 2018

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

@ghost
Copy link

ghost commented Apr 7, 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 Apr 7, 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. service/autoscaling Issues and PRs that pertain to the autoscaling service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants