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

Eventbridge / Cloudwatch - ECS target placement strategy #28384

Conversation

mihneaspirescu
Copy link
Contributor

@mihneaspirescu mihneaspirescu commented Dec 15, 2022

Description

I've added the ordered_placement_strategy stanza to support task placement strategies in an ECS Task target for CloudWatch / EventBridge. The functionality has been implemented in such a way to maintain the order of strategies in order to comply with the documentation.

Relations

Closes #28259

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccEventsTarget_ecsPlacementStrategy PKG=events
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/events/... -v -count 1 -parallel 20 -run='TestAccEventsTarget_ecsPlacementStrategy'  -timeout 180m
=== RUN   TestAccEventsTarget_ecsPlacementStrategy
=== PAUSE TestAccEventsTarget_ecsPlacementStrategy
=== CONT  TestAccEventsTarget_ecsPlacementStrategy
--- PASS: TestAccEventsTarget_ecsPlacementStrategy (79.10s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	82.283s
...

@github-actions
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/L Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/events Issues and PRs that pertain to the events service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 15, 2022
@mihneaspirescu
Copy link
Contributor Author

Still WIP but any initial feedback is highly appreciated!

@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Dec 16, 2022
@mihneaspirescu mihneaspirescu changed the title [WIP] Eventbridge - ECS placement strategy Eventbridge / Cloudwatch - ECS target placement strategy Dec 16, 2022
@mihneaspirescu mihneaspirescu marked this pull request as ready for review December 16, 2022 09:02
@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 6, 2023
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=TestAccEventsTarget_' PKG=events ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/events/... -v -count 1 -parallel 2  -run=TestAccEventsTarget_ -timeout 180m
=== RUN   TestAccEventsTarget_basic
=== PAUSE TestAccEventsTarget_basic
=== RUN   TestAccEventsTarget_disappears
=== PAUSE TestAccEventsTarget_disappears
=== RUN   TestAccEventsTarget_eventBusName
=== PAUSE TestAccEventsTarget_eventBusName
=== RUN   TestAccEventsTarget_eventBusARN
=== PAUSE TestAccEventsTarget_eventBusARN
=== RUN   TestAccEventsTarget_generatedTargetID
=== PAUSE TestAccEventsTarget_generatedTargetID
=== RUN   TestAccEventsTarget_RetryPolicy_deadLetter
=== PAUSE TestAccEventsTarget_RetryPolicy_deadLetter
=== RUN   TestAccEventsTarget_full
=== PAUSE TestAccEventsTarget_full
=== RUN   TestAccEventsTarget_ssmDocument
=== PAUSE TestAccEventsTarget_ssmDocument
=== RUN   TestAccEventsTarget_http
=== PAUSE TestAccEventsTarget_http
=== RUN   TestAccEventsTarget_http_params
=== PAUSE TestAccEventsTarget_http_params
=== RUN   TestAccEventsTarget_ecs
=== PAUSE TestAccEventsTarget_ecs
=== RUN   TestAccEventsTarget_redshift
=== PAUSE TestAccEventsTarget_redshift
=== 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_batch
=== PAUSE TestAccEventsTarget_batch
=== RUN   TestAccEventsTarget_kinesis
=== PAUSE TestAccEventsTarget_kinesis
=== RUN   TestAccEventsTarget_sqs
=== PAUSE TestAccEventsTarget_sqs
=== RUN   TestAccEventsTarget_Input_transformer
=== PAUSE TestAccEventsTarget_Input_transformer
=== RUN   TestAccEventsTarget_inputTransformerJSONString
=== PAUSE TestAccEventsTarget_inputTransformerJSONString
=== RUN   TestAccEventsTarget_partnerEventBus
    target_test.go:913: Environment variable EVENT_BRIDGE_PARTNER_EVENT_BUS_NAME is not set
--- SKIP: TestAccEventsTarget_partnerEventBus (0.00s)
=== CONT  TestAccEventsTarget_basic
=== CONT  TestAccEventsTarget_ecsWithoutLaunchType
--- PASS: TestAccEventsTarget_basic (44.36s)
=== CONT  TestAccEventsTarget_full
--- PASS: TestAccEventsTarget_ecsWithoutLaunchType (75.63s)
=== CONT  TestAccEventsTarget_redshift
--- PASS: TestAccEventsTarget_full (49.58s)
=== CONT  TestAccEventsTarget_ecs
--- PASS: TestAccEventsTarget_ecs (31.08s)
=== CONT  TestAccEventsTarget_http_params
--- PASS: TestAccEventsTarget_http_params (31.31s)
=== CONT  TestAccEventsTarget_http
--- PASS: TestAccEventsTarget_http (43.12s)
=== CONT  TestAccEventsTarget_ssmDocument
--- PASS: TestAccEventsTarget_ssmDocument (18.06s)
=== CONT  TestAccEventsTarget_batch
--- PASS: TestAccEventsTarget_redshift (218.89s)
=== CONT  TestAccEventsTarget_inputTransformerJSONString
--- PASS: TestAccEventsTarget_inputTransformerJSONString (37.50s)
=== CONT  TestAccEventsTarget_Input_transformer
--- PASS: TestAccEventsTarget_batch (119.68s)
=== CONT  TestAccEventsTarget_sqs
--- PASS: TestAccEventsTarget_Input_transformer (40.01s)
=== CONT  TestAccEventsTarget_kinesis
--- PASS: TestAccEventsTarget_sqs (44.92s)
=== CONT  TestAccEventsTarget_eventBusARN
--- PASS: TestAccEventsTarget_eventBusARN (16.97s)
=== CONT  TestAccEventsTarget_RetryPolicy_deadLetter
--- PASS: TestAccEventsTarget_kinesis (48.39s)
=== CONT  TestAccEventsTarget_generatedTargetID
--- PASS: TestAccEventsTarget_generatedTargetID (17.03s)
=== CONT  TestAccEventsTarget_ecsFull
--- PASS: TestAccEventsTarget_RetryPolicy_deadLetter (52.87s)
=== CONT  TestAccEventsTarget_ecsPlacementStrategy
--- PASS: TestAccEventsTarget_ecsFull (30.65s)
=== CONT  TestAccEventsTarget_ecsCapacityProvider
--- PASS: TestAccEventsTarget_ecsCapacityProvider (69.07s)
=== CONT  TestAccEventsTarget_disappears
--- PASS: TestAccEventsTarget_ecsPlacementStrategy (89.83s)
=== CONT  TestAccEventsTarget_ecsWithBlankTaskCount
--- PASS: TestAccEventsTarget_disappears (14.31s)
=== CONT  TestAccEventsTarget_ecsWithBlankLaunchType
--- PASS: TestAccEventsTarget_ecsWithBlankTaskCount (30.71s)
=== CONT  TestAccEventsTarget_eventBusName
--- PASS: TestAccEventsTarget_eventBusName (17.50s)
--- PASS: TestAccEventsTarget_ecsWithBlankLaunchType (291.83s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	848.765s

@ewbankkit
Copy link
Contributor

@mihneaspirescu Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 8226457 into hashicorp:main Apr 20, 2023
@github-actions github-actions bot added this to the v4.64.0 milestone Apr 20, 2023
@github-actions
Copy link

This functionality has been released in v4.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. 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 May 21, 2023
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/events Issues and PRs that pertain to the events service. size/L 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.

[Enhancement]: Support PlacementStrategy in aws_cloudwatch_event_target with ecs_target
3 participants