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

r/aws_redshift_cluster: support managed master passwords #34182

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Oct 31, 2023

Description

This change adds the manage_master_password and master_password_secret_kms_key_id arguments allowing the configuration of AWS managed credentials via SecretsManager. The manage_master_password argument conflicts with the master_password argument, and at least one must be set when creating a new cluster not restored from a snapshot. The master_password_secret_arn attribute was added to track the ARN of the SecretsManager secret which stores cluster credentials.

Relations

Closes #34169

References

Output from Acceptance Testing

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

--- PASS: TestAccRedshiftCluster_disappears (368.71s)
=== CONT  TestAccRedshiftCluster_aqua
--- PASS: TestAccRedshiftCluster_manageMasterPassword (387.65s)
=== CONT  TestAccRedshiftCluster_changeAvailabilityZone
--- PASS: TestAccRedshiftCluster_basic (391.55s)
=== CONT  TestAccRedshiftCluster_forceNewUsername
--- PASS: TestAccRedshiftCluster_changeAvailabilityZone_availabilityZoneRelocationNotSet (499.37s)
--- PASS: TestAccRedshiftCluster_snapshotCopy (506.43s)
--- PASS: TestAccRedshiftCluster_iamRoles (515.61s)
--- PASS: TestAccRedshiftCluster_tags (516.56s)
--- PASS: TestAccRedshiftCluster_availabilityZoneRelocation (552.05s)
--- PASS: TestAccRedshiftCluster_kmsKey (556.19s)
--- PASS: TestAccRedshiftCluster_availabilityZoneRelocation_publiclyAccessible (556.92s)
--- PASS: TestAccRedshiftCluster_withFinalSnapshot (574.15s)
--- PASS: TestAccRedshiftCluster_enhancedVPCRoutingEnabled (581.81s)
--- PASS: TestAccRedshiftCluster_changeAvailabilityZoneAndSetAvailabilityZoneRelocation (723.83s)
--- PASS: TestAccRedshiftCluster_loggingEnabled (766.36s)
--- PASS: TestAccRedshiftCluster_aqua (415.38s)
--- PASS: TestAccRedshiftCluster_publiclyAccessible (833.06s)
--- PASS: TestAccRedshiftCluster_forceNewUsername (602.32s)
--- PASS: TestAccRedshiftCluster_changeAvailabilityZone (642.96s)
--- PASS: TestAccRedshiftCluster_updateNodeType (1091.19s)
--- PASS: TestAccRedshiftCluster_changeEncryption1 (1115.82s)
--- PASS: TestAccRedshiftCluster_updateNodeCount (1162.75s)
--- PASS: TestAccRedshiftCluster_restoreFromSnapshot (1194.38s)
--- PASS: TestAccRedshiftCluster_changeEncryption2 (1346.13s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/redshift   1349.395s

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/M 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. labels Oct 31, 2023
@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 Oct 31, 2023
@jar-b jar-b marked this pull request as ready for review October 31, 2023 20:02
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=TestAccRedshiftCluster_manageMasterPassword\|TestAccRedshiftCluster_basic' PKG=redshift ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/redshift/... -v -count 1 -parallel 2  -run=TestAccRedshiftCluster_manageMasterPassword\|TestAccRedshiftCluster_basic -timeout 360m
=== RUN   TestAccRedshiftCluster_basic
=== PAUSE TestAccRedshiftCluster_basic
=== RUN   TestAccRedshiftCluster_manageMasterPassword
=== PAUSE TestAccRedshiftCluster_manageMasterPassword
=== CONT  TestAccRedshiftCluster_basic
=== CONT  TestAccRedshiftCluster_manageMasterPassword
--- PASS: TestAccRedshiftCluster_manageMasterPassword (239.27s)
--- PASS: TestAccRedshiftCluster_basic (253.89s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/redshift   260.471s

This change adds the manage_master_password and master_password_secret_kms_key_id arguments
allowing the configuration of AWS managed credentials via SecretsManager. The manage_master_password
argument conflicts with the master_password argument, and at least one must be set when
creating a new cluster not restored from a snapshot. The master_password_secret_arn attribute
was added to track the ARN of the SecretsManager secret which stores cluster credentials.
@jar-b jar-b force-pushed the f-aws_redshift_cluster-managedpw branch from 84767cd to fc2fa19 Compare November 1, 2023 14:23
@jar-b jar-b merged commit 5c178a1 into main Nov 1, 2023
43 checks passed
@jar-b jar-b deleted the f-aws_redshift_cluster-managedpw branch November 1, 2023 15:03
@github-actions github-actions bot added this to the v5.24.0 milestone Nov 1, 2023
github-actions bot pushed a commit that referenced this pull request Nov 1, 2023
Copy link

github-actions bot commented Nov 2, 2023

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

github-actions bot commented Dec 3, 2023

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 3, 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. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/redshift Issues and PRs that pertain to the redshift 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: r/aws_redshift_cluster: Support managed master passwords
2 participants