-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
fix: Fix EKS cluster name regex #35874
fix: Fix EKS cluster name regex #35874
Conversation
Community NoteVoting for Prioritization
For Submitters
|
Looks like the validation function is actually incorrect as well. Feel free to include the following change in this PR @acwwat :
The new test fails on current $ make testacc TESTS=TestValidClusterName PKG=eks
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/eks/... -v -count 1 -parallel 20 -run='TestValidClusterName' -timeout 360m
=== RUN TestValidClusterName
=== PAUSE TestValidClusterName
=== CONT TestValidClusterName
validate_test.go:65: Expected the EKS Cluster Name to trigger a validation error: a, expected 0, got 1 errors
--- FAIL: TestValidClusterName (0.00s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/eks 0.362s
FAIL
make: *** [GNUmakefile:359: testacc] Error 1 And passes with the regex change applied: $ make testacc TESTS=TestValidClusterName PKG=eks
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/eks/... -v -count 1 -parallel 20 -run='TestValidClusterName' -timeout 360m
=== RUN TestValidClusterName
=== PAUSE TestValidClusterName
=== CONT TestValidClusterName
--- PASS: TestValidClusterName (0.00s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/eks 0.330s |
Oh, and as to your suggestion about removing the regex from all but the cluster resource docs I'd definitely agree although I'm a mere contributor not a maintainer. |
43c93e1
to
8822a47
Compare
@mattburgess Thanks for catching the regex issue in the code. I've incorporated your suggested changes to the code. I've also decided to just remove the regex from the non-cluster resource docs for cleanliness and ease of maintenance going forward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
@acwwat Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.38.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! |
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. |
Description
This PR is to fix the regex pattern for the EKS cluster name that is included in the documentation for numerous EKS-related resources.
I'd also like to ask the maintainers to see whether it makes sense to just remove the regex from the non-cluster resource docs. Once the EKS cluster is created (and it makes sense to provide the regex there), the name is simply referenced by other resources so I don't think providing the exact format is super useful. Let me know what you think - I can update the PR to remove them if you think it makes sense. Thanks.
Relations
Closes #35843
References
Referred to the API reference for the cluster name regex.
Output from Acceptance Testing