Ad-hoc Terraform Plan #105
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: Ad-hoc Terraform Plan | |
on: | |
workflow_dispatch: | |
inputs: | |
env: | |
description: "Environment target" | |
required: true | |
default: "prod" | |
jobs: | |
terraform-plan: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./ops | |
env: # all Azure interaction is through Terraform | |
ARM_CLIENT_ID: ${{ secrets.TERRAFORM_ARM_CLIENT_ID }} | |
ARM_CLIENT_SECRET: ${{ secrets.TERRAFORM_ARM_CLIENT_SECRET }} | |
ARM_SUBSCRIPTION_ID: ${{ secrets.TERRAFORM_ARM_SUBSCRIPTION_ID }} | |
ARM_TENANT_ID: ${{ secrets.TERRAFORM_ARM_TENANT_ID }} | |
OKTA_API_TOKEN: ${{ secrets.OKTA_API_TOKEN_NONPROD }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Use prod Okta token if required | |
if: ${{ github.event.inputs.env == 'prod' || github.event.inputs.env == 'stg' }} | |
run: | | |
echo "OKTA_API_TOKEN=${{ secrets.OKTA_API_TOKEN }}" >> "$GITHUB_ENV" | |
- uses: hashicorp/[email protected] | |
with: | |
terraform_version: 1.3.3 | |
- name: Terraform Init | |
run: make init-${{ github.event.inputs.env }} | |
- name: Build ReportStream function app | |
uses: ./.github/actions/build-reportstream-functions | |
with: | |
deploy-env: ${{env.DEPLOY_ENV}} | |
- name: Terraform plan | |
run: make plan-${{ github.event.inputs.env }} |