tofu plan, tofu output json capture and export test

This commit is contained in:
Mike Holloway 2025-01-07 04:44:06 -05:00
parent 34aae1b35e
commit 21bbb23545

View File

@ -14,8 +14,15 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: opentofu/setup-opentofu@v1 - uses: opentofu/setup-opentofu@v1
- run: "tofu init && tofu plan" # && tofu apply -auto-approve" - name: tofu apply
run: "tofu init && tofu apply -auto-approve"
working-directory: "${{ gitea.workspace }}/.gitea/tofu"
- name: tofu output capture
run: |
tofu output -json | jq -r '@sh "export TARGET_IP_ADDRESS=\(.act_worker_ip_address.value\)"'
echo $TARGET_IP_ADDRESS
sleep 300
working-directory: "${{ gitea.workspace }}/.gitea/tofu"
- run: "tofu destroy -auto-approve""
working-directory: "${{ gitea.workspace }}/.gitea/tofu" working-directory: "${{ gitea.workspace }}/.gitea/tofu"
# - run: "tofu destroy -auto-approve""
# working-directory: "${{ gitea.workspace }}/.gitea/tofu"