Testing planning output #32
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: | |
plan: | |
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 | |
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: | | |
pwd | |
ls -al . | |
echo "------------ PLAN ------------" | |
cat tg-plan.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 ./tg-plan.json' | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [ plan ] | |
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 }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Deploy | |
uses: gruntwork-io/terragrunt-action@v2 | |
env: | |
AWS_REGION: ${{ vars.AWS_REGION }} | |
INPUT_PRE_EXEC_1: | | |
sudo apt update -yqq && sudo apt install python3 -yqq | |
with: | |
tf_version: '1.5.5' | |
tg_version: '0.54.11' | |
tg_dir: 'platform/sandbox/us-east-2/000' | |
tg_command: 'apply' |