Skip to content

Commit b54c671

Browse files
authored
Extend MariaDB instance parameters (#441)
* Extend MariaDB instance parameters * Fix linter * Improve monitoring_instance_id field documentation * Add documentation for graphite field * Add Argus instance as example to monitoring_instance_id description * Specify that a STACKIT monitoring instance is expected
1 parent a08dbd8 commit b54c671

18 files changed

Lines changed: 377 additions & 117 deletions

File tree

docs/data-sources/logme_instance.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ data "stackit_logme_instance" "example" {
2020
```
2121

2222
<!-- schema generated by tfplugindocs -->
23+
2324
## Schema
2425

2526
### Required
@@ -42,6 +43,7 @@ data "stackit_logme_instance" "example" {
4243
- `version` (String) The service version.
4344

4445
<a id="nestedatt--parameters"></a>
46+
4547
### Nested Schema for `parameters`
4648

4749
Read-Only:
@@ -63,7 +65,7 @@ Read-Only:
6365
- `max_disk_threshold` (Number) The maximum disk threshold in MB. If the disk usage exceeds this threshold, the instance will be stopped.
6466
- `metrics_frequency` (Number) The frequency in seconds at which metrics are emitted (in seconds).
6567
- `metrics_prefix` (String) The prefix for the metrics. Could be useful when using Graphite monitoring to prefix the metrics with a certain value, like an API key.
66-
- `monitoring_instance_id` (String) The monitoring instance ID.
68+
- `monitoring_instance_id` (String) The ID of the STACKIT monitoring instance.
6769
- `opensearch_tls_ciphers` (List of String)
6870
- `opensearch_tls_protocols` (List of String)
6971
- `sgw_acl` (String) Comma separated list of IP networks in CIDR notation which are allowed to access this instance.

docs/data-sources/mariadb_instance.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ data "stackit_mariadb_instance" "example" {
2020
```
2121

2222
<!-- schema generated by tfplugindocs -->
23+
2324
## Schema
2425

2526
### Required
@@ -42,8 +43,16 @@ data "stackit_mariadb_instance" "example" {
4243
- `version` (String) The service version.
4344

4445
<a id="nestedatt--parameters"></a>
46+
4547
### Nested Schema for `parameters`
4648

4749
Read-Only:
4850

49-
- `sgw_acl` (String)
51+
- `enable_monitoring` (Boolean) Enable monitoring.
52+
- `graphite` (String)
53+
- `max_disk_threshold` (Number) The maximum disk threshold in MB. If the disk usage exceeds this threshold, the instance will be stopped.
54+
- `metrics_frequency` (Number) The frequency in seconds at which metrics are emitted.
55+
- `metrics_prefix` (String) The prefix for the metrics. Could be useful when using Graphite monitoring to prefix the metrics with a certain value, like an API key
56+
- `monitoring_instance_id` (String) The ID of the STACKIT monitoring instance.
57+
- `sgw_acl` (String) Comma separated list of IP networks in CIDR notation which are allowed to access this instance.
58+
- `syslog` (List of String) List of syslog servers to send logs to.

docs/data-sources/rabbitmq_instance.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ data "stackit_rabbitmq_instance" "example" {
2020
```
2121

2222
<!-- schema generated by tfplugindocs -->
23+
2324
## Schema
2425

2526
### Required
@@ -42,6 +43,7 @@ data "stackit_rabbitmq_instance" "example" {
4243
- `version` (String) The service version.
4344

4445
<a id="nestedatt--parameters"></a>
46+
4547
### Nested Schema for `parameters`
4648

4749
Read-Only:
@@ -52,7 +54,7 @@ Read-Only:
5254
- `max_disk_threshold` (Number) The maximum disk threshold in MB. If the disk usage exceeds this threshold, the instance will be stopped.
5355
- `metrics_frequency` (Number) The frequency in seconds at which metrics are emitted.
5456
- `metrics_prefix` (String) The prefix for the metrics. Could be useful when using Graphite monitoring to prefix the metrics with a certain value, like an API key
55-
- `monitoring_instance_id` (String) The monitoring instance ID.
57+
- `monitoring_instance_id` (String) The ID of the STACKIT monitoring instance.
5658
- `plugins` (List of String) List of plugins to install. Must be a supported plugin name.
5759
- `roles` (List of String) List of roles to assign to the instance.
5860
- `sgw_acl` (String) Comma separated list of IP networks in CIDR notation which are allowed to access this instance.

docs/data-sources/redis_instance.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ data "stackit_redis_instance" "example" {
2020
```
2121

2222
<!-- schema generated by tfplugindocs -->
23+
2324
## Schema
2425

2526
### Required
@@ -42,6 +43,7 @@ data "stackit_redis_instance" "example" {
4243
- `version` (String) The service version.
4344

4445
<a id="nestedatt--parameters"></a>
46+
4547
### Nested Schema for `parameters`
4648

4749
Read-Only:
@@ -60,7 +62,7 @@ Read-Only:
6062
- `metrics_frequency` (Number) The frequency in seconds at which metrics are emitted.
6163
- `metrics_prefix` (String) The prefix for the metrics. Could be useful when using Graphite monitoring to prefix the metrics with a certain value, like an API key
6264
- `min_replicas_max_lag` (Number) The minimum replicas maximum lag.
63-
- `monitoring_instance_id` (String) The monitoring instance ID.
65+
- `monitoring_instance_id` (String) The ID of the STACKIT monitoring instance.
6466
- `notify_keyspace_events` (String) The notify keyspace events.
6567
- `sgw_acl` (String) Comma separated list of IP networks in CIDR notation which are allowed to access this instance.
6668
- `snapshot` (String) The snapshot configuration.

docs/resources/logme_instance.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ resource "stackit_logme_instance" "example" {
2525
```
2626

2727
<!-- schema generated by tfplugindocs -->
28+
2829
## Schema
2930

3031
### Required
@@ -50,6 +51,7 @@ resource "stackit_logme_instance" "example" {
5051
- `plan_id` (String) The selected plan ID.
5152

5253
<a id="nestedatt--parameters"></a>
54+
5355
### Nested Schema for `parameters`
5456

5557
Optional:
@@ -71,7 +73,7 @@ Optional:
7173
- `max_disk_threshold` (Number) The maximum disk threshold in MB. If the disk usage exceeds this threshold, the instance will be stopped.
7274
- `metrics_frequency` (Number) The frequency in seconds at which metrics are emitted (in seconds).
7375
- `metrics_prefix` (String) The prefix for the metrics. Could be useful when using Graphite monitoring to prefix the metrics with a certain value, like an API key.
74-
- `monitoring_instance_id` (String) The monitoring instance ID.
76+
- `monitoring_instance_id` (String) The ID of the STACKIT monitoring instance.
7577
- `opensearch_tls_ciphers` (List of String)
7678
- `opensearch_tls_protocols` (List of String)
7779
- `sgw_acl` (String) Comma separated list of IP networks in CIDR notation which are allowed to access this instance.

docs/resources/mariadb_instance.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ resource "stackit_mariadb_instance" "example" {
2525
```
2626

2727
<!-- schema generated by tfplugindocs -->
28+
2829
## Schema
2930

3031
### Required
@@ -50,8 +51,16 @@ resource "stackit_mariadb_instance" "example" {
5051
- `plan_id` (String) The selected plan ID.
5152

5253
<a id="nestedatt--parameters"></a>
54+
5355
### Nested Schema for `parameters`
5456

5557
Optional:
5658

57-
- `sgw_acl` (String)
59+
- `enable_monitoring` (Boolean) Enable monitoring.
60+
- `graphite` (String) Graphite server URL (host and port). If set, monitoring with Graphite will be enabled.
61+
- `max_disk_threshold` (Number) The maximum disk threshold in MB. If the disk usage exceeds this threshold, the instance will be stopped.
62+
- `metrics_frequency` (Number) The frequency in seconds at which metrics are emitted.
63+
- `metrics_prefix` (String) The prefix for the metrics. Could be useful when using Graphite monitoring to prefix the metrics with a certain value, like an API key
64+
- `monitoring_instance_id` (String) The ID of the STACKIT monitoring instance.
65+
- `sgw_acl` (String) Comma separated list of IP networks in CIDR notation which are allowed to access this instance.
66+
- `syslog` (List of String) List of syslog servers to send logs to.

docs/resources/rabbitmq_instance.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ resource "stackit_rabbitmq_instance" "example" {
2828
```
2929

3030
<!-- schema generated by tfplugindocs -->
31+
3132
## Schema
3233

3334
### Required
@@ -53,6 +54,7 @@ resource "stackit_rabbitmq_instance" "example" {
5354
- `plan_id` (String) The selected plan ID.
5455

5556
<a id="nestedatt--parameters"></a>
57+
5658
### Nested Schema for `parameters`
5759

5860
Optional:
@@ -63,7 +65,7 @@ Optional:
6365
- `max_disk_threshold` (Number) The maximum disk threshold in MB. If the disk usage exceeds this threshold, the instance will be stopped.
6466
- `metrics_frequency` (Number) The frequency in seconds at which metrics are emitted.
6567
- `metrics_prefix` (String) The prefix for the metrics. Could be useful when using Graphite monitoring to prefix the metrics with a certain value, like an API key
66-
- `monitoring_instance_id` (String) The monitoring instance ID.
68+
- `monitoring_instance_id` (String) The ID of the STACKIT monitoring instance.
6769
- `plugins` (List of String) List of plugins to install. Must be a supported plugin name.
6870
- `roles` (List of String) List of roles to assign to the instance.
6971
- `sgw_acl` (String) Comma separated list of IP networks in CIDR notation which are allowed to access this instance.

docs/resources/redis_instance.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ resource "stackit_redis_instance" "example" {
2828
```
2929

3030
<!-- schema generated by tfplugindocs -->
31+
3132
## Schema
3233

3334
### Required
@@ -53,6 +54,7 @@ resource "stackit_redis_instance" "example" {
5354
- `plan_id` (String) The selected plan ID.
5455

5556
<a id="nestedatt--parameters"></a>
57+
5658
### Nested Schema for `parameters`
5759

5860
Optional:
@@ -71,7 +73,7 @@ Optional:
7173
- `metrics_frequency` (Number) The frequency in seconds at which metrics are emitted.
7274
- `metrics_prefix` (String) The prefix for the metrics. Could be useful when using Graphite monitoring to prefix the metrics with a certain value, like an API key
7375
- `min_replicas_max_lag` (Number) The minimum replicas maximum lag.
74-
- `monitoring_instance_id` (String) The monitoring instance ID.
76+
- `monitoring_instance_id` (String) The ID of the STACKIT monitoring instance.
7577
- `notify_keyspace_events` (String) The notify keyspace events.
7678
- `sgw_acl` (String) Comma separated list of IP networks in CIDR notation which are allowed to access this instance.
7779
- `snapshot` (String) The snapshot configuration.

stackit/internal/services/logme/instance/datasource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
9494
"max_disk_threshold": "The maximum disk threshold in MB. If the disk usage exceeds this threshold, the instance will be stopped.",
9595
"metrics_frequency": "The frequency in seconds at which metrics are emitted (in seconds).",
9696
"metrics_prefix": "The prefix for the metrics. Could be useful when using Graphite monitoring to prefix the metrics with a certain value, like an API key.",
97-
"monitoring_instance_id": "The monitoring instance ID.",
97+
"monitoring_instance_id": "The ID of the STACKIT monitoring instance.",
9898
"java_heapspace": "The amount of memory (in MB) allocated as heap by the JVM for OpenSearch.",
9999
"java_maxmetaspace": "The amount of memory (in MB) used by the JVM to store metadata for OpenSearch.",
100100
"ism_deletion_after": "Combination of an integer and a timerange when an index will be considered \"old\" and can be deleted. Possible values for the timerange are `s`, `m`, `h` and `d`.",

stackit/internal/services/logme/instance/resource.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, r
177177
"max_disk_threshold": "The maximum disk threshold in MB. If the disk usage exceeds this threshold, the instance will be stopped.",
178178
"metrics_frequency": "The frequency in seconds at which metrics are emitted (in seconds).",
179179
"metrics_prefix": "The prefix for the metrics. Could be useful when using Graphite monitoring to prefix the metrics with a certain value, like an API key.",
180-
"monitoring_instance_id": "The monitoring instance ID.",
180+
"monitoring_instance_id": "The ID of the STACKIT monitoring instance.",
181181
"java_heapspace": "The amount of memory (in MB) allocated as heap by the JVM for OpenSearch.",
182182
"java_maxmetaspace": "The amount of memory (in MB) used by the JVM to store metadata for OpenSearch.",
183183
"ism_deletion_after": "Combination of an integer and a timerange when an index will be considered \"old\" and can be deleted. Possible values for the timerange are `s`, `m`, `h` and `d`.",
@@ -339,6 +339,10 @@ func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, r
339339
Description: parametersDescriptions["monitoring_instance_id"],
340340
Optional: true,
341341
Computed: true,
342+
Validators: []validator.String{
343+
validate.UUID(),
344+
validate.NoSeparator(),
345+
},
342346
},
343347
"opensearch_tls_ciphers": schema.ListAttribute{
344348
Description: parametersDescriptions["opensearch_tls_ciphers"],

0 commit comments

Comments
 (0)