-
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 aws_lightsail_instance name validation #29903
Fix aws_lightsail_instance name validation #29903
Conversation
Community NoteVoting for Prioritization
For Submitters
|
Could you please add a changelog entry to your PR :) |
Thank you for your contribution! 🚀 Please note that the Remove any changes to the |
Done & rebased :) Thanks for the quick response! |
Could you run the tests too and copy the output to the PR description please: Similar to this PR description: #29224 (comment) |
I believe I already have? That's the ones under 'Output from Acceptance Testing', right? |
My bad, phone didn't properly show it :) |
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 🚀
make testacc TESTS=TestAccLightsailInstance_name PKG=lightsail
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/lightsail/... -v -count 1 -parallel 20 -run='TestAccLightsailInstance_name' -timeout 180m
=== RUN TestAccLightsailInstance_name
=== PAUSE TestAccLightsailInstance_name
=== CONT TestAccLightsailInstance_name
--- PASS: TestAccLightsailInstance_name (188.56s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/lightsail 188.642s
Thanks for your contribution 👌🏼 @danielcotton |
I'll ask @ewbankkit to sign this off. |
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 🚀.
% make testacc TESTARGS='-run=TestAccLightsailInstance_name\|TestAccLightsailInstance_basic' PKG=lightsail ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/lightsail/... -v -count 1 -parallel 3 -run=TestAccLightsailInstance_name\|TestAccLightsailInstance_basic -timeout 180m
=== RUN TestAccLightsailInstance_basic
=== PAUSE TestAccLightsailInstance_basic
=== RUN TestAccLightsailInstance_name
=== PAUSE TestAccLightsailInstance_name
=== CONT TestAccLightsailInstance_basic
=== CONT TestAccLightsailInstance_name
--- PASS: TestAccLightsailInstance_basic (54.17s)
--- PASS: TestAccLightsailInstance_name (151.66s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/lightsail 157.834s
@danielcotton Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.59.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 corrects the overzealous instance name validation in
aws_lightsail_instance
. Previously the first character of an instance name had to be alphabetic; but can now be alphanumeric. I've added a positive test case for an instance with a numeric first character, and a negative test case for an instance with a symbol first character.Due to the removal of the
amazon_linux
Lightsail blueprint, I have also updated allaws_lightsail_instance
acceptance tests to use theamazon_linux_2
blueprint.Relations
Closes #29899
References
https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_CreateInstances.html - Note there is no requirement mentioned for instances to start with an alphabetic character
Output from Acceptance Testing