Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
janartodesk committed Nov 28, 2024
1 parent 5d4c008 commit 34ebe2f
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/resources/host.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,33 @@ resource "definednet_host" "example" {
role_id = "role-WSG78880Z655TQJVQFL5CZ405B"
tags = ["service:app"]
}
resource "definednet_host" "metrics_minimal" {
name = "example.defined.test"
network_id = "network-7P81MCS2TVAY9XJWQTNJ3PWYPD"
role_id = "role-WSG78880Z655TQJVQFL5CZ405B"
tags = ["service:app"]
metrics {
enabled = true
}
}
resource "definednet_host" "metrics" {
name = "example.defined.test"
network_id = "network-7P81MCS2TVAY9XJWQTNJ3PWYPD"
role_id = "role-WSG78880Z655TQJVQFL5CZ405B"
tags = ["service:app"]
metrics {
enabled = true
listen = "127.0.0.1:9100"
path = "/-/metrics"
namespace = "infra"
subsystem = "nebula"
enable_extra_metrics = true
}
}
```

<!-- schema generated by tfplugindocs -->
Expand All @@ -51,6 +78,7 @@ resource "definednet_host" "example" {

### Optional

- `metrics` (Block, Optional) Host's metrics exporter configuration (see [below for nested schema](#nestedblock--metrics))
- `role_id` (String) Host's role ID on Defined.net
- `tags` (List of String) Host's tags on Defined.net

Expand All @@ -59,3 +87,15 @@ resource "definednet_host" "example" {
- `enrollment_code` (String, Sensitive) Host's enrollment code
- `id` (String) Host's ID
- `ip_address` (String) Host's IP address on Defined.net overlay network

<a id="nestedblock--metrics"></a>
### Nested Schema for `metrics`

Optional:

- `enable_extra_metrics` (Boolean) Enable extra metrics
- `enabled` (Boolean) Enable metrics exporter
- `listen` (String) Host-port for Prometheus metrics exporter listener
- `namespace` (String) Prometheus metrics' namespace
- `path` (String) Prometheus metrics exporter's HTTP path
- `subsystem` (String) Prometheus metrics' subsystem
27 changes: 27 additions & 0 deletions examples/resources/definednet_host/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,30 @@ resource "definednet_host" "example" {
role_id = "role-WSG78880Z655TQJVQFL5CZ405B"
tags = ["service:app"]
}

resource "definednet_host" "metrics_minimal" {
name = "example.defined.test"
network_id = "network-7P81MCS2TVAY9XJWQTNJ3PWYPD"
role_id = "role-WSG78880Z655TQJVQFL5CZ405B"
tags = ["service:app"]

metrics {
enabled = true
}
}

resource "definednet_host" "metrics" {
name = "example.defined.test"
network_id = "network-7P81MCS2TVAY9XJWQTNJ3PWYPD"
role_id = "role-WSG78880Z655TQJVQFL5CZ405B"
tags = ["service:app"]

metrics {
enabled = true
listen = "127.0.0.1:9100"
path = "/-/metrics"
namespace = "infra"
subsystem = "nebula"
enable_extra_metrics = true
}
}

0 comments on commit 34ebe2f

Please sign in to comment.