-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
terraform hangs when sudo su in amazon linux #19337
Comments
Hi @eduardomaillo, It's hard to say what's going on here, but my first idea is that I assume you're using
I'm not sure if this will make any difference -- if it's Another thing I'd add here, though it's not directly related to your question, is that by the time the EC2 instance is listening on the network and running |
Thanks for the input. When I directly sudo su in the server's console, it does not ask for password, so I assume it shouldn't ask for it either in terraform. |
I was having the same issue when running from the terraform Windows installation through cmd. When running from a macOs i did not have any problem. It also seems when a command responded with a colored output, this stopped the execution in windows. Update: when running from cygwin I had no problem too. |
To enable sudo su in the remote exec, just do:
The operator << is an instruction to read input until it finds a line containing the specified delimiter, as EOF (end of file). |
I want to apologize for the slow response time on this issue, and also let you know that I am bulk-closing all issues exclusively reported against Terraform 0.11.x, including this issue, because we are no longer investigating issues reported against Terraform 0.11.x. In most cases, when we try to reproduce issues reported against 0.11, we either can't reproduce them anymore, or the reporter has moved on, so we believe we can better support the Terraform user community by prioritizing more recent issues. Terraform 0.12 has been available since May of 2019, and there are really significant benefits to adopting it. I know that migrating from 0.11 to versions past 0.12 can require a bit of effort, but it really is worth it, and the upgrade path is pretty well understood in the community by now. 0.14 is available and stable, and we are quickly approaching an 0.15 release. We have made a significant effort in the last year to stay on top of bug reports; we have triaged almost all new bug reports within 1-2 weeks for 6+ months now. If you are still experiencing this problem, please submit a new bug report with a reproduction case that works on 0.14.x, link this old issue for context, and we will triage it. |
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. |
When executing the bootstrap commands, terraforms hangs in the sudo su line. The instance is created, the commands before the sudo su are executed, and it hangs when the sudo su. Nothing else is executed: aws_instance.example: Still creating... (1m40s elapsed) for ever.
The terraform script
The text was updated successfully, but these errors were encountered: