mirror of
https://github.com/coder/coder.git
synced 2026-06-06 14:38:23 +00:00
90c34b74de
* feat: Add connection_timeout and troubleshooting_url to agent This commit adds the connection timeout and troubleshooting url fields to coder agents. If an initial connection cannot be established within connection timeout seconds, then the agent status will be marked as `"timeout"`. The troubleshooting URL will be present, if configured in the Terraform template, it can be presented to the user when the agent state is either `"timeout"` or `"disconnected"`. Fixes #4678
47 lines
891 B
Terraform
47 lines
891 B
Terraform
terraform {
|
|
required_providers {
|
|
coder = {
|
|
source = "coder/coder"
|
|
version = "0.6.1"
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "coder_agent" "dev1" {
|
|
os = "linux"
|
|
arch = "amd64"
|
|
}
|
|
|
|
# app1 is for testing subdomain default.
|
|
resource "coder_app" "app1" {
|
|
agent_id = coder_agent.dev1.id
|
|
slug = "app1"
|
|
# subdomain should default to false.
|
|
# subdomain = false
|
|
}
|
|
|
|
# app2 tests that subdomaincan be true, and that healthchecks work.
|
|
resource "coder_app" "app2" {
|
|
agent_id = coder_agent.dev1.id
|
|
slug = "app2"
|
|
subdomain = true
|
|
healthcheck {
|
|
url = "http://localhost:13337/healthz"
|
|
interval = 5
|
|
threshold = 6
|
|
}
|
|
}
|
|
|
|
# app3 tests that subdomain can explicitly be false.
|
|
resource "coder_app" "app3" {
|
|
agent_id = coder_agent.dev1.id
|
|
slug = "app3"
|
|
subdomain = false
|
|
}
|
|
|
|
resource "null_resource" "dev" {
|
|
depends_on = [
|
|
coder_agent.dev1
|
|
]
|
|
}
|