Open jmalette opened 5 years ago
BTW - after some troubleshooting, it looks like when I use the inline argument it will always create the script in /tmp and on my ec2 instance /tmp is mounted as noexec so this will always fail. can I enable this to use the connection user home directory?
This seems related to #5667.
5667
No, I don't think they are related. My problem is a little different as it's simply trying to execute a script from a folder that is located on a drive mounted with noexec on.
Hi, we're facing the same issue. It's quite common to have noexec flag on /tmp partition. We'd appreciate if the path was either configurable or changed.
For example Ansible uses as default path for storing executed scripts ~/.ansible/tmp/
.
I am still getting,
╷
│ Error: remote-exec provisioner error
│
│ with null_resource.setup,
│ on main.tf line 59, in resource "null_resource" "setup":
│ 59: provisioner "remote-exec" {
│
│ error executing "/tmp/terraform_1227397609.sh": Process exited with status 1
I defined connection, copy, execute details on a "null resource" but still failing on
terraform apply
Is there a way to change the location of terraform*.sh
We are running into the same problem.
Error: error executing "/tmp/terraform_1041217423.sh": Process exited with status 126
` provisioner "remote-exec" { inline = ["echo test > test.log"]
connection {
host = self.ipv4_address
type = "ssh"
user = "root"
private_key = ***
}
}`
the "default" remote_exec directory /tmp is non executable A feature to change the default remote_exec directory would be awesome.
Terraform Version
Terraform Configuration Files
Debug Output
N/A
Crash Output
N/A
Expected Behavior
terraform execute remote-exec and add that proxy entry to the environment file
Actual Behavior
I get an error - Process exited with status 126
Steps to Reproduce
terraform init
terraform apply
Additional Context
It looks like when I use inline for remote-exec you are defaulting to creating the script in /tmp and on my aws ec2 instance., /tmp is mounted as a noexec mount so this will always fail. Any ability to enable this to use the connection user's home directory?
References