diff --git a/.gitlab-ci/terraform.yml b/.gitlab-ci/terraform.yml index 7196a7d62..992307719 100644 --- a/.gitlab-ci/terraform.yml +++ b/.gitlab-ci/terraform.yml @@ -18,7 +18,7 @@ - echo "$PACKET_PRIVATE_KEY" | base64 -d > ~/.ssh/id_rsa - chmod 400 ~/.ssh/id_rsa - echo "$PACKET_PUBLIC_KEY" | base64 -d > ~/.ssh/id_rsa.pub - - mkdir -p group_vars + - mkdir -p contrib/terraform/$PROVIDER/group_vars # Random subnet to avoid routing conflicts - export TF_VAR_subnet_cidr="10.$(( $RANDOM % 256 )).$(( $RANDOM % 256 )).0/24" diff --git a/tests/scripts/create-tf.sh b/tests/scripts/create-tf.sh index 5f84647fa..fbed30268 100755 --- a/tests/scripts/create-tf.sh +++ b/tests/scripts/create-tf.sh @@ -2,4 +2,4 @@ set -euxo pipefail cd .. -terraform apply -auto-approve -parallelism=1 "contrib/terraform/$PROVIDER" +terraform -chdir="contrib/terraform/$PROVIDER" apply -auto-approve -parallelism=1 diff --git a/tests/scripts/delete-tf.sh b/tests/scripts/delete-tf.sh index c740d205e..57c35c83e 100755 --- a/tests/scripts/delete-tf.sh +++ b/tests/scripts/delete-tf.sh @@ -2,4 +2,4 @@ set -euxo pipefail cd .. -terraform destroy -auto-approve "contrib/terraform/$PROVIDER" +terraform -chdir="contrib/terraform/$PROVIDER" destroy -auto-approve