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

Add Clean Rooms Membership resource #35165

Merged

Conversation

Jolcik
Copy link
Contributor

@Jolcik Jolcik commented Jan 5, 2024

Description

This pull request adds a new resource for AWS Clean Rooms service which is not currently fully supported by the plugin. The change adds Membership resource, which is used to join by the invited member to a collaboration.

One thing to note to this PR - according to the documentation for the CreateMembership action payment_configuration is presented as an optional field that can be set directly. However, in this PR, it has been introduced only as a read-only attribute. It seems that altering the value of payment_configuration doesn't have a practical effect, except for triggering an additional error in specific scenarios outlined in the the API documentation:

An error message is returned for the following reasons:
- If you set the value to FALSE but you are responsible to pay for query compute costs.
- If you set the value to TRUE but you are not responsible to pay for query compute costs.

I have refrained from including this as a selectable field since, in my view, its utilization appears to be pointless, suggesting a decision-making capability where none exists. However, as a relatively new contributor to this project, I am open to correction. If any maintainer holds a different perspective, I am more than willing to make it a selectable field.

I appreciate the opportunity to contribute to this project and am open to any feedback or adjustments. Thank you for your time and consideration.

Relations

Relates #30024

References

https://docs.aws.amazon.com/clean-rooms/latest/apireference/API_Membership.html

Output from Acceptance Testing

> make testacc TESTS=TestAccCleanRoomsMembership PKG=cleanrooms 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cleanrooms/... -v -count 1 -parallel 20 -run='TestAccCleanRoomsMembership'  -timeout 360m
=== RUN   TestAccCleanRoomsMembership_basic
=== PAUSE TestAccCleanRoomsMembership_basic
=== RUN   TestAccCleanRoomsMembership_disappears
=== PAUSE TestAccCleanRoomsMembership_disappears
=== RUN   TestAccCleanRoomsMembership_mutableProperties
=== PAUSE TestAccCleanRoomsMembership_mutableProperties
=== RUN   TestAccCleanRoomsMembership_defaultOutputConfigurationWithEmptyAdditionalParameters
=== PAUSE TestAccCleanRoomsMembership_defaultOutputConfigurationWithEmptyAdditionalParameters
=== RUN   TestAccCleanRoomsMembership_withoutDefaultOutputConfiguration
=== PAUSE TestAccCleanRoomsMembership_withoutDefaultOutputConfiguration
=== RUN   TestAccCleanRoomsMembership_addDefaultOutputConfiguration
=== PAUSE TestAccCleanRoomsMembership_addDefaultOutputConfiguration
=== CONT  TestAccCleanRoomsMembership_basic
=== CONT  TestAccCleanRoomsMembership_defaultOutputConfigurationWithEmptyAdditionalParameters
=== CONT  TestAccCleanRoomsMembership_mutableProperties
=== CONT  TestAccCleanRoomsMembership_disappears
=== CONT  TestAccCleanRoomsMembership_addDefaultOutputConfiguration
=== CONT  TestAccCleanRoomsMembership_withoutDefaultOutputConfiguration
--- PASS: TestAccCleanRoomsMembership_withoutDefaultOutputConfiguration (34.57s)
--- PASS: TestAccCleanRoomsMembership_defaultOutputConfigurationWithEmptyAdditionalParameters (39.42s)
--- PASS: TestAccCleanRoomsMembership_addDefaultOutputConfiguration (61.94s)
--- PASS: TestAccCleanRoomsMembership_basic (68.09s)
--- PASS: TestAccCleanRoomsMembership_disappears (78.88s)
--- PASS: TestAccCleanRoomsMembership_mutableProperties (86.21s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/cleanrooms 88.083s

Copy link

github-actions bot commented Jan 5, 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 size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. examples Introduces or discusses updates to examples. generators Relates to code generators. service/cleanrooms Issues and PRs that pertain to the cleanrooms service. labels Jan 5, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 5, 2024
@justinretzolk justinretzolk added new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 8, 2024
@Jolcik
Copy link
Contributor Author

Jolcik commented Aug 18, 2024

Hi @justinretzolk, I was wondering if it might be possible for someone from the maintainers to review this PR when they have a moment. I understand it's quite large, but the changes are mostly straightforward, focusing on adding a new resource. I'm just a bit concerned that, since it's been open for 8 months, it might become outdated.
Thank you!

@johnsonaj johnsonaj self-assigned this Jan 2, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 2, 2025
@johnsonaj johnsonaj requested a review from a team as a code owner January 2, 2025 23:53
Copy link
Contributor

@johnsonaj johnsonaj 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=TestAccCleanRoomsMembership_' PKG=cleanrooms ACCTEST_PARALLELISM=10

make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/cleanrooms/... -v -count 1 -parallel 10  -run=TestAccCleanRoomsMembership_ -timeout 360m
2025/01/03 15:50:55 Initializing Terraform AWS Provider...
--- PASS: TestAccCleanRoomsMembership_tags_DefaultTags_nullOverlappingResourceTag (27.65s)
--- PASS: TestAccCleanRoomsMembership_defaultOutputConfigurationWithEmptyAdditionalParameters (28.11s)
--- PASS: TestAccCleanRoomsMembership_tags_DefaultTags_emptyProviderOnlyTag (30.44s)
--- PASS: TestAccCleanRoomsMembership_tags_DefaultTags_emptyResourceTag (37.74s)
--- PASS: TestAccCleanRoomsMembership_tags_DefaultTags_updateToResourceOnly (43.39s)
--- PASS: TestAccCleanRoomsMembership_tags_DefaultTags_updateToProviderOnly (49.97s)
--- PASS: TestAccCleanRoomsMembership_withoutDefaultOutputConfiguration (32.81s)
--- PASS: TestAccCleanRoomsMembership_tags_EmptyTag_OnCreate (50.12s)
--- PASS: TestAccCleanRoomsMembership_tags_EmptyTag_OnUpdate_Replace (44.11s)
--- PASS: TestAccCleanRoomsMembership_addDefaultOutputConfiguration (59.51s)
--- PASS: TestAccCleanRoomsMembership_tags_DefaultTags_overlapping (88.98s)
--- PASS: TestAccCleanRoomsMembership_tags_DefaultTags_nonOverlapping (91.43s)
--- PASS: TestAccCleanRoomsMembership_basic (57.31s)
--- PASS: TestAccCleanRoomsMembership_tags (103.00s)
--- PASS: TestAccCleanRoomsMembership_tags_DefaultTags_providerOnly (111.19s)
--- PASS: TestAccCleanRoomsMembership_tags_EmptyTag_OnUpdate_Add (66.18s)
--- PASS: TestAccCleanRoomsMembership_tags_EmptyMap (29.77s)
--- PASS: TestAccCleanRoomsMembership_tags_ComputedTag_OnUpdate_Replace (43.44s)
--- PASS: TestAccCleanRoomsMembership_tags_null (28.60s)
--- PASS: TestAccCleanRoomsMembership_disappears (51.88s)
--- PASS: TestAccCleanRoomsMembership_mutableProperties (73.37s)
--- PASS: TestAccCleanRoomsMembership_tags_ComputedTag_OnCreate (26.47s)
--- PASS: TestAccCleanRoomsMembership_tags_AddOnUpdate (42.67s)
--- PASS: TestAccCleanRoomsMembership_tags_DefaultTags_nullNonOverlappingResourceTag (22.45s)
--- PASS: TestAccCleanRoomsMembership_tags_IgnoreTags_Overlap_ResourceTag (59.96s)
--- PASS: TestAccCleanRoomsMembership_tags_IgnoreTags_Overlap_DefaultTag (58.64s)
--- PASS: TestAccCleanRoomsMembership_tags_ComputedTag_OnUpdate_Add (38.92s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/cleanrooms 161.599s

@johnsonaj
Copy link
Contributor

@Jolcik thank you for the contribution! 🎉

@johnsonaj johnsonaj merged commit 0ac1222 into hashicorp:main Jan 3, 2025
48 checks passed
@github-actions github-actions bot added this to the v5.83.0 milestone Jan 3, 2025
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 9, 2025
Copy link

github-actions bot commented Jan 9, 2025

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

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. examples Introduces or discusses updates to examples. generators Relates to code generators. new-resource Introduces a new resource. service/cleanrooms Issues and PRs that pertain to the cleanrooms 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.

4 participants