diff --git a/dogfood/contents/main.tf b/dogfood/contents/main.tf index ecd0925c490e4..6e60c58cf1293 100644 --- a/dogfood/contents/main.tf +++ b/dogfood/contents/main.tf @@ -1,7 +1,8 @@ terraform { required_providers { coder = { - source = "coder/coder" + source = "coder/coder" + version = "2.2.0-pre0" } docker = { source = "kreuzwerker/docker" @@ -84,6 +85,30 @@ data "coder_parameter" "region" { } } +data "coder_parameter" "res_mon_memory_threshold" { + type = "number" + name = "Memory usage threshold" + default = 80 + description = "The memory usage threshold used in resources monitoring to trigger notifications." + mutable = true +} + +data "coder_parameter" "res_mon_volume_threshold" { + type = "number" + name = "Volume usage threshold" + default = 80 + description = "The volume usage threshold used in resources monitoring to trigger notifications." + mutable = true +} + +data "coder_parameter" "res_mon_volume_path" { + type = "string" + name = "Volume path" + default = "/home/coder" + description = "The path monitored in resources monitoring to trigger notifications." + mutable = true +} + provider "docker" { host = lookup(local.docker_host, data.coder_parameter.region.value) } @@ -290,6 +315,18 @@ resource "coder_agent" "dev" { timeout = 5 } + resources_monitoring { + memory { + enabled = true + threshold = data.coder_parameter.res_mon_memory_threshold.value + } + volume { + enabled = true + threshold = data.coder_parameter.res_mon_volume_threshold.value + path = data.coder_parameter.res_mon_volume_path.value + } + } + startup_script = <<-EOT #!/usr/bin/env bash set -eux -o pipefail pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy