Update fleet_pipelines.tf
Some checks are pending
Terraform / Plan (push) Waiting to run
Terraform / Apply (push) Blocked by required conditions

This commit is contained in:
Rasmus Wejlgaard 2026-05-08 19:32:58 +01:00 committed by GitHub
parent d88d2e5d12
commit 51efda6053
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,29 +1,27 @@
resource "grafana_fleet_management_pipeline" "linux_node_linux" {
name = "linux_node_linux"
matchers = ["collector.os=\"linux\""]
contents = file("${path.module}/fleet_pipelines/linux_node_linux.alloy")
locals {
fleet_pipelines = {
linux_node_linux = {
matchers = ["collector.os=\"linux\""]
}
octopus_exporter = {
matchers = ["collector.ID=\"london-c\""]
}
plex = {
matchers = ["collector.ID=\"london-b\""]
}
caddy_linux = {
matchers = ["collector.ID=\"helsinki-a\""]
}
docker_linux = {
matchers = ["collector.os=\"linux\""]
}
}
}
resource "grafana_fleet_management_pipeline" "octopus_exporter" {
name = "octopus_exporter"
matchers = ["collector.ID=\"london-c\""]
contents = file("${path.module}/fleet_pipelines/octopus_exporter.alloy")
}
resource "grafana_fleet_management_pipeline" "this" {
for_each = local.fleet_pipelines
resource "grafana_fleet_management_pipeline" "plex" {
name = "plex"
matchers = ["collector.ID=\"london-b\""]
contents = file("${path.module}/fleet_pipelines/plex.alloy")
}
resource "grafana_fleet_management_pipeline" "caddy_linux" {
name = "caddy_linux"
matchers = ["collector.ID=\"helsinki-a\""]
contents = file("${path.module}/fleet_pipelines/caddy_linux.alloy")
}
resource "grafana_fleet_management_pipeline" "docker_linux" {
name = "docker_linux"
matchers = ["collector.os=\"linux\""]
contents = file("${path.module}/fleet_pipelines/docker_linux.alloy")
name = each.key
matchers = each.value.matchers
contents = file("${path.module}/fleet_pipelines/${each.key}.alloy")
}