✨New Terraform Directory and Auth0 Integration #11
Workflow file for this run
This file contains 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: "Auth0 Terraform Plan" | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- "terraform/auth0/**" | |
branches: | |
- main | |
env: | |
TERRAFORM_VERSION: "1.6.6" | |
TF_auth0_client_id: ${{ secrets.AUTH0_OPERATIONS_ENGINEERING_DEV_DEFAULT_CLIENTID }} | |
TF_auth0_client_secret: ${{ secrets.AUTH0_OPERATIONS_ENGINEERING_DEV_DEFAULT_CLIENTSECRET }} | |
TF_client_domain: ${{ secrets.AUTH0_OPERATIONS_ENGINEERING_DEV_DOMAIN}} | |
jobs: | |
terraform: | |
name: "Auth0 Terraform Plan" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
id-token: write | |
strategy: | |
matrix: | |
path: | |
- "operations-engineering-test" | |
defaults: | |
run: | |
working-directory: "terraform/auth0/${{ matrix.path }}" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.TERRAFORM_VERSION }} | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.TERRAFORM_AUTH0_S3_ROLE_ARN_DEV}} | |
aws-region: eu-west-2 | |
- name: Terraform fmt | |
id: fmt | |
run: terraform fmt -check -recursive -diff -no-color | |
continue-on-error: true | |
- name: Terraform Init | |
id: init | |
run: ls -latr; terraform init -input=false -no-color | |
- name: Terraform Validate | |
id: validate | |
run: terraform validate -no-color | |
- name: Terraform Plan | |
id: plan | |
run: terraform plan -input=false -no-color | |
continue-on-error: true | |
# - name: Post Plan to GitHub PR | |
# uses: mshick/add-pr-comment@v1 | |
# with: | |
# allow-repeats: true | |
# repo-token: ${{ secrets.GITHUB_TOKEN }} | |
# repo-token-user-login: 'github-actions[bot]' | |
# message: | | |
# ## ${{ matrix.path }} plan | |
# ``` | |
# ${{ steps.plan.outputs.stdout || steps.plan.outputs.stderr }} | |
# ``` |