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

f/aws_cloudwatch_event_target: Add Capacity Providers #27068

Conversation

nckslvrmn
Copy link
Contributor

@nckslvrmn nckslvrmn commented Oct 3, 2022

Description

Adds the capacity_provider_strategy option to the ECS target type for cloudwatch event targets

Relations

Closes #21320

References

Output from Acceptance Testing

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

@github-actions
Copy link

github-actions bot commented Oct 3, 2022

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 service/events Issues and PRs that pertain to the events service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. size/M Managed by automation to categorize the size of a PR. labels Oct 3, 2022
@nckslvrmn nckslvrmn changed the title Adds the capacity_provider_strategy option to the ECS target type for… f/aws_cloudwatch_event_target: Add Capacity Providers Oct 3, 2022
@nckslvrmn nckslvrmn marked this pull request as draft October 3, 2022 16:00
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Oct 3, 2022
@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. and removed documentation Introduces or discusses updates to documentation. labels Oct 3, 2022
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Oct 3, 2022
@nckslvrmn nckslvrmn marked this pull request as ready for review October 3, 2022 17:47
@ewbankkit ewbankkit 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 Oct 4, 2022
nckslvrmn and others added 11 commits October 4, 2022 09:38
Acceptance test output:

% make testacc TESTARGS='-run=TestAccEventsTarget_disappears\|TestAccEventsTarget_basic' 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_disappears\|TestAccEventsTarget_basic -timeout 180m
=== RUN   TestAccEventsTarget_basic
=== PAUSE TestAccEventsTarget_basic
=== RUN   TestAccEventsTarget_disappears
=== PAUSE TestAccEventsTarget_disappears
=== CONT  TestAccEventsTarget_basic
=== CONT  TestAccEventsTarget_disappears
--- PASS: TestAccEventsTarget_disappears (17.66s)
--- PASS: TestAccEventsTarget_basic (31.39s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	35.492s
…ame'.

Acceptance test output:

% make testacc TESTARGS='-run=TestAccEventsTarget_eventBusName' 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_eventBusName -timeout 180m
=== RUN   TestAccEventsTarget_eventBusName
=== PAUSE TestAccEventsTarget_eventBusName
=== CONT  TestAccEventsTarget_eventBusName
--- PASS: TestAccEventsTarget_eventBusName (21.09s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	25.409s
Acceptance test output:

% make testacc TESTARGS='-run=TestAccEventsTarget_redshift' 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_redshift -timeout 180m
=== RUN   TestAccEventsTarget_redshift
=== PAUSE TestAccEventsTarget_redshift
=== CONT  TestAccEventsTarget_redshift
--- PASS: TestAccEventsTarget_redshift (293.87s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	297.932s
…cy_deadLetter'.

Acceptance test output:

% make testacc TESTARGS='-run=TestAccEventsTarget_RetryPolicy_deadLetter' 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_RetryPolicy_deadLetter -timeout 180m
=== RUN   TestAccEventsTarget_RetryPolicy_deadLetter
=== PAUSE TestAccEventsTarget_RetryPolicy_deadLetter
=== CONT  TestAccEventsTarget_RetryPolicy_deadLetter
--- PASS: TestAccEventsTarget_RetryPolicy_deadLetter (64.14s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	68.176s
Acceptance test output:

% make testacc TESTARGS='-run=TestAccEventsTarget_sqs' 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_sqs -timeout 180m
=== RUN   TestAccEventsTarget_sqs
=== PAUSE TestAccEventsTarget_sqs
=== CONT  TestAccEventsTarget_sqs
--- PASS: TestAccEventsTarget_sqs (48.38s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	52.336s
Acceptance test output:

% 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 180m
=== 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
=== CONT  TestAccEventsTarget_ecs
=== CONT  TestAccEventsTarget_ecsCapacityProvider
=== CONT  TestAccEventsTarget_ecsWithBlankTaskCount
--- PASS: TestAccEventsTarget_ecs (32.98s)
=== CONT  TestAccEventsTarget_ecsWithBlankLaunchType
--- PASS: TestAccEventsTarget_ecsWithBlankTaskCount (33.05s)
=== CONT  TestAccEventsTarget_ecsFull
--- PASS: TestAccEventsTarget_ecsFull (31.52s)
=== CONT  TestAccEventsTarget_ecsWithoutLaunchType
--- PASS: TestAccEventsTarget_ecsCapacityProvider (82.25s)
--- PASS: TestAccEventsTarget_ecsWithoutLaunchType (64.20s)
--- PASS: TestAccEventsTarget_ecsWithBlankLaunchType (285.99s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	322.550s
@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 4, 2022
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=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/events/... -v -count 1 -parallel 3  -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_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:853: Environment variable EVENT_BRIDGE_PARTNER_EVENT_BUS_NAME is not set
--- SKIP: TestAccEventsTarget_partnerEventBus (0.00s)
=== CONT  TestAccEventsTarget_basic
=== CONT  TestAccEventsTarget_redshift
=== CONT  TestAccEventsTarget_batch
--- PASS: TestAccEventsTarget_basic (40.09s)
=== CONT  TestAccEventsTarget_full
--- PASS: TestAccEventsTarget_full (51.17s)
=== CONT  TestAccEventsTarget_ecs
--- PASS: TestAccEventsTarget_ecs (32.49s)
=== CONT  TestAccEventsTarget_http_params
--- PASS: TestAccEventsTarget_batch (125.43s)
=== CONT  TestAccEventsTarget_http
--- PASS: TestAccEventsTarget_http (28.18s)
=== CONT  TestAccEventsTarget_ssmDocument
--- PASS: TestAccEventsTarget_ssmDocument (19.62s)
=== CONT  TestAccEventsTarget_Input_transformer
--- PASS: TestAccEventsTarget_http_params (80.34s)
=== CONT  TestAccEventsTarget_inputTransformerJSONString
--- PASS: TestAccEventsTarget_Input_transformer (44.47s)
=== CONT  TestAccEventsTarget_ecsWithBlankTaskCount
--- PASS: TestAccEventsTarget_inputTransformerJSONString (39.90s)
=== CONT  TestAccEventsTarget_ecsCapacityProvider
--- PASS: TestAccEventsTarget_ecsWithBlankTaskCount (33.21s)
=== CONT  TestAccEventsTarget_ecsFull
--- PASS: TestAccEventsTarget_redshift (274.96s)
=== CONT  TestAccEventsTarget_eventBusARN
--- PASS: TestAccEventsTarget_ecsFull (31.77s)
=== CONT  TestAccEventsTarget_RetryPolicy_deadLetter
--- PASS: TestAccEventsTarget_eventBusARN (19.59s)
=== CONT  TestAccEventsTarget_generatedTargetID
--- PASS: TestAccEventsTarget_generatedTargetID (20.46s)
=== CONT  TestAccEventsTarget_ecsWithBlankLaunchType
--- PASS: TestAccEventsTarget_ecsCapacityProvider (83.58s)
=== CONT  TestAccEventsTarget_ecsWithoutLaunchType
--- PASS: TestAccEventsTarget_RetryPolicy_deadLetter (55.57s)
=== CONT  TestAccEventsTarget_eventBusName
--- PASS: TestAccEventsTarget_eventBusName (20.08s)
=== CONT  TestAccEventsTarget_disappears
--- PASS: TestAccEventsTarget_disappears (17.47s)
=== CONT  TestAccEventsTarget_sqs
--- PASS: TestAccEventsTarget_sqs (63.71s)
=== CONT  TestAccEventsTarget_kinesis
--- PASS: TestAccEventsTarget_kinesis (58.03s)
--- PASS: TestAccEventsTarget_ecsWithBlankLaunchType (311.48s)
--- PASS: TestAccEventsTarget_ecsWithoutLaunchType (308.47s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	640.078s

@ewbankkit
Copy link
Contributor

@nckslvrmn Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 3c92710 into hashicorp:main Oct 4, 2022
@github-actions github-actions bot added this to the v4.34.0 milestone Oct 4, 2022
@nckslvrmn
Copy link
Contributor Author

Thanks @ewbankkit! I figured it was time to give something back to the tool I use so often. Also it was a nice learning experience. I noticed you pushed some commits, I assume those were to bring the cloudwatch events resources in line with the most recent standards? I did notice some other resources looked different than these.

Also, I think the first time committer PR comment github action is broken, as it was failing on every commit I pushed.

@nckslvrmn nckslvrmn deleted the f-aws_cloudwatch_event_target-add-capacity-providers branch October 5, 2022 14:25
@nckslvrmn
Copy link
Contributor Author

actions/first-interaction#101 looks like an upstream issue with that particular action

@github-actions
Copy link

github-actions bot commented Oct 6, 2022

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

@github-actions
Copy link

github-actions bot commented Nov 7, 2022

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 Nov 7, 2022
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/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
Development

Successfully merging this pull request may close these issues.

Support CapacityProviderStrategy in aws_cloudwatch_event_target with ecs_target
2 participants