Skip to content

fixing references to resources #2

fixing references to resources

fixing references to resources #2

name: 'Terraform Validate Only'
on:
push:
branches-ignore:
- main
paths:
- devops/envs/prod-unicc/*
permissions:
contents: read
jobs:
terraform:
name: 'Terraform'
runs-on: ubuntu-latest
defaults:
run:
working-directory: devops/envs/prod-unicc/
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v3
# Step up Terraform
- uses: hashicorp/setup-terraform@v3
- name: Terraform Format
id: fmt
run: terraform fmt -check
continue-on-error: true
- name: Terraform Init
id: init
run: |
sed -i "s|[email protected]:awsopda/who-|https://github.com/finddx/|" ./*
rm -f backend.tf
echo "machine github.com login x password ${MY_GH_TOKEN}" > ~/.netrc
git config --global url."https://github.com/".insteadOf "git://github.com/"
git config --global advice.detachedHead false
terraform init -input=false
env:
MY_GH_TOKEN: ${{secrets.PAT_FINE_GRAINED}}
- name: Terraform Validate
id: validate
run: terraform validate -no-color