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

[#4794] Don't Base64-encode EC2 userdata if it is already Base64 encoded #6140

Merged

Conversation

dougneal
Copy link
Contributor

The user data may be Base64 encoded already - for example, if it has been generated by a template_cloudinit_config resource.

Partially resolves #4794

The user data may be Base64 encoded already - for example, if it has been
generated by a template_cloudinit_config resource.
@dougneal dougneal changed the title Don't Base64-encode EC2 userdata if it is already Base64 encoded [#4794] Don't Base64-encode EC2 userdata if it is already Base64 encoded Apr 12, 2016
@catsby
Copy link
Contributor

catsby commented Apr 12, 2016

Looks good, thanks! Could I trouble you to throw some already encoded data into the config of the TestAccAWSInstance_vpc? You can reuse this user_data encoding. That will give us an acceptance test that verifies this works.

Let me know!

@catsby catsby added waiting-response An issue/pull request is waiting for a response from the community provider/aws bug labels Apr 12, 2016
@dougneal
Copy link
Contributor Author

Hey @catsby, something like this? It doesn't decode to anything meaningful, but it passes as a valid Base64 encoding.

@dougneal dougneal force-pushed the 4794/ec2_userdata_dont_double_base64 branch from 40ff572 to f020ebb Compare April 13, 2016 09:42
@dougneal dougneal force-pushed the 4794/ec2_userdata_dont_double_base64 branch from f020ebb to 0181b6b Compare April 13, 2016 09:46
@catsby
Copy link
Contributor

catsby commented Apr 13, 2016

Yep! I'll to add the resource.TestCheckResourceAttr check for that test, thanks!

@catsby catsby merged commit 1c662c2 into hashicorp:master Apr 13, 2016
@catsby catsby removed the waiting-response An issue/pull request is waiting for a response from the community label Apr 13, 2016
@catsby
Copy link
Contributor

catsby commented Apr 13, 2016

Here's the addition, in case you're curious

That string is the hex encoding that we do in the StateFunc for user_data

chrislovecnm pushed a commit to chrislovecnm/terraform that referenced this pull request Apr 16, 2016
…se64 encoded (hashicorp#6140)

* Don't Base64-encode EC2 userdata if it is already Base64 encoded

The user data may be Base64 encoded already - for example, if it has been
generated by a template_cloudinit_config resource.

* Add encoded user_data to aws_instance acceptance test
@ghost
Copy link

ghost commented Apr 26, 2020

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_instance cloud-init mutipart encoding, etc. issues.
2 participants