remote-exec + inline creates a temporary shell script

1,330 views
Skip to first unread message

Cassiano Aquino

unread,
Sep 26, 2016, 8:29:51 AM9/26/16
to Terraform
Hi,

I'm trying to provision a CIS baseline hardened server, which one of the requirements is to have /tmp mounted with noexec,nosuid but this breaks remote-exec provisioner.

Looks like the inline calls on remote-exec are not really "inline", they create a shell script on /tmp which is executed in the end by terraform, are my assumptions based on the problem I'm seeing true?


module.stack.ldap_config.null_resource.upload_ldap_certificates.1 (remote-exec): bash: /tmp/terraform_920505565.sh: Permission denied
module.stack.ldap_config.null_resource.upload_ldap_certificates.2 (remote-exec): bash: /tmp/terraform_605246161.sh: Permission denied
module.stack.ldap_config.null_resource.upload_ldap_certificates.0 (remote-exec): bash: /tmp/terraform_956533229.sh: Permission denied

Thanks,
Cassiano

Ian Duffy

unread,
Sep 27, 2016, 5:55:28 PM9/27/16
to terrafo...@googlegroups.com
set a script_path on your communicator https://www.terraform.io/docs/provisioners/connection.html

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/352968ae-4bca-4980-af38-8a88be926ecc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages