-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Crash when applying updates to AWS: Unary - is only allowed #6963
Comments
Hi @simonsparks! This looks like a parser bug to me. Could you post a snippet of the resource which is causing the issue so I can try to reproduce? Thanks! |
Hi @jen20
The tf source file for the "controller_template" module looked like this:
And the problematic part of the script template looked like this:
where the sed command at the bottom should have had a double $ to escape the bash variable in the template file:
|
Just verified that this is fixed on master with some of the recent HCL work. 👍 In order to achieve the |
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. |
Hi,
I was applying some updates to our AWS environment and experienced a terraform crash.
The changes included an modification to our
controller.sh.tpl
template which sets the user data script for our controller nodes. The change was to enable client certificate authentication on Fabio by writing a client certificate to a file then modifying the Fabio properties to use that file:The initial error refers to an unexpected EOF and a panic regarding unary - :
Running terraform apply again didn't cause another crash but did report a similar error:
After a bit of investigation, I found out that the actual problem was that I hadn't escaped an environment variable in the above script with a double $. Modifying the line as below resolved the error:
sudo sed -i -- "s/^proxy\.addr.*$/&;$${FABIO_CLIENT_AUTH//\//\\\/}/g" $FABIO_CONFIG
I thought I should report the crash anyway as another potential instance of the Unary - bug, issues referenced below.
Terraform Version
Terraform v0.6.15
Affected Resource(s)
Guessing:
Debug Output
https://gist.github.com/simonsparks/241af7ecbe7df678d3d6b01f9722964b
Panic Output
crash.log.zip
References
The text was updated successfully, but these errors were encountered: