Skip to content

Commit

Permalink
no locks for terraform apply/init/destroy
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Lopez Rubio <[email protected]>
  • Loading branch information
marclop committed Jul 19, 2022
1 parent 16ddddd commit fd19e4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testing/smoke/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ terraform_apply() {
echo stack_version=\"${1}\" > terraform.tfvars
if [[ ! -z ${2} ]] && [[ ${2} ]]; then echo integrations_server=true >> terraform.tfvars; fi
if [[ ! -f main.tf ]]; then cp ../main.tf .; fi
if [[ ! -f .terraform.lock.hcl ]]; then terraform init >> tf.log; fi
terraform apply -auto-approve >> tf.log
if [[ ! -f .terraform.lock.hcl ]]; then terraform init -lock=false >> tf.log; fi
terraform apply -lock=false -auto-approve >> tf.log

if [[ ${EXPORTED_AUTH} ]]; then
return
Expand All @@ -32,7 +32,7 @@ terraform_destroy() {
cat tf.log
fi
echo "-> Destroying the underlying infrastructure..."
terraform destroy -auto-approve >> tf.log
terraform destroy -auto-approve -lock=false >> tf.log
rm -f terraform.tfvars tf.log main.tf
exit ${exit_code}
}
Expand Down

0 comments on commit fd19e4c

Please sign in to comment.