Hi there,
I’m running a bash script that runs some additional commands inside a container and I’m getting following error:
Error: Error asking for user input: 1 error(s) occurred:
- provider.google: fork/exec /drone/src/roles//.terraform/plugins/linux_amd64/terraform-provider-google_v1.16.0_x4: permission denied
.drone.yml:
steps:
- name: test
image: hashicorp/terraform:0.11.12
commands:- apk update && apk add bash
- bash _scripts/test.sh
_scripts/test.sh:
#!/bin/bash
set -m
CWD=$(pwd)
for dir in find . -type d | egrep -v '(git)'
; do
cd $CWD/$dir
if [[ ! -z find . -type f -maxdepth 1 -name '*.tf'
]]; then
echo “Entering… $CWD/$dir”
terraform init
terraform plan -detailed-exitcode >/dev/null
fi
fi
I understand this is Terraform-specific, but if I run terraform init from the .drone.yml it works like a charm.
Are there any ways to give permissions to fork/exec processes in the scripts?
Let me know,
Thank you!