diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2de7a784d..ece04a502 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -48,7 +48,7 @@ updates: - package-ecosystem: gomod directory: / schedule: - interval: weekly + interval: daily open-pull-requests-limit: 0 ignore: # These libs are updated by a Makefile command diff --git a/CHANGELOG.md b/CHANGELOG.md index c0fb7280c..58f11e8db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,19 @@ nav_order: 1 +## [MAJOR.MINOR.PATCH] - YYYY-MM-DD + +- Add `aiven_opensearch` resource field `opensearch_user_config.opensearch.search_insights_top_queries` +- Add `aiven_thanos` resource field `thanos_user_config.private_access`: Allow access to selected service ports from + private networks +- Add `aiven_thanos` resource field `thanos_user_config.privatelink_access`: Allow access to selected service components + through Privatelink +- Add `aiven_opensearch` datasource field `opensearch_user_config.opensearch.search_insights_top_queries` +- Add `aiven_thanos` datasource field `thanos_user_config.private_access`: Allow access to selected service ports from + private networks +- Add `aiven_thanos` datasource field `thanos_user_config.privatelink_access`: Allow access to selected service components + through Privatelink + ## [4.29.0] - 2024-11-14 - Add support for `autoscaler` service integration diff --git a/changelog/types.go b/changelog/types.go index abd2893bd..e27ddae8b 100644 --- a/changelog/types.go +++ b/changelog/types.go @@ -64,9 +64,10 @@ func (c *Diff) String() string { } // Adds description - const maxSize = 120 + if c.Description != "" { + msg = fmt.Sprintf("%s: %s", msg, c.Description) + } - msg += ": " - msg += shorten(maxSize-len(msg), c.Description) - return msg + const maxSize = 120 + return shorten(maxSize, msg) } diff --git a/docs/data-sources/opensearch.md b/docs/data-sources/opensearch.md index 87412a976..aa0d1b0dd 100644 --- a/docs/data-sources/opensearch.md +++ b/docs/data-sources/opensearch.md @@ -250,6 +250,7 @@ Read-Only: - `reindex_remote_whitelist` (List of String) - `script_max_compilations_rate` (String) - `search_backpressure` (List of Object) (see [below for nested schema](#nestedobjatt--opensearch_user_config--opensearch--search_backpressure)) +- `search_insights_top_queries` (List of Object) (see [below for nested schema](#nestedobjatt--opensearch_user_config--opensearch--search_insights_top_queries)) - `search_max_buckets` (Number) - `shard_indexing_pressure` (List of Object) (see [below for nested schema](#nestedobjatt--opensearch_user_config--opensearch--shard_indexing_pressure)) - `thread_pool_analyze_queue_size` (Number) @@ -353,6 +354,46 @@ Read-Only: + +### Nested Schema for `opensearch_user_config.opensearch.search_insights_top_queries` + +Read-Only: + +- `cpu` (List of Object) (see [below for nested schema](#nestedobjatt--opensearch_user_config--opensearch--search_insights_top_queries--cpu)) +- `latency` (List of Object) (see [below for nested schema](#nestedobjatt--opensearch_user_config--opensearch--search_insights_top_queries--latency)) +- `memory` (List of Object) (see [below for nested schema](#nestedobjatt--opensearch_user_config--opensearch--search_insights_top_queries--memory)) + + +### Nested Schema for `opensearch_user_config.opensearch.search_insights_top_queries.cpu` + +Read-Only: + +- `enabled` (Boolean) +- `top_n_size` (Number) +- `window_size` (String) + + + +### Nested Schema for `opensearch_user_config.opensearch.search_insights_top_queries.latency` + +Read-Only: + +- `enabled` (Boolean) +- `top_n_size` (Number) +- `window_size` (String) + + + +### Nested Schema for `opensearch_user_config.opensearch.search_insights_top_queries.memory` + +Read-Only: + +- `enabled` (Boolean) +- `top_n_size` (Number) +- `window_size` (String) + + + ### Nested Schema for `opensearch_user_config.opensearch.shard_indexing_pressure` diff --git a/docs/data-sources/thanos.md b/docs/data-sources/thanos.md index 9185da040..d7a750862 100644 --- a/docs/data-sources/thanos.md +++ b/docs/data-sources/thanos.md @@ -120,6 +120,8 @@ Read-Only: - `ip_filter_object` (Set of Object) (see [below for nested schema](#nestedobjatt--thanos_user_config--ip_filter_object)) - `ip_filter_string` (Set of String) - `object_storage_usage_alert_threshold_gb` (Number) +- `private_access` (List of Object) (see [below for nested schema](#nestedobjatt--thanos_user_config--private_access)) +- `privatelink_access` (List of Object) (see [below for nested schema](#nestedobjatt--thanos_user_config--privatelink_access)) - `public_access` (List of Object) (see [below for nested schema](#nestedobjatt--thanos_user_config--public_access)) - `query` (List of Object) (see [below for nested schema](#nestedobjatt--thanos_user_config--query)) - `query_frontend` (List of Object) (see [below for nested schema](#nestedobjatt--thanos_user_config--query_frontend)) @@ -147,6 +149,24 @@ Read-Only: - `network` (String) + +### Nested Schema for `thanos_user_config.private_access` + +Read-Only: + +- `query_frontend` (Boolean) +- `receiver_routing` (Boolean) + + + +### Nested Schema for `thanos_user_config.privatelink_access` + +Read-Only: + +- `query_frontend` (Boolean) +- `receiver_routing` (Boolean) + + ### Nested Schema for `thanos_user_config.public_access` diff --git a/docs/resources/kafka.md b/docs/resources/kafka.md index 9f6ed5196..da81254d4 100644 --- a/docs/resources/kafka.md +++ b/docs/resources/kafka.md @@ -247,8 +247,8 @@ Required: Optional: -- `aws` (Block List, Max: 1) AWS config for Secret Provider (see [below for nested schema](#nestedblock--kafka_user_config--kafka_connect_secret_providers--aws)) -- `vault` (Block List, Max: 1) Vault Config for Secret Provider (see [below for nested schema](#nestedblock--kafka_user_config--kafka_connect_secret_providers--vault)) +- `aws` (Block List, Max: 1) AWS secret provider configuration (see [below for nested schema](#nestedblock--kafka_user_config--kafka_connect_secret_providers--aws)) +- `vault` (Block List, Max: 1) Vault secret provider configuration (see [below for nested schema](#nestedblock--kafka_user_config--kafka_connect_secret_providers--vault)) ### Nested Schema for `kafka_user_config.kafka_connect_secret_providers.aws` diff --git a/docs/resources/kafka_connect.md b/docs/resources/kafka_connect.md index e3a3563d3..116d20c61 100644 --- a/docs/resources/kafka_connect.md +++ b/docs/resources/kafka_connect.md @@ -197,8 +197,8 @@ Required: Optional: -- `aws` (Block List, Max: 1) AWS config for Secret Provider (see [below for nested schema](#nestedblock--kafka_connect_user_config--secret_providers--aws)) -- `vault` (Block List, Max: 1) Vault Config for Secret Provider (see [below for nested schema](#nestedblock--kafka_connect_user_config--secret_providers--vault)) +- `aws` (Block List, Max: 1) AWS secret provider configuration (see [below for nested schema](#nestedblock--kafka_connect_user_config--secret_providers--aws)) +- `vault` (Block List, Max: 1) Vault secret provider configuration (see [below for nested schema](#nestedblock--kafka_connect_user_config--secret_providers--vault)) ### Nested Schema for `kafka_connect_user_config.secret_providers.aws` diff --git a/docs/resources/opensearch.md b/docs/resources/opensearch.md index 5736a4d1f..2d6173b4c 100644 --- a/docs/resources/opensearch.md +++ b/docs/resources/opensearch.md @@ -132,7 +132,7 @@ Optional: Required: -- `account` (String) Azure account name. +- `account` (String) Account name. - `base_path` (String) The path to the repository data within its container. The value of this setting should not start or end with a /. - `container` (String) Azure container name. - `indices` (String) A comma-delimited list of indices to restore from the snapshot. Multi-index syntax is supported. Example: `metrics*,logs*,data-20240823`. @@ -275,6 +275,7 @@ Optional: - `reindex_remote_whitelist` (List of String) Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. - `script_max_compilations_rate` (String) Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context. Example: `75/5m`. - `search_backpressure` (Block List, Max: 1) Search Backpressure Settings (see [below for nested schema](#nestedblock--opensearch_user_config--opensearch--search_backpressure)) +- `search_insights_top_queries` (Block List, Max: 1) (see [below for nested schema](#nestedblock--opensearch_user_config--opensearch--search_insights_top_queries)) - `search_max_buckets` (Number) Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined. Example: `10000`. - `shard_indexing_pressure` (Block List, Max: 1) Shard indexing back pressure settings (see [below for nested schema](#nestedblock--opensearch_user_config--opensearch--shard_indexing_pressure)) - `thread_pool_analyze_queue_size` (Number) Size for the thread pool queue. See documentation for exact details. @@ -378,6 +379,46 @@ Optional: + +### Nested Schema for `opensearch_user_config.opensearch.search_insights_top_queries` + +Optional: + +- `cpu` (Block List, Max: 1) Top N queries monitoring by CPU (see [below for nested schema](#nestedblock--opensearch_user_config--opensearch--search_insights_top_queries--cpu)) +- `latency` (Block List, Max: 1) Top N queries monitoring by latency (see [below for nested schema](#nestedblock--opensearch_user_config--opensearch--search_insights_top_queries--latency)) +- `memory` (Block List, Max: 1) Top N queries monitoring by memory (see [below for nested schema](#nestedblock--opensearch_user_config--opensearch--search_insights_top_queries--memory)) + + +### Nested Schema for `opensearch_user_config.opensearch.search_insights_top_queries.cpu` + +Optional: + +- `enabled` (Boolean) Enable or disable top N query monitoring by the metric. Default: `false`. +- `top_n_size` (Number) Specify the value of N for the top N queries by the metric. +- `window_size` (String) The window size of the top N queries by the metric. + + + +### Nested Schema for `opensearch_user_config.opensearch.search_insights_top_queries.latency` + +Optional: + +- `enabled` (Boolean) Enable or disable top N query monitoring by the metric. Default: `false`. +- `top_n_size` (Number) Specify the value of N for the top N queries by the metric. +- `window_size` (String) The window size of the top N queries by the metric. + + + +### Nested Schema for `opensearch_user_config.opensearch.search_insights_top_queries.memory` + +Optional: + +- `enabled` (Boolean) Enable or disable top N query monitoring by the metric. Default: `false`. +- `top_n_size` (Number) Specify the value of N for the top N queries by the metric. +- `window_size` (String) The window size of the top N queries by the metric. + + + ### Nested Schema for `opensearch_user_config.opensearch.shard_indexing_pressure` diff --git a/docs/resources/thanos.md b/docs/resources/thanos.md index c4f84594a..ef662958f 100644 --- a/docs/resources/thanos.md +++ b/docs/resources/thanos.md @@ -115,21 +115,23 @@ Read-Only: Optional: -- `compactor` (Block List, Max: 1) ThanosCompactor (see [below for nested schema](#nestedblock--thanos_user_config--compactor)) +- `compactor` (Block List, Max: 1) Configuration options for Thanos Compactor (see [below for nested schema](#nestedblock--thanos_user_config--compactor)) - `env` (Map of String, Deprecated) Environmental variables. - `ip_filter` (Set of String, Deprecated) Allow incoming connections from CIDR address block, e.g. `10.20.0.0/16`. - `ip_filter_object` (Block Set, Max: 1024) Allow incoming connections from CIDR address block, e.g. `10.20.0.0/16` (see [below for nested schema](#nestedblock--thanos_user_config--ip_filter_object)) - `ip_filter_string` (Set of String) Allow incoming connections from CIDR address block, e.g. `10.20.0.0/16`. - `object_storage_usage_alert_threshold_gb` (Number) After exceeding the limit a service alert is going to be raised (0 means not set). +- `private_access` (Block List, Max: 1) Allow access to selected service ports from private networks (see [below for nested schema](#nestedblock--thanos_user_config--private_access)) +- `privatelink_access` (Block List, Max: 1) Allow access to selected service components through Privatelink (see [below for nested schema](#nestedblock--thanos_user_config--privatelink_access)) - `public_access` (Block List, Max: 1) Allow access to selected service ports from the public Internet (see [below for nested schema](#nestedblock--thanos_user_config--public_access)) -- `query` (Block List, Max: 1) ThanosQuery (see [below for nested schema](#nestedblock--thanos_user_config--query)) -- `query_frontend` (Block List, Max: 1) ThanosQueryFrontend (see [below for nested schema](#nestedblock--thanos_user_config--query_frontend)) -- `receiver_ingesting` (Map of String) CommonReceive. -- `receiver_routing` (Map of String) ThanosReceiveRouting. -- `ruler` (Map of String) ThanosRuler. +- `query` (Block List, Max: 1) Configuration options for Thanos Query (see [below for nested schema](#nestedblock--thanos_user_config--query)) +- `query_frontend` (Block List, Max: 1) Configuration options for Thanos Query Frontend (see [below for nested schema](#nestedblock--thanos_user_config--query_frontend)) +- `receiver_ingesting` (Map of String) Common configuration options for Thanos Receive. +- `receiver_routing` (Map of String) Configuration options for Thanos Receive Routing. +- `ruler` (Map of String) Configuration options for Thanos Ruler. - `service_log` (Boolean) Store logs for the service so that they are available in the HTTP API and console. - `static_ips` (Boolean) Use static public IP addresses. -- `store` (Map of String) ThanosStore. +- `store` (Map of String) Configuration options for Thanos Store. ### Nested Schema for `thanos_user_config.compactor` @@ -151,6 +153,24 @@ Optional: - `description` (String) Description for IP filter list entry. Example: `Production service IP range`. + +### Nested Schema for `thanos_user_config.private_access` + +Optional: + +- `query_frontend` (Boolean) Allow clients to connect to query_frontend with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations. +- `receiver_routing` (Boolean) Allow clients to connect to receiver_routing with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations. + + + +### Nested Schema for `thanos_user_config.privatelink_access` + +Optional: + +- `query_frontend` (Boolean) Enable query_frontend. +- `receiver_routing` (Boolean) Enable receiver_routing. + + ### Nested Schema for `thanos_user_config.public_access` diff --git a/go.mod b/go.mod index 0b8fba895..82160ac4c 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.23 require ( github.com/aiven/aiven-go-client/v2 v2.31.0 - github.com/aiven/go-client-codegen v0.52.0 + github.com/aiven/go-client-codegen v0.55.0 github.com/avast/retry-go v3.0.0+incompatible github.com/dave/jennifer v1.7.1 github.com/docker/go-units v0.5.0 @@ -60,7 +60,7 @@ require ( cloud.google.com/go v0.112.0 // indirect cloud.google.com/go/storage v1.36.0 // indirect github.com/agext/levenshtein v1.2.3 // indirect - github.com/aiven/go-api-schemas v1.100.0 + github.com/aiven/go-api-schemas v1.103.0 github.com/aws/aws-sdk-go v1.44.122 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index acf90b454..2995f3c58 100644 --- a/go.sum +++ b/go.sum @@ -197,10 +197,10 @@ github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7l github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/aiven/aiven-go-client/v2 v2.31.0 h1:ThPtEQiKDxtq5GDfPW8bAmrT2d6oHRP492CQ7gXwuTI= github.com/aiven/aiven-go-client/v2 v2.31.0/go.mod h1:AXfB5OeioOln+hYh1XAJaYyi+f+TV6xInc7VZ9DwnY4= -github.com/aiven/go-api-schemas v1.100.0 h1:jDkhyM17CG5WA0tVnGUwy3Ux6BzS4QV2ntrPOXKtCz8= -github.com/aiven/go-api-schemas v1.100.0/go.mod h1:gtyL4LloZ2lRqcyEZTCSizi1eKm6tdzQdUdlIHlvdlY= -github.com/aiven/go-client-codegen v0.52.0 h1:43fryFs7Komt6qgo+iiDttS+yIdEUh1O69gfZoNUzMc= -github.com/aiven/go-client-codegen v0.52.0/go.mod h1:FfbH32Xb+Hx5zeKTIug1Y8SfMeB+AKNRzxgrzkts2oA= +github.com/aiven/go-api-schemas v1.103.0 h1:jz1/Nu/l26gQF46PhL12tNAQLd79wrpagSrbqVJgVZU= +github.com/aiven/go-api-schemas v1.103.0/go.mod h1:gtyL4LloZ2lRqcyEZTCSizi1eKm6tdzQdUdlIHlvdlY= +github.com/aiven/go-client-codegen v0.55.0 h1:XaIPUfb6/S7RNUljbFp7ZsCLZ0pKMvsgQ1fSHZbp6eI= +github.com/aiven/go-client-codegen v0.55.0/go.mod h1:FfbH32Xb+Hx5zeKTIug1Y8SfMeB+AKNRzxgrzkts2oA= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= diff --git a/internal/sdkprovider/userconfig/service/kafka.go b/internal/sdkprovider/userconfig/service/kafka.go index e3311ebbe..b130b91d3 100644 --- a/internal/sdkprovider/userconfig/service/kafka.go +++ b/internal/sdkprovider/userconfig/service/kafka.go @@ -445,7 +445,7 @@ func kafkaUserConfig() *schema.Schema { Description: "Configure external secret providers in order to reference external secrets in connector configuration. Currently Hashicorp Vault (provider: vault, auth_method: token) and AWS Secrets Manager (provider: aws, auth_method: credentials) are supported. Secrets can be referenced in connector config with ${::}", Elem: &schema.Resource{Schema: map[string]*schema.Schema{ "aws": { - Description: "AWS config for Secret Provider", + Description: "AWS secret provider configuration", Elem: &schema.Resource{Schema: map[string]*schema.Schema{ "access_key": { Description: "Access key used to authenticate with aws.", @@ -480,7 +480,7 @@ func kafkaUserConfig() *schema.Schema { Type: schema.TypeString, }, "vault": { - Description: "Vault Config for Secret Provider", + Description: "Vault secret provider configuration", Elem: &schema.Resource{Schema: map[string]*schema.Schema{ "address": { Description: "Address of the Vault server.", diff --git a/internal/sdkprovider/userconfig/service/kafka_connect.go b/internal/sdkprovider/userconfig/service/kafka_connect.go index 03d82e03f..6823466ff 100644 --- a/internal/sdkprovider/userconfig/service/kafka_connect.go +++ b/internal/sdkprovider/userconfig/service/kafka_connect.go @@ -219,7 +219,7 @@ func kafkaConnectUserConfig() *schema.Schema { Description: "Configure external secret providers in order to reference external secrets in connector configuration. Currently Hashicorp Vault (provider: vault, auth_method: token) and AWS Secrets Manager (provider: aws, auth_method: credentials) are supported. Secrets can be referenced in connector config with ${::}", Elem: &schema.Resource{Schema: map[string]*schema.Schema{ "aws": { - Description: "AWS config for Secret Provider", + Description: "AWS secret provider configuration", Elem: &schema.Resource{Schema: map[string]*schema.Schema{ "access_key": { Description: "Access key used to authenticate with aws.", @@ -254,7 +254,7 @@ func kafkaConnectUserConfig() *schema.Schema { Type: schema.TypeString, }, "vault": { - Description: "Vault Config for Secret Provider", + Description: "Vault secret provider configuration", Elem: &schema.Resource{Schema: map[string]*schema.Schema{ "address": { Description: "Address of the Vault server.", diff --git a/internal/sdkprovider/userconfig/service/opensearch.go b/internal/sdkprovider/userconfig/service/opensearch.go index 4e27f70e7..bce0c33b3 100644 --- a/internal/sdkprovider/userconfig/service/opensearch.go +++ b/internal/sdkprovider/userconfig/service/opensearch.go @@ -28,7 +28,7 @@ func opensearchUserConfig() *schema.Schema { Description: "Azure migration settings", Elem: &schema.Resource{Schema: map[string]*schema.Schema{ "account": { - Description: "Azure account name.", + Description: "Account name.", Required: true, Type: schema.TypeString, }, @@ -754,6 +754,82 @@ func opensearchUserConfig() *schema.Schema { Optional: true, Type: schema.TypeList, }, + "search_insights_top_queries": { + Elem: &schema.Resource{Schema: map[string]*schema.Schema{ + "cpu": { + Description: "Top N queries monitoring by CPU", + Elem: &schema.Resource{Schema: map[string]*schema.Schema{ + "enabled": { + Description: "Enable or disable top N query monitoring by the metric. Default: `false`.", + Optional: true, + Type: schema.TypeBool, + }, + "top_n_size": { + Description: "Specify the value of N for the top N queries by the metric.", + Optional: true, + Type: schema.TypeInt, + }, + "window_size": { + Description: "The window size of the top N queries by the metric.", + Optional: true, + Type: schema.TypeString, + }, + }}, + MaxItems: 1, + Optional: true, + Type: schema.TypeList, + }, + "latency": { + Description: "Top N queries monitoring by latency", + Elem: &schema.Resource{Schema: map[string]*schema.Schema{ + "enabled": { + Description: "Enable or disable top N query monitoring by the metric. Default: `false`.", + Optional: true, + Type: schema.TypeBool, + }, + "top_n_size": { + Description: "Specify the value of N for the top N queries by the metric.", + Optional: true, + Type: schema.TypeInt, + }, + "window_size": { + Description: "The window size of the top N queries by the metric.", + Optional: true, + Type: schema.TypeString, + }, + }}, + MaxItems: 1, + Optional: true, + Type: schema.TypeList, + }, + "memory": { + Description: "Top N queries monitoring by memory", + Elem: &schema.Resource{Schema: map[string]*schema.Schema{ + "enabled": { + Description: "Enable or disable top N query monitoring by the metric. Default: `false`.", + Optional: true, + Type: schema.TypeBool, + }, + "top_n_size": { + Description: "Specify the value of N for the top N queries by the metric.", + Optional: true, + Type: schema.TypeInt, + }, + "window_size": { + Description: "The window size of the top N queries by the metric.", + Optional: true, + Type: schema.TypeString, + }, + }}, + MaxItems: 1, + Optional: true, + Type: schema.TypeList, + }, + }}, + MaxItems: 1, + Optional: true, + Type: schema.TypeList, + }, "search_max_buckets": { Description: "Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined. Example: `10000`.", Optional: true, diff --git a/internal/sdkprovider/userconfig/service/service.go b/internal/sdkprovider/userconfig/service/service.go index 028c0d74c..ab12ae029 100644 --- a/internal/sdkprovider/userconfig/service/service.go +++ b/internal/sdkprovider/userconfig/service/service.go @@ -99,8 +99,9 @@ func GetFieldMapping(kind string) map[string]string { "ip_filter_string": "ip_filter", }, "opensearch": { - "ip_filter_object": "ip_filter", - "ip_filter_string": "ip_filter", + "ip_filter_object": "ip_filter", + "ip_filter_string": "ip_filter", + "opensearch/search_insights_top_queries": "opensearch/search.insights.top_queries", }, "pg": { "ip_filter_object": "ip_filter", diff --git a/internal/sdkprovider/userconfig/service/thanos.go b/internal/sdkprovider/userconfig/service/thanos.go index 78bcba2d6..2c54f4c54 100644 --- a/internal/sdkprovider/userconfig/service/thanos.go +++ b/internal/sdkprovider/userconfig/service/thanos.go @@ -14,7 +14,7 @@ func thanosUserConfig() *schema.Schema { DiffSuppressFunc: diff.SuppressUnchanged, Elem: &schema.Resource{Schema: map[string]*schema.Schema{ "compactor": { - Description: "ThanosCompactor", + Description: "Configuration options for Thanos Compactor", Elem: &schema.Resource{Schema: map[string]*schema.Schema{"retention_days": { Description: "Retention time for data in days for each resolution (5m, 1h, raw).", Optional: true, @@ -74,6 +74,42 @@ func thanosUserConfig() *schema.Schema { Optional: true, Type: schema.TypeInt, }, + "private_access": { + Description: "Allow access to selected service ports from private networks", + Elem: &schema.Resource{Schema: map[string]*schema.Schema{ + "query_frontend": { + Description: "Allow clients to connect to query_frontend with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations.", + Optional: true, + Type: schema.TypeBool, + }, + "receiver_routing": { + Description: "Allow clients to connect to receiver_routing with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations.", + Optional: true, + Type: schema.TypeBool, + }, + }}, + MaxItems: 1, + Optional: true, + Type: schema.TypeList, + }, + "privatelink_access": { + Description: "Allow access to selected service components through Privatelink", + Elem: &schema.Resource{Schema: map[string]*schema.Schema{ + "query_frontend": { + Description: "Enable query_frontend.", + Optional: true, + Type: schema.TypeBool, + }, + "receiver_routing": { + Description: "Enable receiver_routing.", + Optional: true, + Type: schema.TypeBool, + }, + }}, + MaxItems: 1, + Optional: true, + Type: schema.TypeList, + }, "public_access": { Description: "Allow access to selected service ports from the public Internet", Elem: &schema.Resource{Schema: map[string]*schema.Schema{ @@ -118,7 +154,7 @@ func thanosUserConfig() *schema.Schema { Type: schema.TypeList, }, "query": { - Description: "ThanosQuery", + Description: "Configuration options for Thanos Query", Elem: &schema.Resource{Schema: map[string]*schema.Schema{ "query_default_evaluation_interval": { Description: "Set the default evaluation interval for subqueries. Default: `1m`.", @@ -156,7 +192,7 @@ func thanosUserConfig() *schema.Schema { Type: schema.TypeList, }, "query_frontend": { - Description: "ThanosQueryFrontend", + Description: "Configuration options for Thanos Query Frontend", Elem: &schema.Resource{Schema: map[string]*schema.Schema{"query_range_align_range_with_step": { Description: "Whether to align the query range boundaries with the step. If enabled, the query range boundaries will be aligned to the step, providing more accurate results for queries with high-resolution data. Default: `true`.", Optional: true, @@ -167,17 +203,17 @@ func thanosUserConfig() *schema.Schema { Type: schema.TypeList, }, "receiver_ingesting": { - Description: "CommonReceive.", + Description: "Common configuration options for Thanos Receive.", Optional: true, Type: schema.TypeMap, }, "receiver_routing": { - Description: "ThanosReceiveRouting.", + Description: "Configuration options for Thanos Receive Routing.", Optional: true, Type: schema.TypeMap, }, "ruler": { - Description: "ThanosRuler.", + Description: "Configuration options for Thanos Ruler.", Optional: true, Type: schema.TypeMap, }, @@ -192,7 +228,7 @@ func thanosUserConfig() *schema.Schema { Type: schema.TypeBool, }, "store": { - Description: "ThanosStore.", + Description: "Configuration options for Thanos Store.", Optional: true, Type: schema.TypeMap, }, diff --git a/main.go b/main.go index 88dac20fb..eecb6964c 100644 --- a/main.go +++ b/main.go @@ -11,7 +11,7 @@ import ( "github.com/aiven/terraform-provider-aiven/internal/server" ) -//go:generate go run ./ucgenerator/... --excludeServices elasticsearch,alloydbomni +//go:generate go run ./ucgenerator/... --excludeServices alloydbomni // registryPrefix is the registry prefix for the provider. const registryPrefix = "registry.terraform.io/"