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_ecs_capacity_provider: add manged_draining argument #35421

Conversation

ari-hacks
Copy link
Contributor

Description

Adds managed_draining argument to aws_ecs_capacity_provider resource

Relations

Closes #35415

References

https://docs.aws.amazon.com/cli/latest/reference/ecs/create-capacity-provider.html#options
https://docs.aws.amazon.com/cli/latest/reference/ecs/update-capacity-provider.html#options
https://docs.aws.amazon.com/sdk-for-go/api/service/ecs/#ManagedDraining_Values

Output from Acceptance Testing

make testacc TESTARGS='-run=TestAccECSCapacityProvider_managedScaling$$\|TestAccECSCapacityProvider_basic$$' PKG=ecs

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecs/... -v -count 1 -parallel 20  -run=TestAccECSCapacityProvider_managedScaling$\|TestAccECSCapacityProvider_basic$ -timeout 360m
=== RUN   TestAccECSCapacityProvider_basic
=== PAUSE TestAccECSCapacityProvider_basic
=== RUN   TestAccECSCapacityProvider_managedScaling
=== PAUSE TestAccECSCapacityProvider_managedScaling
=== CONT  TestAccECSCapacityProvider_basic
=== CONT  TestAccECSCapacityProvider_managedScaling
--- PASS: TestAccECSCapacityProvider_basic (44.13s)
--- PASS: TestAccECSCapacityProvider_managedScaling (75.73s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ecs	75.932s
...

Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ecs Issues and PRs that pertain to the ecs service. service/events Issues and PRs that pertain to the events service. and removed size/XS Managed by automation to categorize the size of a PR. labels Jan 22, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 22, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @ari-hacks 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 22, 2024
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccECSCapacityProvider_\|TestAccECSClusterCapacityProviders_disappears' PKG=ecs ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecs/... -v -count 1 -parallel 3  -run=TestAccECSCapacityProvider_\|TestAccECSClusterCapacityProviders_disappears -timeout 360m
=== RUN   TestAccECSCapacityProvider_basic
=== PAUSE TestAccECSCapacityProvider_basic
=== RUN   TestAccECSCapacityProvider_disappears
=== PAUSE TestAccECSCapacityProvider_disappears
=== RUN   TestAccECSCapacityProvider_managedScaling
=== PAUSE TestAccECSCapacityProvider_managedScaling
=== RUN   TestAccECSCapacityProvider_managedScalingPartial
=== PAUSE TestAccECSCapacityProvider_managedScalingPartial
=== RUN   TestAccECSCapacityProvider_tags
=== PAUSE TestAccECSCapacityProvider_tags
=== RUN   TestAccECSClusterCapacityProviders_disappears
=== PAUSE TestAccECSClusterCapacityProviders_disappears
=== CONT  TestAccECSCapacityProvider_basic
=== CONT  TestAccECSCapacityProvider_managedScalingPartial
=== CONT  TestAccECSClusterCapacityProviders_disappears
--- PASS: TestAccECSCapacityProvider_managedScalingPartial (53.71s)
=== CONT  TestAccECSCapacityProvider_tags
--- PASS: TestAccECSClusterCapacityProviders_disappears (59.65s)
=== CONT  TestAccECSCapacityProvider_managedScaling
--- PASS: TestAccECSCapacityProvider_basic (61.92s)
=== CONT  TestAccECSCapacityProvider_disappears
--- PASS: TestAccECSCapacityProvider_disappears (49.21s)
--- PASS: TestAccECSCapacityProvider_tags (110.85s)
--- PASS: TestAccECSCapacityProvider_managedScaling (110.88s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ecs	180.595s
% make testacc TESTARGS='-run=TestAccEventsTarget_ecs' PKG=events ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/events/... -v -count 1 -parallel 3  -run=TestAccEventsTarget_ecs -timeout 360m
=== RUN   TestAccEventsTarget_ecs
=== PAUSE TestAccEventsTarget_ecs
=== RUN   TestAccEventsTarget_ecsWithoutLaunchType
=== PAUSE TestAccEventsTarget_ecsWithoutLaunchType
=== RUN   TestAccEventsTarget_ecsWithBlankLaunchType
=== PAUSE TestAccEventsTarget_ecsWithBlankLaunchType
=== RUN   TestAccEventsTarget_ecsWithBlankTaskCount
=== PAUSE TestAccEventsTarget_ecsWithBlankTaskCount
=== RUN   TestAccEventsTarget_ecsFull
=== PAUSE TestAccEventsTarget_ecsFull
=== RUN   TestAccEventsTarget_ecsCapacityProvider
=== PAUSE TestAccEventsTarget_ecsCapacityProvider
=== RUN   TestAccEventsTarget_ecsPlacementStrategy
=== PAUSE TestAccEventsTarget_ecsPlacementStrategy
=== RUN   TestAccEventsTarget_ecsNoPropagateTags
=== PAUSE TestAccEventsTarget_ecsNoPropagateTags
=== CONT  TestAccEventsTarget_ecs
=== CONT  TestAccEventsTarget_ecsFull
=== CONT  TestAccEventsTarget_ecsWithBlankLaunchType
--- PASS: TestAccEventsTarget_ecsFull (40.24s)
=== CONT  TestAccEventsTarget_ecsWithBlankTaskCount
--- PASS: TestAccEventsTarget_ecs (40.40s)
=== CONT  TestAccEventsTarget_ecsNoPropagateTags
--- PASS: TestAccEventsTarget_ecsWithBlankLaunchType (76.09s)
=== CONT  TestAccEventsTarget_ecsCapacityProvider
--- PASS: TestAccEventsTarget_ecsNoPropagateTags (38.17s)
=== CONT  TestAccEventsTarget_ecsWithoutLaunchType
--- PASS: TestAccEventsTarget_ecsWithBlankTaskCount (38.35s)
=== CONT  TestAccEventsTarget_ecsPlacementStrategy
--- PASS: TestAccEventsTarget_ecsCapacityProvider (56.64s)
--- PASS: TestAccEventsTarget_ecsWithoutLaunchType (68.30s)
=== NAME  TestAccEventsTarget_ecsPlacementStrategy
    testing_new.go:91: Error running post-test destroy, there may be dangling resources: exit status 1
        
        Error: waiting for ECS Capacity Provider (arn:aws:ecs:us-west-2:187416307283:capacity-provider/tf-acc-test-2206353144077823856) to delete: timeout while waiting for resource to be gone (last state: 'ACTIVE', timeout: 20m0s)
        
--- FAIL: TestAccEventsTarget_ecsPlacementStrategy (1256.88s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/events	1346.223s
FAIL
make: *** [testacc] Error 1

Failure is unrelated to this change (it's happening in CI).

@ewbankkit
Copy link
Contributor

@ari-hacks Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 122d94b into hashicorp:main Jan 24, 2024
43 checks passed
@github-actions github-actions bot added this to the v5.34.0 milestone Jan 24, 2024
Copy link

This functionality has been released in v5.34.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!

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 Feb 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/ecs Issues and PRs that pertain to the ecs service. service/events Issues and PRs that pertain to the events service. 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.

[Enhancement]: Add new managedDraining argument to aws_ecs_capacity_provider
3 participants