forked from nebius/nebius-solutions-library
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.35 KB
/
soperator-terraform.yml
File metadata and controls
53 lines (43 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: "Soperator Terraform"
on:
pull_request:
paths:
- "soperator/**"
push:
branches:
- main
paths:
- "soperator/**"
permissions:
contents: read
jobs:
terraform-check:
name: "Soperator Terraform Checks"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: soperator
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v4
# Install the latest version of Terraform CLI
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "v1.12.2"
# Check that all Terraform configuration files adhere to a canonical format
- name: Terraform Format Check
run: terraform fmt -check -recursive .
# Initialize Terraform working directory (without backend for validation)
- name: Terraform Init
run: terraform init -backend=false
working-directory: soperator/installations/example
# Validate terraform code in example installation
- name: Terraform Validate - Example Installation
run: terraform validate
working-directory: soperator/installations/example
# Validate terraform modules
- name: Terraform Check - Modules and Installations
run: make terraform-check