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

[New Resource]: aws_redshift_data_share_consumer_association #35771

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Feb 12, 2024

Description

This resource will allow practitioners to manage Redshift data share consumer associations via Terraform.

Also fixes a bug in the aws_redshift_data_share_authorization data source that incorrectly handled an ACTIVE data share status, causing persistent differences and forced re-creation of the resource.

Relations

Closes #33454
Relates #35703

References

Output from Acceptance Testing

% make testacc PKG=redshift TESTS=TestAccRedshiftDataShareConsumerAssociation_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/redshift/... -v -count 1 -parallel 20 -run='TestAccRedshiftDataShareConsumerAssociation_'  -timeout 360m

--- PASS: TestAccRedshiftDataShareConsumerAssociation_associateEntireAccount (294.14s)
--- PASS: TestAccRedshiftDataShareConsumerAssociation_disappears (312.61s)
--- PASS: TestAccRedshiftDataShareConsumerAssociation_basic (355.38s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/redshift   362.372s

…D and ACTIVE

The AUTHORIZED status should be present immediately following the AuthorizeDataShare API call. The ACTIVE status should be present following an AssociateDataShareConsumer API call, and therefore should not fall through to a NotFound error and trigger re-creation of the resource.
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 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. service/redshift Issues and PRs that pertain to the redshift service. generators Relates to code generators. labels Feb 12, 2024
@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 Feb 12, 2024
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.

This resource will allow practitioners to manage Redshift data share consumer associations via Terraform.
@jar-b jar-b force-pushed the f-redshift_data_share_consumer_association branch from 7d50dbb to 3ca109e Compare February 12, 2024 16:47
@jar-b jar-b marked this pull request as ready for review February 12, 2024 18:36
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=TestAccRedshiftDataShareConsumerAssociation_' PKG=redshift
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/redshift/... -v -count 1 -parallel 20  -run=TestAccRedshiftDataShareConsumerAssociation_ -timeout 360m
=== RUN   TestAccRedshiftDataShareConsumerAssociation_basic
=== PAUSE TestAccRedshiftDataShareConsumerAssociation_basic
=== RUN   TestAccRedshiftDataShareConsumerAssociation_disappears
=== PAUSE TestAccRedshiftDataShareConsumerAssociation_disappears
=== RUN   TestAccRedshiftDataShareConsumerAssociation_associateEntireAccount
=== PAUSE TestAccRedshiftDataShareConsumerAssociation_associateEntireAccount
=== CONT  TestAccRedshiftDataShareConsumerAssociation_basic
=== CONT  TestAccRedshiftDataShareConsumerAssociation_associateEntireAccount
=== CONT  TestAccRedshiftDataShareConsumerAssociation_disappears
--- PASS: TestAccRedshiftDataShareConsumerAssociation_associateEntireAccount (334.16s)
--- PASS: TestAccRedshiftDataShareConsumerAssociation_basic (354.32s)
--- PASS: TestAccRedshiftDataShareConsumerAssociation_disappears (371.05s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/redshift	381.954s

@ewbankkit ewbankkit added the new-resource Introduces a new resource. label Feb 12, 2024
@jar-b jar-b merged commit 9bcf2d0 into main Feb 12, 2024
63 checks passed
@jar-b jar-b deleted the f-redshift_data_share_consumer_association branch February 12, 2024 19:49
@github-actions github-actions bot added this to the v5.37.0 milestone Feb 12, 2024
github-actions bot pushed a commit that referenced this pull request Feb 12, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Feb 15, 2024
Copy link

This functionality has been released in v5.37.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 Mar 18, 2024
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. generators Relates to code generators. new-resource Introduces a new resource. service/redshift Issues and PRs that pertain to the redshift 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.

[Enhancement]: Redshift Accept Data Share Invitation
2 participants