-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
New resource: aws_autoscalingplans_scaling_plan #8965
Conversation
|
The name aws_autoscalingplans_scaling_plan is just a straw man as the resource is implemented via a new |
b44b96f
to
7dec826
Compare
74c3bd2
to
965799b
Compare
Removing WIP. |
Rebased to fix merge conflict. |
Rebased to fix merge conflict. $ 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
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling (80.60s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling (81.03s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicUpdate (112.85s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 112.920s
`` |
Rebased and did the Terraform Plugin SDK migration for the new resource. $ 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
go: finding github.com/terraform-providers/terraform-provider-tls v2.1.1+incompatible
go: finding github.com/terraform-providers/terraform-provider-tls v2.1.1+incompatible
=== RUN TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== RUN TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
=== RUN TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== PAUSE TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling (76.66s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling (77.07s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicUpdate (104.08s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 104.122s |
…Ec2InstanceTypeForAvailabilityZone'.
I am not sure who to direct this question to. What is preventing this patch from being merged currently? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR @ewbankkit! Design looks great overall. It seems though the waiter methods may need some tweaking in the Pending
states values as the following tests are consistently failing in Commercial and Gov Cloud:
--- FAIL: TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling (9.54s)
--- FAIL: TestAccAwsAutoScalingPlansScalingPlan_disappears (9.62s)
--- FAIL: TestAccAwsAutoScalingPlansScalingPlan_basicUpdate (9.66s)
--- FAIL: TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling (36.08s)
with the error(s):
Error: error waiting for Auto Scaling Scaling Plan (tf-acc-test-6121015609472249022/1) to be created: unexpected state 'NotFound', wanted target 'Active, ActiveWithProblems'. last error: %!s(<nil>)
Error: error waiting for Auto Scaling Scaling Plan (tf-acc-test-6406453948128485035/1) to be deleted: unexpected state 'Active', wanted target 'NotFound'. last error: %!s(<nil>)
…istency when waiting for creation and deletion. 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 === CONT TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling === CONT TestAccAwsAutoScalingPlansScalingPlan_basicUpdate === CONT TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling === CONT TestAccAwsAutoScalingPlansScalingPlan_disappears 2020/10/16 14:29:48 [INFO] Auto Scaling Scaling Plan (tf-acc-test-2865312284272710950/1) status message: Scaling plan has been created and applied to all resources. resource_aws_autoscalingplans_scaling_plan_test.go:268: [INFO] Got non-empty plan, as expected --- PASS: TestAccAwsAutoScalingPlansScalingPlan_disappears (53.00s) --- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling (57.22s) --- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling (67.94s) --- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicUpdate (99.22s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 99.262s
Modified the status codes used by the create and delete waiters to better handle eventual consistency. $ 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
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== CONT TestAccAwsAutoScalingPlansScalingPlan_disappears
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
=== CONT TestAccAwsAutoScalingPlansScalingPlan_disappears
resource_aws_autoscalingplans_scaling_plan_test.go:257: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_disappears (57.76s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling (60.68s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling (61.08s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicUpdate (93.65s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 93.687s |
Co-authored-by: angie pinilla <[email protected]>
…ith predictive scaling.
Added $ 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
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== CONT TestAccAwsAutoScalingPlansScalingPlan_disappears
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
provider_test.go:601: skipping tests; missing IAM service-linked role /aws-service-role/autoscaling-plans. Please create the role and retry
--- SKIP: TestAccAwsAutoScalingPlansScalingPlan_basicUpdate (0.87s)
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
provider_test.go:601: skipping tests; missing IAM service-linked role /aws-service-role/autoscaling-plans. Please create the role and retry
--- SKIP: TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling (0.98s)
=== CONT TestAccAwsAutoScalingPlansScalingPlan_disappears
resource_aws_autoscalingplans_scaling_plan_test.go:263: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_disappears (35.14s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling (59.48s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 59.523s after manually creating the service-linked role: $ 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
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling
=== CONT TestAccAwsAutoScalingPlansScalingPlan_disappears
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicUpdate
=== CONT TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling
=== CONT TestAccAwsAutoScalingPlansScalingPlan_disappears
resource_aws_autoscalingplans_scaling_plan_test.go:263: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_disappears (42.35s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling (56.60s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling (64.38s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicUpdate (78.71s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 78.746s |
Co-authored-by: angie pinilla <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great and acceptance tests have been corrected 👍
Output of acceptance tests (Commercial):
--- PASS: TestProvider_impl (0.12s)
--- PASS: TestProvider (1.81s)
--- PASS: TestAccAWSProvider_Region_AwsGovCloudUs (36.00s)
--- PASS: TestAccAWSProvider_Region_AwsCommercial (36.88s)
--- PASS: TestAccAWSProvider_Region_AwsChina (37.02s)
--- PASS: TestAccAWSProvider_IgnoreTags_KeyPrefixes_None (46.29s)
--- PASS: TestAccAWSProvider_Endpoints (46.14s)
--- PASS: TestAccAWSProvider_IgnoreTags_Keys_One (46.60s)
--- PASS: TestAccAWSProvider_IgnoreTags_EmptyConfigurationBlock (46.34s)
--- PASS: TestAccAWSProvider_IgnoreTags_KeyPrefixes_One (46.83s)
--- PASS: TestAccAWSProvider_IgnoreTags_Keys_None (46.92s)
--- PASS: TestAccAWSProvider_IgnoreTags_KeyPrefixes_Multiple (47.03s)
--- PASS: TestAccAWSProvider_IgnoreTags_Keys_Multiple (47.26s)
--- PASS: TestAccAWSProvider_AssumeRole_Empty (48.30s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_disappears (73.48s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling (92.06s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling (92.39s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicUpdate (117.60s)
Output of acceptance tests (Gov Cloud):
--- PASS: TestProvider_impl (0.17s)
--- PASS: TestProvider (1.17s)
--- SKIP: TestAccAwsAutoScalingPlansScalingPlan_basicPredictiveScaling (0.88s)
--- SKIP: TestAccAwsAutoScalingPlansScalingPlan_basicUpdate (0.56s)
--- PASS: TestAccAWSProvider_Region_AwsChina (34.51s)
--- PASS: TestAccAWSProvider_Region_AwsGovCloudUs (34.30s)
--- PASS: TestAccAWSProvider_Region_AwsCommercial (35.68s)
--- PASS: TestAccAWSProvider_Endpoints (43.40s)
--- PASS: TestAccAWSProvider_IgnoreTags_Keys_Multiple (42.95s)
--- PASS: TestAccAWSProvider_IgnoreTags_Keys_None (43.51s)
--- PASS: TestAccAWSProvider_IgnoreTags_Keys_One (43.36s)
--- PASS: TestAccAWSProvider_IgnoreTags_KeyPrefixes_One (44.37s)
--- PASS: TestAccAWSProvider_AssumeRole_Empty (44.08s)
--- PASS: TestAccAWSProvider_IgnoreTags_KeyPrefixes_None (44.39s)
--- PASS: TestAccAWSProvider_IgnoreTags_KeyPrefixes_Multiple (44.28s)
--- PASS: TestAccAWSProvider_IgnoreTags_EmptyConfigurationBlock (44.40s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_basicDynamicScaling (67.52s)
--- PASS: TestAccAwsAutoScalingPlansScalingPlan_disappears (71.39s)
This has been released in version 3.12.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! |
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! |
Community Note
Fixes #6562
Release note for CHANGELOG:
Output from acceptance testing: