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

feat: Add description arg/attr for aws_cloudwatch_event_bus resource and data source #39980

Merged

Conversation

acwwat
Copy link
Contributor

@acwwat acwwat commented Nov 1, 2024

Description

This PR is to add the description argument/attribute to the aws_cloudwatch_event_bus resource and data source.

Note that there is a quirk with the AWS API where you cannot unset the description on update when it is previously set. The only way is to set the description to am empty string, which is coincidentally mapped to the zero string value. So in the state, the value is never null, only empty string for now.

Relations

Closes #39900

References

Referred to CreateTask for specs and wordings.

Output from Acceptance Testing

For the aws_cloudwatch_event_bus resource:

$ make testacc TESTS=TestAccEventsBus_basic PKG=events
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/events/... -v -count 1 -parallel 20 -run='TestAccEventsBus_basic'  -timeout 360m
2024/10/31 23:46:42 Initializing Terraform AWS Provider...
=== RUN   TestAccEventsBus_basic
=== PAUSE TestAccEventsBus_basic
=== CONT  TestAccEventsBus_basic
--- PASS: TestAccEventsBus_basic (50.18s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/events     50.394s

$

For the aws_cloudwatch_event_bus data source:

$ make testacc TESTS=TestAccEventsBusDataSource_kmsKeyIdentifier PKG=events
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/events/... -v -count 1 -parallel 20 -run='TestAccEventsBusDataSource_kmsKeyIdentifier'  -timeout 360m
2024/10/31 23:58:15 Initializing Terraform AWS Provider...
=== RUN   TestAccEventsBusDataSource_kmsKeyIdentifier
=== PAUSE TestAccEventsBusDataSource_kmsKeyIdentifier
=== CONT  TestAccEventsBusDataSource_kmsKeyIdentifier
--- PASS: TestAccEventsBusDataSource_kmsKeyIdentifier (25.18s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/events     25.392s

$

@acwwat acwwat requested a review from a team as a code owner November 1, 2024 04:11
Copy link

github-actions bot commented Nov 1, 2024

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. needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels Nov 1, 2024
@acwwat acwwat force-pushed the f-aws_cloudwatch_event_bus-add_desc_arg branch from 0d0ead3 to 8ea10c9 Compare November 1, 2024 04:12
@acwwat acwwat force-pushed the f-aws_cloudwatch_event_bus-add_desc_arg branch from 8ea10c9 to fc86bc1 Compare November 1, 2024 04:27
@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 Nov 1, 2024
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="TestAccEventsBus_|TestAccEventsBusDataSource_"
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/events/... -v -count 1 -parallel 20 -run='TestAccEventsBus_|TestAccEventsBusDataSource_'  -timeout 360m
2024/11/08 09:30:55 Initializing Terraform AWS Provider...

--- PASS: TestAccEventsBus_default (1.74s)
--- PASS: TestAccEventsBusDataSource_basic (13.01s)
--- PASS: TestAccEventsBus_disappears (13.64s)
--- PASS: TestAccEventsBusDataSource_kmsKeyIdentifier (22.93s)
--- PASS: TestAccEventsBus_tags (32.67s)
--- PASS: TestAccEventsBus_basic (49.73s)
--- PASS: TestAccEventsBus_kmsKeyIdentifier (88.37s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/events     94.779s

@jar-b
Copy link
Member

jar-b commented Nov 8, 2024

Thanks for your contribution, @acwwat! 👍 👏

@jar-b jar-b merged commit ab85962 into hashicorp:main Nov 8, 2024
48 checks passed
@github-actions github-actions bot added this to the v5.76.0 milestone Nov 8, 2024
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. external-maintainer Contribution from a trusted external contributor. 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 description attribute to aws_cloudwatch_event_bus
3 participants