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 event_bus_name parameter validation #30109

Merged
merged 2 commits into from
Mar 20, 2023
Merged

Conversation

gdavison
Copy link
Contributor

Description

For the event_bus_name parameter, the EventBridge resources aws_cloudwatch_event_rule and aws_cloudwatch_event_target accept a name or ARN, while aws_cloudwatch_event_bus_policy and aws_cloudwatch_event_permission only accept a name. This PR updates the validation for the four resources.

Relations

Closes #18182

References

Output from Acceptance Testing

$ make testacc PKG=events TESTS='TestAccEventsTarget_|TestAccEventsPermission_|TestAccEventsBusPolicy_|TestAccEventsRule_'

--- SKIP: TestAccEventsRule_partnerEventBus (0.00s)
--- SKIP: TestAccEventsTarget_partnerEventBus (0.00s)
--- PASS: TestAccEventsTarget_disappears (95.21s)
--- PASS: TestAccEventsRule_namePrefix (101.97s)
--- PASS: TestAccEventsRule_Name_generated (102.16s)
--- PASS: TestAccEventsRule_scheduleAndPattern (104.38s)
--- PASS: TestAccEventsTarget_inputTransformerJSONString (130.28s)
--- PASS: TestAccEventsTarget_ecsFull (139.85s)
--- PASS: TestAccEventsRule_role (141.80s)
--- PASS: TestAccEventsTarget_ecsWithBlankTaskCount (147.87s)
--- PASS: TestAccEventsTarget_Input_transformer (159.48s)
--- PASS: TestAccEventsTarget_sqs (161.80s)
--- PASS: TestAccEventsTarget_kinesis (169.14s)
--- PASS: TestAccEventsRule_description (178.60s)
--- PASS: TestAccEventsRule_pattern (180.28s)
--- PASS: TestAccEventsBusPolicy_basic (182.06s)
--- PASS: TestAccEventsTarget_ecsCapacityProvider (184.91s)
--- PASS: TestAccEventsPermission_condition (186.41s)
--- PASS: TestAccEventsTarget_batch (197.20s)
--- PASS: TestAccEventsTarget_ssmDocument (124.43s)
--- PASS: TestAccEventsRule_eventBusName (254.11s)
--- PASS: TestAccEventsTarget_http (119.94s)
--- PASS: TestAccEventsTarget_generatedTargetID (113.25s)
--- PASS: TestAccEventsTarget_ecs (134.51s)
--- PASS: TestAccEventsPermission_multiple (174.19s)
--- PASS: TestAccEventsRule_eventBusARN (119.68s)
--- PASS: TestAccEventsTarget_full (138.01s)
--- PASS: TestAccEventsPermission_eventBusName (118.01s)
--- PASS: TestAccEventsPermission_disappears (204.67s)
--- PASS: TestAccEventsTarget_ecsWithoutLaunchType (312.95s)
--- PASS: TestAccEventsTarget_ecsWithBlankLaunchType (314.93s)
--- PASS: TestAccEventsPermission_action (131.11s)
--- PASS: TestAccEventsTarget_RetryPolicy_deadLetter (148.67s)
--- PASS: TestAccEventsTarget_http_params (179.96s)
--- PASS: TestAccEventsTarget_basic (149.52s)
--- PASS: TestAccEventsBusPolicy_ignoreEquivalent (101.57s)
--- PASS: TestAccEventsRule_basic (240.69s)
--- PASS: TestAccEventsTarget_eventBusARN (71.08s)
--- PASS: TestAccEventsTarget_eventBusName (67.10s)
--- PASS: TestAccEventsPermission_basic (174.06s)
--- PASS: TestAccEventsRule_isEnabled (111.42s)
--- PASS: TestAccEventsRule_tags (107.67s)
--- PASS: TestAccEventsBusPolicy_disappears (194.34s)
--- PASS: TestAccEventsTarget_redshift (387.47s)

@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 documentation Introduces or discusses updates to documentation. service/events Issues and PRs that pertain to the events service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. verify Pertains to the verify package (i.e., provider-level validating, diff suppression, etc.) size/M Managed by automation to categorize the size of a PR. labels Mar 17, 2023
Copy link
Member

@jar-b jar-b 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 PKG=events TESTS='TestAccEventsTarget_|TestAccEventsPermission_|TestAccEventsBusPolicy_|TestAccEventsRule_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/events/... -v -count 1 -parallel 20 -run='TestAccEventsTarget_|TestAccEventsPermission_|TestAccEventsBusPolicy_|TestAccEventsRule_'  -timeout 180m
--- PASS: TestAccEventsTarget_disappears (27.06s)
=== CONT  TestAccEventsTarget_Input_transformer
--- PASS: TestAccEventsRule_scheduleAndPattern (29.66s)
=== CONT  TestAccEventsPermission_disappears
--- PASS: TestAccEventsRule_namePrefix (29.69s)
=== CONT  TestAccEventsTarget_sqs
--- PASS: TestAccEventsRule_Name_generated (29.99s)
=== CONT  TestAccEventsRule_basic
--- PASS: TestAccEventsRule_eventBusARN (31.56s)
=== CONT  TestAccEventsPermission_multiple
--- PASS: TestAccEventsPermission_action (34.34s)
=== CONT  TestAccEventsTarget_kinesis
--- PASS: TestAccEventsBusPolicy_ignoreEquivalent (37.38s)
=== CONT  TestAccEventsTarget_ssmDocument
--- PASS: TestAccEventsRule_role (40.71s)
=== CONT  TestAccEventsTarget_ecsFull
--- PASS: TestAccEventsPermission_condition (45.02s)
=== CONT  TestAccEventsTarget_ecsCapacityProvider
--- PASS: TestAccEventsTarget_basic (46.75s)
=== CONT  TestAccEventsTarget_redshift
--- PASS: TestAccEventsRule_pattern (47.57s)
=== CONT  TestAccEventsPermission_eventBusName
--- PASS: TestAccEventsTarget_inputTransformerJSONString (48.90s)
=== CONT  TestAccEventsTarget_ecs
--- PASS: TestAccEventsBusPolicy_basic (49.02s)
=== CONT  TestAccEventsTarget_http_params
--- PASS: TestAccEventsPermission_basic (58.69s)
=== CONT  TestAccEventsRule_description
--- PASS: TestAccEventsRule_isEnabled (59.05s)
=== CONT  TestAccEventsTarget_generatedTargetID
--- PASS: TestAccEventsTarget_ssmDocument (22.37s)
=== CONT  TestAccEventsTarget_full
--- PASS: TestAccEventsRule_eventBusName (61.57s)
=== CONT  TestAccEventsTarget_RetryPolicy_deadLetter
--- PASS: TestAccEventsPermission_multiple (32.61s)
=== CONT  TestAccEventsTarget_ecsWithBlankTaskCount
--- PASS: TestAccEventsPermission_eventBusName (20.66s)
=== CONT  TestAccEventsTarget_eventBusName
--- PASS: TestAccEventsRule_tags (74.01s)
=== CONT  TestAccEventsTarget_eventBusARN
=== CONT  TestAccEventsTarget_ecsWithBlankLaunchType
--- PASS: TestAccEventsTarget_Input_transformer (47.79s)
--- PASS: TestAccEventsTarget_ecsFull (37.45s)
=== CONT  TestAccEventsTarget_http
--- PASS: TestAccEventsTarget_generatedTargetID (22.42s)
--- PASS: TestAccEventsTarget_sqs (52.03s)
--- PASS: TestAccEventsRule_basic (52.55s)
--- PASS: TestAccEventsTarget_ecs (35.32s)
--- PASS: TestAccEventsTarget_http_params (37.33s)
--- PASS: TestAccEventsTarget_eventBusName (19.08s)
--- PASS: TestAccEventsTarget_kinesis (54.22s)
--- PASS: TestAccEventsRule_description (30.66s)
--- PASS: TestAccEventsTarget_eventBusARN (17.20s)
--- PASS: TestAccEventsTarget_ecsWithBlankTaskCount (31.65s)
--- PASS: TestAccEventsTarget_full (48.21s)
--- PASS: TestAccEventsTarget_RetryPolicy_deadLetter (53.55s)
--- PASS: TestAccEventsTarget_http (43.19s)
--- PASS: TestAccEventsTarget_ecsCapacityProvider (78.88s)
--- PASS: TestAccEventsTarget_ecsWithBlankLaunchType (58.59s)
--- PASS: TestAccEventsTarget_batch (140.91s)
--- PASS: TestAccEventsBusPolicy_disappears (143.08s)
--- PASS: TestAccEventsPermission_disappears (136.01s)
--- PASS: TestAccEventsTarget_ecsWithoutLaunchType (301.20s)
--- PASS: TestAccEventsTarget_redshift (273.67s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/events     323.995s

@gdavison gdavison merged commit 3e54082 into main Mar 20, 2023
@gdavison gdavison deleted the td-event-bus-names branch March 20, 2023 18:21
@github-actions github-actions bot added this to the v4.60.0 milestone Mar 20, 2023
@github-actions
Copy link

This functionality has been released in v4.60.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 Apr 23, 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. service/events Issues and PRs that pertain to the events service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. verify Pertains to the verify package (i.e., provider-level validating, diff suppression, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_cloudwatch_event_rule: Expected value of event_bus_name to match regular expression
2 participants