Skip to content

Commit

Permalink
Skipping init when running in dev mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofferahl committed Feb 23, 2024
1 parent ddd946e commit cc20c08
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ run_dev() {
direct {}
}" >dev.tfrc

log INF "Setting up environment..."
export TF_CLI_CONFIG_FILE=${PWD:?}/dev.tfrc
log INF "Set TF_CLI_CONFIG_FILE=${TF_CLI_CONFIG_FILE:?}"
export SKIP_INIT=true

local command="${1:-}"
shift || true
Expand Down Expand Up @@ -173,7 +174,7 @@ run_examples() {

[[ "$(basename "${d:?}")" != "self-hosted" ]] && generate_provider_config_file

terraform init -upgrade
[[ ${SKIP_INIT:-false} == false ]] && terraform init -upgrade
terraform apply
fi
done
Expand All @@ -199,7 +200,7 @@ run_test_integration() {

generate_provider_config_file

terraform init -upgrade
[[ ${SKIP_INIT:-false} == false ]] && terraform init -upgrade
terraform apply -auto-approve
if [[ ${CI:-false} != true ]]; then
echo "PRESS ENTER TO CONTINUE..."
Expand Down

0 comments on commit cc20c08

Please sign in to comment.