Update changelog #161
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: 'Terraform-Workflow' | |
on: [push, workflow_dispatch] | |
permissions: | |
id-token: write # required to use OIDC authentication | |
contents: read # required to checkout the code from the repo | |
jobs: | |
deploy: | |
name: 'Terraform' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./terraform | |
environment: NGAP DEV # default NGAP env, can be changed as needed | |
env: | |
TF_LOG: INFO | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# AWS Authentication. Please uncomment this step in your repo to authenticate to AWS. | |
# - name: Configure AWS Credentials | |
# uses: aws-actions/configure-aws-credentials@v2 | |
# with: | |
# aws-region: "${{ secrets.AWS_REGION }}" | |
# role-to-assume: ${{ secrets.AWS_ASSUME_ROLE }} | |
# role-session-name: PDS_GitHub_OIDC_TERRAFORM | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v3 | |
- name: Terraform Init | |
id: init | |
env: | |
AWS_BUCKET_NAME: ${{ secrets.AWS_BUCKET_NAME}} | |
AWS_BUCKET_KEY_NAME: ${{ secrets.AWS_BUCKET_KEY_NAME}} | |
run: terraform init -backend-config="bucket=${AWS_BUCKET_NAME}" -backend-config="key=${AWS_BUCKET_KEY_NAME}" | |
- name: Terraform Format & Validate | |
id: fmt_validate | |
run: | | |
terraform fmt | |
terraform validate -no-color | |
# Please uncomment the plan and apply steps below in your terraform worfklow to deploy your infrastructure to AWS. | |
# - name: Terraform Plan | |
# id: plan | |
# run: terraform plan -no-color | |
# continue-on-error: true | |
# - name: Terraform Plan Status | |
# id : plan_status | |
# if: steps.plan.outcome == 'failure' | |
# run: exit 1 | |
# - name: Terraform Apply | |
# if: github.ref == 'refs/heads/main' && github.event_name == 'push' # both conditions have to be met | |
# run: terraform apply -auto-approve |