-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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/instance: prevent double encoding when updating user_data
or user_data_base64
#23362
Conversation
58cc8b0
to
86c75cb
Compare
5dc98e0
to
9c38d4e
Compare
9c38d4e
to
846c020
Compare
ca1b982
to
cb97cdc
Compare
@@ -3583,6 +3651,39 @@ func TestAccEC2Instance_UserData_update(t *testing.T) { | |||
}) | |||
} | |||
|
|||
func TestAccEC2Instance_UserData_stringToEncodedString(t *testing.T) { |
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.
this test might not be realistic?
Relates #18043. |
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=TestAccEC2Instance_userDataBase64\|TestAccEC2Instance_UserData\|TestAccEC2Instance_basic' PKG=ec2 ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 3 -run=TestAccEC2Instance_userDataBase64\|TestAccEC2Instance_UserData\|TestAccEC2Instance_basic -timeout 180m
=== RUN TestAccEC2Instance_basic
=== PAUSE TestAccEC2Instance_basic
=== RUN TestAccEC2Instance_userDataBase64
=== PAUSE TestAccEC2Instance_userDataBase64
=== RUN TestAccEC2Instance_userDataBase64_updateWithBashFile
=== PAUSE TestAccEC2Instance_userDataBase64_updateWithBashFile
=== RUN TestAccEC2Instance_userDataBase64_updateWithZipFile
=== PAUSE TestAccEC2Instance_userDataBase64_updateWithZipFile
=== RUN TestAccEC2Instance_userDataBase64_update
=== PAUSE TestAccEC2Instance_userDataBase64_update
=== RUN TestAccEC2Instance_UserData
=== PAUSE TestAccEC2Instance_UserData
=== RUN TestAccEC2Instance_UserData_update
=== PAUSE TestAccEC2Instance_UserData_update
=== RUN TestAccEC2Instance_UserData_stringToEncodedString
=== PAUSE TestAccEC2Instance_UserData_stringToEncodedString
=== RUN TestAccEC2Instance_UserData_emptyStringToUnspecified
=== PAUSE TestAccEC2Instance_UserData_emptyStringToUnspecified
=== RUN TestAccEC2Instance_UserData_unspecifiedToEmptyString
=== PAUSE TestAccEC2Instance_UserData_unspecifiedToEmptyString
=== CONT TestAccEC2Instance_basic
=== CONT TestAccEC2Instance_UserData
=== CONT TestAccEC2Instance_UserData_emptyStringToUnspecified
--- PASS: TestAccEC2Instance_basic (96.48s)
=== CONT TestAccEC2Instance_UserData_unspecifiedToEmptyString
--- PASS: TestAccEC2Instance_UserData (129.83s)
=== CONT TestAccEC2Instance_userDataBase64_updateWithZipFile
--- PASS: TestAccEC2Instance_UserData_emptyStringToUnspecified (170.68s)
=== CONT TestAccEC2Instance_userDataBase64_update
--- PASS: TestAccEC2Instance_UserData_unspecifiedToEmptyString (163.16s)
=== CONT TestAccEC2Instance_UserData_stringToEncodedString
--- PASS: TestAccEC2Instance_userDataBase64_updateWithZipFile (215.12s)
=== CONT TestAccEC2Instance_UserData_update
--- PASS: TestAccEC2Instance_userDataBase64_update (214.74s)
=== CONT TestAccEC2Instance_userDataBase64_updateWithBashFile
--- PASS: TestAccEC2Instance_UserData_stringToEncodedString (235.36s)
=== CONT TestAccEC2Instance_userDataBase64
--- PASS: TestAccEC2Instance_UserData_update (213.35s)
--- PASS: TestAccEC2Instance_userDataBase64 (116.52s)
--- PASS: TestAccEC2Instance_userDataBase64_updateWithBashFile (235.30s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 627.223s
I can't thank you enough for your help and contribution. 👍 🙇 |
This functionality has been released in v4.3.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. |
Community Note
Relates #23305
Relates #23315 (comment)
Output from acceptance testing: