Skip to content

feat: adding a router for the network #2

feat: adding a router for the network

feat: adding a router for the network #2

Workflow file for this run

name: Terraform IaC template validation for GCP Infrastructure
on:
workflow_dispatch:
pull_request:
branches: [master]
jobs:
gcp_tf_validate:
runs-on: ubuntu-latest
environment: ${{ vars.ENVIRONMENT }}
name: Validate GCP Infrastructure
steps:
- name: Checking out the terraform code
uses: actions/checkout@v3
# - name: Create Terraform variables
# run: |
# cd root && touch prod.tfvars
# echo region=${{ vars.GCP_REGION }} >> prod.tfvars
# echo env=${{ vars.ENV }} >> prod.tfvars
# echo subnet_cidr=${{ vars.GCP_SUBNET_CIDR }} >> prod.tfvars
# echo project_name=${{ vars.GCP_PROJECT_NAME }} >> prod.tfvars
# echo project_id=${{ vars.GCP_PROJECT_ID }} >> prod.tfvars
# echo org_id=${{ vars.GCP_ORG_ID }} >> prod.tfvars
# echo billing_account_id=${{ secrets.GCP_ORG_ID }} >> prod.tfvars
# echo api_names=${{ vars.GCP_API_NAMES }} >> prod.tfvars
# echo vpc_name=${{vars.GCP_VPC_NAME}} >> prod.tfvars
# echo subnet_name=${{vars.GCP_SUBNET_NAME}} >> prod.tfvars
# echo vm_name=${{vars.GCP_VM_NAME}} >> prod.tfvars
# echo machine_type=${{vars.GCP_MACHINE_TYPE}} >> prod.tfvars
# echo zone=${{vars.GCP_ZONE}} >> prod.tfvars
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
# aws-region: ${{ vars.AWS_REGION }}
- name: Setup `Terraform`
uses: hashicorp/setup-terraform@v2
- name: Terraform fmt
id: fmt
run: terraform fmt -check
continue-on-error: true
- name: Terraform Init
id: init
run: terraform init
- name: Terraform Validate
id: validate
run: terraform validate