Skip to content

Feat/5 implement data isolation and multitenancy in grafana #206

Feat/5 implement data isolation and multitenancy in grafana

Feat/5 implement data isolation and multitenancy in grafana #206

name: Terraform Checks
on:
pull_request:
paths:
- '**/terraform/**'
- '.github/workflows/terraform-checks.yaml'
push:
branches:
- main
paths:
- '**/terraform/**'
workflow_dispatch:
permissions:
contents: read
pull-requests: write
jobs:
terraform-fmt:
name: Format Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
component:
- argocd-agent
- argocd
- cert-manager
- ingress-controller
- lgtm-stack
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "~> 1.0"
- name: Terraform Format Check
id: fmt
working-directory: ${{ matrix.component }}/terraform
run: terraform fmt -check -recursive
continue-on-error: false
terraform-validate:
name: Validate
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
component:
- argocd-agent
- argocd
- cert-manager
- ingress-controller
- lgtm-stack
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "~> 1.0"
- name: Terraform Init
id: init
working-directory: ${{ matrix.component }}/terraform
run: terraform init -backend=false
- name: Terraform Validate
id: validate
working-directory: ${{ matrix.component }}/terraform
run: terraform validate -no-color
tfsec:
name: Security Scan
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
component:
- argocd-agent
- argocd
- cert-manager
- ingress-controller
- lgtm-stack
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run tfsec
uses: aquasecurity/tfsec-action@v1.0.3
with:
working_directory: ${{ matrix.component }}/terraform
soft_fail: true