Skip to content
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

code run on TFE (Terraform Enterprise) shows error "Permission denied" on .sh scripts #556

Closed
ehsanhub opened this issue Jun 11, 2020 · 2 comments

Comments

@ehsanhub
Copy link

when running the code on Private Terraform Enterprise workspace that spins up a container for each terraform apply if (Skip Provisioner is false) I am getting permission error as below
hence upstream nameserver and other dependent config is broken

Initializing plugins and modules...
2020/06/11 14:25:29 [DEBUG] Using modified User-Agent: Terraform/0.12.24 TFE/v202004-2
module.lt-gke-sbx01.null_resource.wait_for_cluster[0]: Creating...
module.lt-gke-sbx01.null_resource.wait_for_cluster[0]: Provisioning with 'local-exec'...
module.lt-gke-sbx01.null_resource.wait_for_cluster[0] (local-exec): Executing: ["/bin/sh" "-c" "kubernetes-engine/modules/beta-private-cluster/scripts/wait-for-cluster.sh project cluster"]
module.lt-gke-sbx01.null_resource.wait_for_cluster[0] (local-exec): /bin/sh: 1: kubernetes-engine/modules/beta-private-cluster/scripts/wait-for-cluster.sh: Permission denied

module.lt-gke-sbx01.null_resource.delete_default_kube_dns_configmap[0]: Creating...
module.lt-gke-sbx01.null_resource.delete_default_kube_dns_configmap[0]: Provisioning with 'local-exec'...
module.lt-gke-sbx01.null_resource.delete_default_kube_dns_configmap[0] (local-exec): Executing: ["/bin/sh" "-c" "kubernetes-engine/modules/beta-private-cluster/scripts/kubectl_wrapper.sh https://10.10.10.1
module.lt-gke-sbx01.null_resource.delete_default_kube_dns_configmap[0] (local-exec): /bin/sh: 1: kubernetes-engine/modules/beta-private-cluster/scripts/kubectl_wrapper.sh: Permission denied

@ehsanhub
Copy link
Author

I could fix the issue by add /bin/bash to null resource command = /bin/bash on the cluster.tf code
now need to install gcloud sdk for this script on tfe ws

@bharathkkb
Copy link
Member

@ehsanhub I dont have much experience with TFE but we are looking into #404 which should help with installing gcloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants