Skip to content

Commit

Permalink
add more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
amitsagtani97 committed Oct 12, 2023
1 parent 40afb52 commit d816cc9
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions offline/cd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,11 @@
set -euo pipefail

function cleanup {
echo "Running init inside cleanup function"
terraform init
echo "Running terraform plan from the cleanup function:"
terraform plan
echo "Running terraform providers"
terraform providers
echo "Running terraform init"
terraform init
echo done
echo "Running inside cleanup"
(cd terraform/examples/wire-server-deploy-offline-hetzner ; terraform destroy -auto-approve)
}
trap cleanup EXIT
echo "Running init"
terraform init
echo "Running terraform plan:"
terraform plan
echo "Running terraform providers"
terraform providers
echo "Running terraform init"
terraform init
(cd terraform/examples/wire-server-deploy-offline-hetzner ; terraform init ; terraform apply -auto-approve )
(cd terraform/examples/wire-server-deploy-offline-hetzner ; terraform init ; terraform plan ; terraform provider ; terraform apply -auto-approve )
adminhost=$(cd terraform/examples/wire-server-deploy-offline-hetzner ; terraform output adminhost)
ssh_private_key=$(cd terraform/examples/wire-server-deploy-offline-hetzner ; terraform output ssh_private_key)

Expand Down

0 comments on commit d816cc9

Please sign in to comment.