Fix CI script for Terraform >0.15 (#7928)

This commit is contained in:
Florian Ruynat 2021-09-01 13:30:59 +02:00 committed by GitHub
parent 48ceca4919
commit c7529270ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -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"

View file

@ -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

View file

@ -2,4 +2,4 @@
set -euxo pipefail
cd ..
terraform destroy -auto-approve "contrib/terraform/$PROVIDER"
terraform -chdir="contrib/terraform/$PROVIDER" destroy -auto-approve