You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unix style file encoding? I found that for some reason, whenever I rendered my startup-script from a template GCE would not execute it. Not rendering it from a template and just passing in text did work. When I looked at the startup-script value for the GCE instance in the GCP console though it looked identical when doing it either way. I suspect its using windows style file encoding and GCE doesn't like that. I haven't confirmed this, but I bet if I ran terraform apply from a linux or mac it would work.
Actual Behavior
GCE isn't running my startup-script and I'm certain it has to do with the file encoding. Is there a way to set the file encoding?
Steps to Reproduce
Pass metadata_startup_script a multi-line template on a windows box
The text was updated successfully, but these errors were encountered:
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
locked and limited conversation to collaborators
Apr 5, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
Terraform Configuration Files
Template file
echo ${instance_name } > /tmp/one.txt
echo ${instance_name } > /tmp/two.txt
Debug Output
metadata_startup_script: "" => "echo blahblah > /tmp/one.txt\r\necho blahblah > /tmp/two.txt\r\n"
Expected Behavior
Unix style file encoding? I found that for some reason, whenever I rendered my startup-script from a template GCE would not execute it. Not rendering it from a template and just passing in text did work. When I looked at the startup-script value for the GCE instance in the GCP console though it looked identical when doing it either way. I suspect its using windows style file encoding and GCE doesn't like that. I haven't confirmed this, but I bet if I ran terraform apply from a linux or mac it would work.
Actual Behavior
GCE isn't running my startup-script and I'm certain it has to do with the file encoding. Is there a way to set the file encoding?
Steps to Reproduce
Pass metadata_startup_script a multi-line template on a windows box
The text was updated successfully, but these errors were encountered: