From c7529270ff6bc053da201baa8ec1d86093bab17c Mon Sep 17 00:00:00 2001 From: Florian Ruynat <16313165+floryut@users.noreply.github.com> Date: Wed, 1 Sep 2021 13:30:59 +0200 Subject: [PATCH] Fix CI script for Terraform >0.15 (#7928) --- .gitlab-ci/terraform.yml | 2 +- tests/scripts/create-tf.sh | 2 +- tests/scripts/delete-tf.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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