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.
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.
Click below to sign up and get $200 of credit to try our products over 60 days!
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.ymland you’ve added your script in there.
Then you could use the following
curlrequest to spin up a new server with that user data file:
Hope that this helps!