mirror of
https://github.com/coder/coder.git
synced 2026-10-13 07:38:23 +08:00
- Updates `terraform` to [v1.10.5](https://github.com/hashicorp/terraform/blob/v1.10.5/CHANGELOG.md#1105-january-22-2025) - Updates provider to >=2.0.0 in provider testdata fixtures - Fixes provider to required release version for resource monitors - Fixes missing leading / in volumes in resource monitor tests --------- Co-authored-by: Cian Johnston <cian@coder.com>
47 lines
893 B
Terraform
47 lines
893 B
Terraform
terraform {
|
|
required_providers {
|
|
coder = {
|
|
source = "coder/coder"
|
|
version = ">=2.0.0"
|
|
}
|
|
}
|
|
}
|
|
|
|
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
|
|
]
|
|
}
|