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
10 changes: 8 additions & 2 deletions .github/workflows/run-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
workflow_dispatch:
inputs:
arguments:
description: 'Terraform CLI arguments'
description: "Terraform CLI arguments"
required: true
default: 'apply -auto-approve'
default: "apply -auto-approve"

defaults:
run:
Expand All @@ -29,6 +29,12 @@ jobs:
with:
terraform_version: "1.11.4"
terraform_wrapper: false
- name: Sops Binary Installer
uses: mdgreenwald/mozilla-sops-action@v1.6.0
- name: Descrypt config.yaml
run: sops -d -i config.yaml
env:
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
- name: Terraform Init
run: terraform init -input=false
- name: Terraform + Custom Inputs
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
with:
terraform_version: "1.11.4"
terraform_wrapper: false
- name: Sops Binary Installer
uses: mdgreenwald/mozilla-sops-action@v1.6.0
- name: Descrypt config.yaml
run: sops -d -i config.yaml
env:
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
- name: Terraform Init
run: terraform init -input=false
- name: Terraform Plan
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
.terraform.tfstate.lock.info
terraform.tfstate*
env.auto.tfvars
/config.yaml
.env
5 changes: 5 additions & 0 deletions .sops.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
creation_rules:
- path_regex: ^config\.yaml$
encrypted_regex: ^(auth)$
age: age1klj2c5sj490j2g6ptlf3uh5cwehr4jfdt6c2e638a939sf7pfcdqjm54hq
59 changes: 43 additions & 16 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
grafana:
cloud:
url: https://dmtrglobal.grafana.net
auth: ENC[AES256_GCM,data:7Wbq1IRDNeIXPA3X8EwMABCZePLKKMClf0OD7W3TxzqwH27m7B5EyqSVE5/8hw==,iv:Hj7Ppns3XYnU4cxEvNW5MvhcHBmYv800j+BPXGeC3t4=,tag:E/MBlYplPHjPUoH0E0bVeQ==,type:str]
folders:
- local_directory: grafana/dashboards/demeter
grafana_title: Demeter Blink Labs
datasource_uids:
datasource_uid: gke_blinklabs-demeter_us-central1_dmtr-cluster-prometheus
data_sources:
gke_blinklabs-demeter_us-central1_dmtr-cluster-prometheus:
type: prometheus
name: gke_blinklabs-demeter_us-central1_dmtr-cluster-prometheus
url: http://prometheus-operated.dmtr-system.svc.cluster.local:9090
pdc: 46f68690-716c-47ff-91d0-26359c834aae
alerts:
- local_directory: grafana/alerts/blinklabs
grafana_title: Blink Labs
folder_uid: fe24y2dswncowc
- local_directory: grafana/alerts/demeter
grafana_title: Demeter
folder_uid: de9p56uby56v4a
sops:
age:
- recipient: age1klj2c5sj490j2g6ptlf3uh5cwehr4jfdt6c2e638a939sf7pfcdqjm54hq
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWNHhFVkh6eGc0QTVUNTZk
OHgxcllnOHNWODVpUUZMZUlCWng1ZjhZWlhnCmkyZWNxbFlZMEN1YUo0akJWdkdW
OXNKR1cvQVhEMVJMRk56WXg3YTB2ZlEKLS0tIFQ1bGRrYXErQ2RwOUJSekQwUzAw
UEtmcVpPQlMzWXNaeS93bndHTmdMYWMKr5pcKioeQQJ2QH43yhfRb2T/mTRCDnfg
SDF1sbPenrnDJRA8Gi9CphX9bPz3XtkjRTsFYxD/hW1doSTiflkVJw==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-09-29T14:24:04Z"
mac: ENC[AES256_GCM,data:/D+CbQWHWLmICi5vPzcs4no8GyEeaP3693F2tBOaD331CNC8SnCcAC+ruOyFi/0AHdbpFwYJSOsLjvKDVwnXYvosKaSLqLz4Lh13Kji/pptXEi5vAXKMmwLBiN62F51wn5Ud9+yhGU2e1fyaqkNWqW+7Bzjxz4uNjlGAeLxXU7k=,iv:dQOMdSE43SXatM9nnAl7iKxMPQUQgcjkUWqc68ijAtw=,tag:tWPX0+ajH/gXl+xzEo/zqw==,type:str]
encrypted_regex: ^(auth)$
version: 3.10.2
13 changes: 13 additions & 0 deletions grafana-dashboards.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module "grafana_dashboard" {
for_each = {
for folder in local.env_vars.grafana.folders :
folder.local_directory => folder
}
source = "./modules/grafana_dashboard"
local_directory = each.value.local_directory
grafana_title = each.value.grafana_title
datasource_uids = {
# This is a template variable used in Demeter dashboards
datasource_uid = module.grafana_data_sources.uids[each.value.datasource_uids.datasource_uid]
}
}
4 changes: 4 additions & 0 deletions grafana-data-sources.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module "grafana_data_sources" {
source = "./modules/grafana_data_sources"
data_sources = local.env_vars.grafana.data_sources
}
Loading