Docs/Lighthouse Terraform modules
Deployment modules
Three companion modules at
github.com/statusharbor/terraform-lighthouse.
Each takes the token from a statusharbor_lighthouse resource
and deploys the agent.
Pin the source via ?ref=vX.Y.Z. The dashboard install / upgrade
modal shows the current latest version.
modules/helm — Kubernetes
Wraps helm_release against the official OCI chart at
oci://ghcr.io/statusharbor/charts/lighthouse.
module "lighthouse" {
source = "github.com/statusharbor/terraform-lighthouse//modules/helm?ref=v0.1.0"
token = statusharbor_lighthouse.prod.token
namespace = "status-harbor"
discovery_enabled = true
discovery_namespaces = ["*"]
}| Input | Default | Notes |
|---|---|---|
token | — | Required. From statusharbor_lighthouse.<name>.token. |
release_name | lighthouse | |
namespace | status-harbor | |
create_namespace | true | |
chart_version | latest | Pin for deterministic installs. |
image_tag | chart's appVersion | Override to pin a specific agent build. |
discovery_enabled | true | Enable Ingress / Service discovery. |
discovery_namespaces | ["*"] | Watched namespaces. * = all. |
extra_values | {} | Map of dotted-path Helm value overrides. |
atomic | true | Roll back the release on a failed install. |
wait | true | Block until pods report ready before returning. |
timeout_seconds | 300 | Helm timeout for install / upgrade. |
The Helm provider must be configured to point at the cluster you're
deploying into. The module pins to hashicorp/helm ~> 2.13.
modules/docker — single-host
Wraps docker_container for VMs / bare-metal running Docker.
module "lighthouse" {
source = "github.com/statusharbor/terraform-lighthouse//modules/docker?ref=v0.1.0"
token = statusharbor_lighthouse.prod.token
image_tag = "1.4.0"
data_dir = "/var/lib/lighthouse"
}| Input | Default | Notes |
|---|---|---|
token | — | Required. |
container_name | lighthouse | |
image_repository | ghcr.io/statusharbor/lighthouse | |
image_tag | latest | Pin in production. |
keep_image_locally | true | Keep the image after terraform destroy for faster re-apply. |
data_dir | none (ephemeral) | Bind-mount path for the event buffer. |
healthcheck_port | none | If set, enables Docker HEALTHCHECK against /healthz. |
extra_env | [] | Additional KEY=value entries. |
modules/cloud-init — VM bootstrap
Emits a shell script you can drop into a cloud VM's user_data
(AWS, GCP) or custom_data (Azure). The script downloads the
agent and starts it under systemd.
module "lighthouse" {
source = "github.com/statusharbor/terraform-lighthouse//modules/cloud-init?ref=v0.1.0"
token = statusharbor_lighthouse.prod.token
}
resource "aws_instance" "monitor" {
# ...
user_data = module.lighthouse.user_data
}| Output | Notes |
|---|---|
user_data | Sensitive. Shell script with the token baked in. |
user_data_base64 | Sensitive. Base64 form for Azure custom_data. |
The token sits in plaintext inside user_data; rely on your
provider's at-rest encryption (AWS EBS/EC2 instance metadata, etc.)
and avoid committing the rendered output to git.
Versioning
- Modules are tagged with
vX.Y.Z. - Minor versions add inputs (backward-compatible). Majors rename or remove things.
- The dashboard install / upgrade modal pulls the latest module
release from GitHub and substitutes it into the
?ref=...for you, so the snippets you copy from there always pin to a known version.