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

user_data in aws_launch_configuration can't be gzip/base64 #11488

Closed
dodwmd opened this issue Jan 28, 2017 · 3 comments
Closed

user_data in aws_launch_configuration can't be gzip/base64 #11488

dodwmd opened this issue Jan 28, 2017 · 3 comments

Comments

@dodwmd
Copy link

dodwmd commented Jan 28, 2017

Hi there,

Not really a bug. Most likely could be dealt with a documentation update to state that user_data in a aws_launch_configuration shouldn't be encoded when using template_cloudinit_config and doing multi-part configs.

@apparentlymart
Copy link
Contributor

Hi @dodwmd! Thanks for this documentation suggestion.

Is there some documentation from AWS that reflects this limitation?

It was my impression that user_data is just an arbitrary string that can be whatever format you want it to be, since it's up to code running in the EC2 instance to decode it and handle it. Thus if the launch configuration is booting an AMI that has cloudinit installed then template_cloudinit_config ought to be fine, but it wouldn't work if the AMI does something different to handle user_data.

@dodwmd
Copy link
Author

dodwmd commented Jan 29, 2017

To be honest I did very little investigation. I tried multi-part configs with the encoding turned on.. it wouldn't load.. i cut and pasted the encoded output into a instance user_data and manually spun it up, it worked.. i disabled the encoding and remade the lc and everything started working.. i've other asg's that use cloudinit without doing multiple parts and they work fine encoded or not.. it just seems to be when your doing multiple template parts encoding them b64/gzip and trying to use it on a asg that doesn't..

Also of note the decoded b64 created with template_cloudinit_config has lots of ^M's at the end of each line that it adds in (headers) around the template parts.. don't think it's causing any issues.. just being ocd..

@ghost
Copy link

ghost commented Apr 10, 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 10, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants