|
7 | 7 |
|
8 | 8 | "github.com/hashicorp/terraform-plugin-framework/datasource" |
9 | 9 | "github.com/hashicorp/terraform-plugin-framework/schema/validator" |
| 10 | + "github.com/hashicorp/terraform-plugin-framework/types" |
10 | 11 | "github.com/hashicorp/terraform-plugin-log/tflog" |
11 | 12 | "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core" |
12 | 13 | "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate" |
@@ -86,6 +87,23 @@ func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques |
86 | 87 | "plan_id": "The selected plan ID.", |
87 | 88 | } |
88 | 89 |
|
| 90 | + parametersDescriptions := map[string]string{ |
| 91 | + "sgw_acl": "Comma separated list of IP networks in CIDR notation which are allowed to access this instance.", |
| 92 | + "enable_monitoring": "Enable monitoring.", |
| 93 | + "graphite": "If set, monitoring with Graphite will be enabled. Expects the host and port where the Graphite metrics should be sent to (host:port).", |
| 94 | + "max_disk_threshold": "The maximum disk threshold in MB. If the disk usage exceeds this threshold, the instance will be stopped.", |
| 95 | + "metrics_frequency": "The frequency in seconds at which metrics are emitted (in seconds).", |
| 96 | + "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 ID of the STACKIT monitoring instance.", |
| 98 | + "java_garbage_collector": "The garbage collector to use for OpenSearch.", |
| 99 | + "java_heapspace": "The amount of memory (in MB) allocated as heap by the JVM for OpenSearch.", |
| 100 | + "java_maxmetaspace": "The amount of memory (in MB) used by the JVM to store metadata for OpenSearch.", |
| 101 | + "plugins": "List of plugins to install. Must be a supported plugin name. The plugins `repository-s3` and `repository-azure` are enabled by default and cannot be disabled.", |
| 102 | + "syslog": "List of syslog servers to send logs to.", |
| 103 | + "tls_ciphers": "List of TLS ciphers to use.", |
| 104 | + "tls_protocols": "The TLS protocol to use.", |
| 105 | + } |
| 106 | + |
89 | 107 | resp.Schema = schema.Schema{ |
90 | 108 | Description: descriptions["main"], |
91 | 109 | Attributes: map[string]schema.Attribute{ |
@@ -128,7 +146,63 @@ func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques |
128 | 146 | "parameters": schema.SingleNestedAttribute{ |
129 | 147 | Attributes: map[string]schema.Attribute{ |
130 | 148 | "sgw_acl": schema.StringAttribute{ |
131 | | - Computed: true, |
| 149 | + Description: parametersDescriptions["sgw_acl"], |
| 150 | + Computed: true, |
| 151 | + }, |
| 152 | + "enable_monitoring": schema.BoolAttribute{ |
| 153 | + Description: parametersDescriptions["enable_monitoring"], |
| 154 | + Computed: true, |
| 155 | + }, |
| 156 | + "graphite": schema.StringAttribute{ |
| 157 | + Description: parametersDescriptions["graphite"], |
| 158 | + Computed: true, |
| 159 | + }, |
| 160 | + "java_garbage_collector": schema.StringAttribute{ |
| 161 | + Description: parametersDescriptions["java_garbage_collector"], |
| 162 | + Computed: true, |
| 163 | + }, |
| 164 | + "java_heapspace": schema.Int64Attribute{ |
| 165 | + Description: parametersDescriptions["java_heapspace"], |
| 166 | + Computed: true, |
| 167 | + }, |
| 168 | + "java_maxmetaspace": schema.Int64Attribute{ |
| 169 | + Description: parametersDescriptions["java_maxmetaspace"], |
| 170 | + Computed: true, |
| 171 | + }, |
| 172 | + "max_disk_threshold": schema.Int64Attribute{ |
| 173 | + Description: parametersDescriptions["max_disk_threshold"], |
| 174 | + Computed: true, |
| 175 | + }, |
| 176 | + "metrics_frequency": schema.Int64Attribute{ |
| 177 | + Description: parametersDescriptions["metrics_frequency"], |
| 178 | + Computed: true, |
| 179 | + }, |
| 180 | + "metrics_prefix": schema.StringAttribute{ |
| 181 | + Description: parametersDescriptions["metrics_prefix"], |
| 182 | + Computed: true, |
| 183 | + }, |
| 184 | + "monitoring_instance_id": schema.StringAttribute{ |
| 185 | + Description: parametersDescriptions["monitoring_instance_id"], |
| 186 | + Computed: true, |
| 187 | + }, |
| 188 | + "plugins": schema.ListAttribute{ |
| 189 | + ElementType: types.StringType, |
| 190 | + Description: parametersDescriptions["plugins"], |
| 191 | + Computed: true, |
| 192 | + }, |
| 193 | + "syslog": schema.ListAttribute{ |
| 194 | + ElementType: types.StringType, |
| 195 | + Description: parametersDescriptions["syslog"], |
| 196 | + Computed: true, |
| 197 | + }, |
| 198 | + "tls_ciphers": schema.ListAttribute{ |
| 199 | + ElementType: types.StringType, |
| 200 | + Description: parametersDescriptions["tls_ciphers"], |
| 201 | + Computed: true, |
| 202 | + }, |
| 203 | + "tls_protocols": schema.StringAttribute{ |
| 204 | + Description: parametersDescriptions["tls_protocols"], |
| 205 | + Computed: true, |
132 | 206 | }, |
133 | 207 | }, |
134 | 208 | Computed: true, |
|
0 commit comments