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: Fix master_username validation #41556

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Feb 25, 2025

Description

Fixes validation on the master_username argument by allowing additional special characters permitted by the AWS API but incorrectly flagged by plan time validation.

Relations

Closes #41437
Ported from #41522

Output from Acceptance Testing

% make testacc PKG=redshift TESTS=TestAccRedshiftCluster_masterUsername
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.5 test ./internal/service/redshift/... -v -count 1 -parallel 20 -run='TestAccRedshiftCluster_masterUsername'  -timeout 360m -vet=off
2025/02/24 15:28:42 Initializing Terraform AWS Provider...

--- PASS: TestAccRedshiftCluster_masterUsername_invalid (2.85s)
--- PASS: TestAccRedshiftCluster_masterUsername (361.88s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/redshift   368.539s

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 tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/redshift Issues and PRs that pertain to the redshift service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Feb 25, 2025
```console
% make testacc PKG=redshift TESTS=TestAccRedshiftCluster_masterUsername
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.5 test ./internal/service/redshift/... -v -count 1 -parallel 20 -run='TestAccRedshiftCluster_masterUsername'  -timeout 360m -vet=off
2025/02/24 15:28:42 Initializing Terraform AWS Provider...

--- PASS: TestAccRedshiftCluster_masterUsername_invalid (2.85s)
--- PASS: TestAccRedshiftCluster_masterUsername (361.88s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/redshift   368.539s
```
@jar-b jar-b force-pushed the b-redshift-master_username-validation branch from 2828780 to 9b3e7cb Compare February 25, 2025 15:50
@jar-b jar-b marked this pull request as ready for review February 25, 2025 15:51
@jar-b jar-b requested a review from a team as a code owner February 25, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. 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.

[Bug]: Redshift cluster master_username value not allowing hyphens (-)
2 participants