diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index b0f69e3..80ae92a 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -22,12 +22,13 @@ lint: - terrascan - trivy enabled: + - hadolint@2.12.0 - tflint@0.51.1 - gitleaks@8.18.4 - markdownlint@0.41.0 - taplo@0.8.1 - actionlint@1.7.1 - - checkov@3.2.148 + - checkov@3.2.156 - git-diff-check - prettier@3.3.2 - yamllint@1.35.1 @@ -56,4 +57,4 @@ tools: - tofu@1.7.2 - trunk-toolbox@0.3.2 - tflint@0.51.1 - - terraform@1.1.4 + - terraform@1.9.0 diff --git a/modules/vigil/inputs.tf b/modules/vigil/inputs.tf index ac1e77e..4a963ed 100644 --- a/modules/vigil/inputs.tf +++ b/modules/vigil/inputs.tf @@ -19,9 +19,10 @@ variable "docker_networks" { variable "monitored_services" { type = map(list(object({ - id = string - label = string - endpoints = list(string) + id = string + label = string + endpoints = list(string) + http_method = optional(string, null) }))) } variable "page_title" { diff --git a/modules/vigil/vigil.service.toml.tpl b/modules/vigil/vigil.service.toml.tpl index 82d8406..832d79c 100644 --- a/modules/vigil/vigil.service.toml.tpl +++ b/modules/vigil/vigil.service.toml.tpl @@ -8,6 +8,9 @@ id = "${service.id}" label = "${service.label}" mode = "poll" reveal_replica_name = true +%{ if service.http_method != null ~} +http_method = "${service.http_method}" +%{ endif ~} replicas = [ %{ for endpoint in service.endpoints ~} "${endpoint}", diff --git a/terraform.tf b/terraform.tf index 4804aa2..8b80f5d 100644 --- a/terraform.tf +++ b/terraform.tf @@ -1,4 +1,5 @@ terraform { + required_version = "~> 1.6" required_providers { docker = { source = "kreuzwerker/docker" diff --git a/vigil.tf b/vigil.tf index fd73c24..cb83839 100644 --- a/vigil.tf +++ b/vigil.tf @@ -17,7 +17,7 @@ module "vigil" { id = "longhorn" label = "Longhorn (longhorn.ti)" endpoints = [ - "icmp://longhorn.ti", + #"icmp://longhorn.ti", # ??? why? "tcp://longhorn.ti:22", #"https://longhorn.ti:8006", # cannot be used as the SSL cert is self-signed/invalid ] @@ -82,6 +82,7 @@ module "vigil" { endpoints = [ "https://code.techinc.nl/api/v1/version" ] + http_method = "GET" }, { id = "s3" label = "S3 (s3.california.ti)"