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

resource/aws_cloudwatch_event_rule: Adds state parameter #34510

Merged
merged 8 commits into from
Nov 22, 2023

Conversation

gdavison
Copy link
Contributor

Description

Previously, the provider used the boolean parameter is_enabled to configure the AWS API parameter State with values ENABLED and DISABLED. Recently, AWS added the value ENABLED_WITH_CLOUDTRAIL_READ_ONLY_EVENTS to State.

Adds the parameter state and deprecates is_enabled.

Output from Acceptance Testing

% make testacc PKG=events TESTS=TestAccEventsRule_

--- PASS: TestAccEventsRule_patternJSONEncoder (202.70s)
--- PASS: TestAccEventsRule_Name_generated (219.52s)
--- PASS: TestAccEventsRule_scheduleAndPattern (228.14s)
--- PASS: TestAccEventsRule_namePrefix (228.40s)
--- PASS: TestAccEventsRule_migrateV0 (0.00s)
    --- PASS: TestAccEventsRule_migrateV0/enabled (241.41s)
    --- PASS: TestAccEventsRule_migrateV0/disabled (241.48s)
    --- PASS: TestAccEventsRule_migrateV0/basic (244.05s)
--- PASS: TestAccEventsRule_migrateV0_Equivalent (0.00s)
    --- PASS: TestAccEventsRule_migrateV0_Equivalent/enabled (238.40s)
    --- PASS: TestAccEventsRule_migrateV0_Equivalent/disabled (244.46s)
--- PASS: TestAccEventsRule_eventBusARN (281.94s)
--- PASS: TestAccEventsRule_role (286.05s)
--- PASS: TestAccEventsRule_description (294.10s)
--- PASS: TestAccEventsRule_pattern (294.93s)
--- PASS: TestAccEventsRule_tags (329.01s)
--- PASS: TestAccEventsRule_basic (329.56s)
--- PASS: TestAccEventsRule_isEnabled (331.36s)
--- PASS: TestAccEventsRule_state (335.21s)
--- PASS: TestAccEventsRule_eventBusName (379.52s)

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. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/events Issues and PRs that pertain to the events service. size/XL Managed by automation to categorize the size of a PR. and removed documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/events Issues and PRs that pertain to the events service. labels Nov 21, 2023
Copy link

Thank you for your contribution! 🚀

A new usage of AWS SDK for Go V1 was detected. Please prefer AWS SDK for Go V2 for all net-new services. If this is an enhancement or bug fix to an existing AWS SDK Go V1 based resource, this comment can be safely ignored.

For additional information refer to the AWS SDK for Go Versions page in the contributor guide.

@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Nov 21, 2023
@ewbankkit ewbankkit added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 22, 2023
@ewbankkit ewbankkit self-assigned this Nov 22, 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=TestAccEventsRule_' 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=TestAccEventsRule_ -timeout 360m
=== RUN   TestAccEventsRule_basic
=== PAUSE TestAccEventsRule_basic
=== RUN   TestAccEventsRule_eventBusName
=== PAUSE TestAccEventsRule_eventBusName
=== RUN   TestAccEventsRule_role
=== PAUSE TestAccEventsRule_role
=== RUN   TestAccEventsRule_description
=== PAUSE TestAccEventsRule_description
=== RUN   TestAccEventsRule_pattern
=== PAUSE TestAccEventsRule_pattern
=== RUN   TestAccEventsRule_patternJSONEncoder
=== PAUSE TestAccEventsRule_patternJSONEncoder
=== RUN   TestAccEventsRule_scheduleAndPattern
=== PAUSE TestAccEventsRule_scheduleAndPattern
=== RUN   TestAccEventsRule_namePrefix
=== PAUSE TestAccEventsRule_namePrefix
=== RUN   TestAccEventsRule_Name_generated
=== PAUSE TestAccEventsRule_Name_generated
=== RUN   TestAccEventsRule_tags
=== PAUSE TestAccEventsRule_tags
=== RUN   TestAccEventsRule_isEnabled
=== PAUSE TestAccEventsRule_isEnabled
=== RUN   TestAccEventsRule_state
=== PAUSE TestAccEventsRule_state
=== RUN   TestAccEventsRule_partnerEventBus
    rule_test.go:575: Environment variable EVENT_BRIDGE_PARTNER_EVENT_BUS_NAME is not set
--- SKIP: TestAccEventsRule_partnerEventBus (0.00s)
=== RUN   TestAccEventsRule_eventBusARN
=== PAUSE TestAccEventsRule_eventBusARN
=== RUN   TestAccEventsRule_migrateV0
=== PAUSE TestAccEventsRule_migrateV0
=== RUN   TestAccEventsRule_migrateV0_Equivalent
=== PAUSE TestAccEventsRule_migrateV0_Equivalent
=== CONT  TestAccEventsRule_basic
=== CONT  TestAccEventsRule_Name_generated
--- PASS: TestAccEventsRule_Name_generated (30.86s)
=== CONT  TestAccEventsRule_eventBusARN
--- PASS: TestAccEventsRule_eventBusARN (27.86s)
=== CONT  TestAccEventsRule_migrateV0_Equivalent
=== RUN   TestAccEventsRule_migrateV0_Equivalent/enabled
=== PAUSE TestAccEventsRule_migrateV0_Equivalent/enabled
=== RUN   TestAccEventsRule_migrateV0_Equivalent/disabled
=== PAUSE TestAccEventsRule_migrateV0_Equivalent/disabled
=== CONT  TestAccEventsRule_migrateV0
=== RUN   TestAccEventsRule_migrateV0/basic
=== PAUSE TestAccEventsRule_migrateV0/basic
=== RUN   TestAccEventsRule_migrateV0/enabled
=== PAUSE TestAccEventsRule_migrateV0/enabled
=== RUN   TestAccEventsRule_migrateV0/disabled
=== PAUSE TestAccEventsRule_migrateV0/disabled
=== CONT  TestAccEventsRule_isEnabled
--- PASS: TestAccEventsRule_basic (70.33s)
=== CONT  TestAccEventsRule_state
--- PASS: TestAccEventsRule_isEnabled (68.39s)
=== CONT  TestAccEventsRule_tags
--- PASS: TestAccEventsRule_state (72.72s)
=== CONT  TestAccEventsRule_pattern
--- PASS: TestAccEventsRule_pattern (44.64s)
=== CONT  TestAccEventsRule_namePrefix
--- PASS: TestAccEventsRule_tags (63.28s)
=== CONT  TestAccEventsRule_scheduleAndPattern
--- PASS: TestAccEventsRule_namePrefix (26.67s)
=== CONT  TestAccEventsRule_patternJSONEncoder
--- PASS: TestAccEventsRule_scheduleAndPattern (27.03s)
=== CONT  TestAccEventsRule_role
--- PASS: TestAccEventsRule_patternJSONEncoder (21.21s)
=== CONT  TestAccEventsRule_description
--- PASS: TestAccEventsRule_role (36.78s)
=== CONT  TestAccEventsRule_eventBusName
--- PASS: TestAccEventsRule_description (41.35s)
=== CONT  TestAccEventsRule_migrateV0_Equivalent/enabled
--- PASS: TestAccEventsRule_eventBusName (59.39s)
=== CONT  TestAccEventsRule_migrateV0_Equivalent/disabled
=== CONT  TestAccEventsRule_migrateV0/basic
=== CONT  TestAccEventsRule_migrateV0/disabled
--- PASS: TestAccEventsRule_migrateV0_Equivalent (0.00s)
    --- PASS: TestAccEventsRule_migrateV0_Equivalent/enabled (85.54s)
    --- PASS: TestAccEventsRule_migrateV0_Equivalent/disabled (87.87s)
=== CONT  TestAccEventsRule_migrateV0/enabled
--- PASS: TestAccEventsRule_migrateV0 (0.00s)
    --- PASS: TestAccEventsRule_migrateV0/basic (88.95s)
    --- PASS: TestAccEventsRule_migrateV0/disabled (87.62s)
    --- PASS: TestAccEventsRule_migrateV0/enabled (82.73s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	539.999s

@ewbankkit ewbankkit removed their assignment Nov 22, 2023
@gdavison gdavison merged commit f866e73 into main Nov 22, 2023
62 of 63 checks passed
@gdavison gdavison deleted the f_replace_enabled branch November 22, 2023 20:15
@github-actions github-actions bot added this to the v5.27.0 milestone Nov 22, 2023
github-actions bot pushed a commit that referenced this pull request Nov 22, 2023
Copy link

This functionality has been released in v5.27.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 Dec 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. size/XL Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants