JSON plan #47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test AWS Connectivity | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| Sandbox: | |
| runs-on: ubuntu-latest | |
| environment: Sandbox | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v1.7.0 | |
| with: | |
| role-to-assume: ${{ vars.DEPLOY_ROLE_ARN }} | |
| role-session-name: Test-AWS-GHA-OIDC | |
| aws-region: ${{ vars.AWS_REGION }} | |
| - name: Plan | |
| id: plan | |
| uses: gruntwork-io/terragrunt-action@v2 | |
| env: | |
| AWS_REGION: ${{ vars.AWS_REGION }} | |
| INPUT_PRE_EXEC_0: | | |
| sudo apt update -yqq && sudo apt install python3 -yqq | |
| INPUT_POST_EXEC_0: | | |
| set -x | |
| env | sort | grep GITHUB | |
| pwd | |
| ls -al /github/workspace/ | |
| tfplan_location=$(find . -name "sandbox.tfplan") | |
| tfplan_json=$(terraform show -json $tfplan_location) | |
| echo "-------- PLAN --------" | |
| echo $tfplan_json | |
| echo "------ END PLAN ------" | |
| with: | |
| tf_version: '1.5.5' | |
| tg_version: '0.54.11' | |
| tg_dir: 'platform/sandbox/us-east-2/000' | |
| tg_command: 'plan -out=sandbox.tfplan -json' | |
| - name: Deploy | |
| uses: gruntwork-io/terragrunt-action@v2 | |
| env: | |
| AWS_REGION: ${{ vars.AWS_REGION }} | |
| TERRAFORM_PLAN: ${{ steps.plan.outputs.TERRAFORM_PLAN }} | |
| INPUT_PRE_EXEC_0: | | |
| sudo apt update -yqq && sudo apt install python3 -yqq | |
| INPUT_PRE_EXEC_1: | | |
| echo $TERRAFORM_PLAN >> platform/sandbox/us-east-2/000/sandbox.tfplan | |
| INPUT_PRE_EXEC_2: | | |
| echo "-------- PLAN --------" | |
| cat platform/sandbox/us-east-2/000/sandbox.tfplan | |
| with: | |
| tf_version: '1.5.5' | |
| tg_version: '0.54.11' | |
| tg_dir: 'platform/sandbox/us-east-2/000' | |
| tg_command: 'apply' |