Fix leading zeroes (#2) #62
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: | |
deploy: | |
name: "Plan & Deploy Sandbox Environment" | |
runs-on: ubuntu-latest | |
environment: Sandbox | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: "Validate GitHub Environment" | |
run: | | |
raised=0 | |
test -z "${{ vars.DEPLOY_ROLE_ARN }}" && (echo "::error title=Repository Configuration Incomplete::This repository is missing an environment variable for DEPLOY_ROLE_ARN!"; raised=1) | |
test -z "${{ vars.AWS_REGION }}" && (echo "::error title=Repository Configuration Incomplete::This repository is missing a secret for AWS_REGION!"; raised=1) | |
exit $raised | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1.7.0 | |
with: | |
role-to-assume: ${{ vars.DEPLOY_ROLE_ARN }} | |
role-session-name: ${{ github.run_id }} | |
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 | |
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' | |
- 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 | |
with: | |
tf_version: '1.5.5' | |
tg_version: '0.54.11' | |
tg_dir: 'platform/sandbox/us-east-2/000' | |
tg_command: 'apply sandbox.tfplan' | |