Skip to content

Instantly share code, notes, and snippets.

@kevinkarwaski
Created September 18, 2020 00:47
Show Gist options
  • Save kevinkarwaski/65a3ae0c0ecc25b50d9e586a0aeb6853 to your computer and use it in GitHub Desktop.
Save kevinkarwaski/65a3ae0c0ecc25b50d9e586a0aeb6853 to your computer and use it in GitHub Desktop.
name: Terragrunt Apply All (deploy)
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
steps:
- uses: actions/checkout@v1
- name: Install Terraform and Terragrunt
run: |
brew tap rocketinsights/tgenv
brew install tfenv tgenv
tfenv install
tgenv install
- name: Get Versions
run: |
terragrunt --version
terraform --version
- name: Setup infra modules deploy key
run: |
mkdir ~/.ssh
echo "${{ secrets.INFRA_MODULES_DEPLOY_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa github.com
- name: Terragrunt plan-all
run: terragrunt plan-all
- name: Terragrunt apply-all
run: terragrunt apply-all --terragrunt-non-interactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment