Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
self-hosted-runner:
labels:
- blacksmith-2vcpu-ubuntu-2404
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

on:
pull_request:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
terraform:
name: Terraform lint and validate
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 15
env:
CHECKPOINT_DISABLE: "1"
TF_IN_AUTOMATION: "true"
TF_INPUT: "false"
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Set up Terraform
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
with:
terraform_version: 1.14.9
terraform_wrapper: false

- name: Set up TFLint
uses: terraform-linters/setup-tflint@6e1e0642c0289bd619021bf6b34e3c08ed1e005a # v6.3.0
with:
cache: true
tflint_version: v0.64.0

- name: Check Terraform formatting
run: terraform fmt -check -recursive -diff

- name: Initialize TFLint plugins
env:
GITHUB_TOKEN: ${{ github.token }}
run: tflint --init

- name: Run TFLint
run: tflint --format compact

- name: Initialize Terraform
run: terraform init -backend=false -input=false -no-color

- name: Validate Terraform
run: terraform validate -no-color
28 changes: 28 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release Please

on:
push:
branches:
- main

permissions:
contents: write
issues: write
pull-requests: write

concurrency:
group: release-please-${{ github.ref }}
cancel-in-progress: false

jobs:
release-please:
name: Release Please
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 10
steps:
- name: Create or update release
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.7.2"
}
10 changes: 5 additions & 5 deletions .tflint.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

config {
# Enable all available rules by default
module = true
force = false
call_module_type = "local"
force = false
}

# =============================================================================
Expand All @@ -15,7 +15,7 @@ config {

plugin "google" {
enabled = true
version = "0.28.0"
version = "0.39.0"
source = "github.com/terraform-linters/tflint-ruleset-google"
}

Expand Down Expand Up @@ -87,8 +87,8 @@ rule "terraform_required_version" {
# Google Cloud Specific Rules
# =============================================================================

# Ensure GKE clusters use VPC-native networking
rule "google_container_cluster_node_pool" {
# Ensure GKE node pools use valid machine types
rule "google_container_node_pool_invalid_machine_type" {
enabled = true
}

Expand Down
14 changes: 14 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/v17.6.0/schemas/config.json",
"packages": {
".": {
"release-type": "terraform-module",
"include-component-in-tag": false,
"include-v-in-tag": true,
"include-v-in-release-name": true,
"exclude-paths": [
".github"
]
}
}
}