Hi there,
is there a simple way to add a bigger user-data file into the string?
We have quite a few linebreaks and it is cumbersome to add those. Is there a recommended online tool to convert smth like
#!/bin/bash
add-apt-repository -y ppa:ondrej/php
apt -y update
apt -y install nginx
apt -y install jq
into “#!/bin/bash \n add-apt-repository …”
The option to add a file link at whould be great too.
user_data
and
user_data_file
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
Yes, what you could do is to create a file and add that content into the file.
Let’s say that you’ve created a file called
user-data.yml
and you’ve added your script in there.Then you could use the following
curl
request to spin up a new server with that user data file:Hope that this helps!
Best,
Bobby