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

r/aws_autoscalingplans_scaling_plan: Work around Plugin SDK bug updating Map in Set #17987

Conversation

ewbankkit
Copy link
Contributor

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 #17929.
Relates: hashicorp/terraform-plugin-sdk#588.

Output from acceptance testing:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsAutoScalingPlansScalingPlan_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsAutoScalingPlansScalingPlan_ -timeout 120m
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_disappears
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_disappears
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_disappears
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_disappears (57.92s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling (59.75s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling (60.09s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification (98.59s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicUpdate (110.94s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	111.067s

@ewbankkit ewbankkit requested a review from a team as a code owner March 8, 2021 21:29
@ghost ghost added size/L Managed by automation to categorize the size of a PR. service/autoscalingplans Issues and PRs that pertain to the autoscalingplans service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Mar 8, 2021
@ewbankkit
Copy link
Contributor Author

Without the fix:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification -timeout 120m
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification
    resource_aws_autoscalingplans_scaling_plan_test.go:312: Step 2/3 error: Error running apply: exit status 1
        2021/03/08 16:14:35 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.13.0
        
        Error: error updating Auto Scaling Scaling Plan (tf-acc-test-5827494292471838491/1): InvalidParameter: 4 validation error(s) found.
        - missing required field, UpdateScalingPlanInput.ScalingInstructions[0].ResourceId.
        - missing required field, UpdateScalingPlanInput.ScalingInstructions[0].ScalableDimension.
        - missing required field, UpdateScalingPlanInput.ScalingInstructions[0].ServiceNamespace.
        - missing required field, UpdateScalingPlanInput.ScalingInstructions[0].TargetTrackingConfigurations[0].TargetValue.
        
        
          on terraform_plugin_test.tf line 60, in resource "aws_autoscalingplans_scaling_plan" "test":
          60: resource "aws_autoscalingplans_scaling_plan" "test" {
        
        
--- FAIL: TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification (50.25s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	50.351s
FAIL
GNUmakefile:27: recipe for target 'testacc' failed
make: *** [testacc] Error 1

@ewbankkit ewbankkit force-pushed the r/aws_autoscalingplans_scaling_plan-customized_scaling_metric_specification-update branch from 5b6aa57 to 7ce23e8 Compare March 20, 2021 22:11
@gdavison gdavison self-assigned this Jul 15, 2021
…ing Map in Set.

Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsAutoScalingPlansScalingPlan_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsAutoScalingPlansScalingPlan_ -timeout 120m
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_disappears
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_disappears
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_disappears
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_disappears (57.92s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling (59.75s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling (60.09s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification (98.59s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicUpdate (110.94s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	111.067s
@ewbankkit ewbankkit force-pushed the r/aws_autoscalingplans_scaling_plan-customized_scaling_metric_specification-update branch from 7ce23e8 to 2cbc917 Compare October 6, 2021 12:55
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Oct 6, 2021
@ewbankkit
Copy link
Contributor Author

After rebase:

% make testacc TESTARGS='-run=TestAccAwsAutoScalingPlansScalingPlan_' 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsAutoScalingPlansScalingPlan_ -timeout 180m
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_disappears
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_disappears
=== RUN   TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_disappears
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
=== CONT  TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_disappears (79.63s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling (80.91s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling (90.61s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_dynamicScaling_CustomizedScalingMetricSpecification (123.71s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicUpdate (123.74s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	127.059s

@ewbankkit ewbankkit merged commit 12f6c15 into hashicorp:main Oct 6, 2021
@ewbankkit ewbankkit deleted the r/aws_autoscalingplans_scaling_plan-customized_scaling_metric_specification-update branch October 6, 2021 14:34
@github-actions github-actions bot added this to the v3.62.0 milestone Oct 6, 2021
@github-actions
Copy link

github-actions bot commented Oct 8, 2021

This functionality has been released in v3.62.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. Thank you!

@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, 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 Jun 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/autoscalingplans Issues and PRs that pertain to the autoscalingplans service. size/XL 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
2 participants