From e2e5f19a29bf0a14f355abddece14b0b5d7d6cfc Mon Sep 17 00:00:00 2001 From: Vicente Pinto Date: Tue, 21 May 2024 11:14:16 +0100 Subject: [PATCH] Improve description for default fields (#369) --- docs/resources/argus_scrapeconfig.md | 10 +++++----- docs/resources/dns_record_set.md | 2 +- docs/resources/dns_zone.md | 4 ++-- docs/resources/ske_cluster.md | 8 ++++---- docs/resources/ske_kubeconfig.md | 2 +- .../internal/services/argus/scrapeconfig/resource.go | 10 +++++----- stackit/internal/services/dns/recordset/resource.go | 2 +- stackit/internal/services/dns/zone/resource.go | 4 ++-- stackit/internal/services/ske/cluster/resource.go | 8 ++++---- stackit/internal/services/ske/kubeconfig/resource.go | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/resources/argus_scrapeconfig.md b/docs/resources/argus_scrapeconfig.md index 6cc16b9c..317ef1e9 100644 --- a/docs/resources/argus_scrapeconfig.md +++ b/docs/resources/argus_scrapeconfig.md @@ -47,10 +47,10 @@ resource "stackit_argus_scrapeconfig" "example" { - `basic_auth` (Attributes) A basic authentication block. (see [below for nested schema](#nestedatt--basic_auth)) - `saml2` (Attributes) A SAML2 configuration block. (see [below for nested schema](#nestedatt--saml2)) -- `sample_limit` (Number) Specifies the scrape sample limit. Upper limit depends on the service plan. Default is `5000`. -- `scheme` (String) Specifies the http scheme. E.g. `https`. -- `scrape_interval` (String) Specifies the scrape interval as duration string. E.g. `5m`. -- `scrape_timeout` (String) Specifies the scrape timeout as duration string. E.g.`2m`. +- `sample_limit` (Number) Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to `5000`. +- `scheme` (String) Specifies the http scheme. Defaults to `https`. +- `scrape_interval` (String) Specifies the scrape interval as duration string. Defaults to `5m`. +- `scrape_timeout` (String) Specifies the scrape timeout as duration string. Defaults to `2m`. ### Read-Only @@ -82,4 +82,4 @@ Required: Optional: -- `enable_url_parameters` (Boolean) Specifies if URL parameters are enabled. +- `enable_url_parameters` (Boolean) Specifies if URL parameters are enabled. Defaults to `true` diff --git a/docs/resources/dns_record_set.md b/docs/resources/dns_record_set.md index de3b3954..6931a7cc 100644 --- a/docs/resources/dns_record_set.md +++ b/docs/resources/dns_record_set.md @@ -35,7 +35,7 @@ resource "stackit_dns_record_set" "example" { ### Optional -- `active` (Boolean) Specifies if the record set is active or not. +- `active` (Boolean) Specifies if the record set is active or not. Defaults to `true` - `comment` (String) Comment. - `ttl` (Number) Time to live. E.g. 3600 - `type` (String) The record set type. E.g. `A` or `CNAME` diff --git a/docs/resources/dns_zone.md b/docs/resources/dns_zone.md index 8781859a..b65ed39f 100644 --- a/docs/resources/dns_zone.md +++ b/docs/resources/dns_zone.md @@ -42,12 +42,12 @@ resource "stackit_dns_zone" "example" { - `default_ttl` (Number) Default time to live. E.g. 3600. - `description` (String) Description of the zone. - `expire_time` (Number) Expire time. E.g. 1209600. -- `is_reverse_zone` (Boolean) Specifies, if the zone is a reverse zone or not. +- `is_reverse_zone` (Boolean) Specifies, if the zone is a reverse zone or not. Defaults to `false` - `negative_cache` (Number) Negative caching. E.g. 60 - `primaries` (List of String) Primary name server for secondary zone. E.g. ["1.2.3.4"] - `refresh_time` (Number) Refresh time. E.g. 3600 - `retry_time` (Number) Retry time. E.g. 600 -- `type` (String) Zone type. E.g. `primary` +- `type` (String) Zone type. Defaults to `primary` ### Read-Only diff --git a/docs/resources/ske_cluster.md b/docs/resources/ske_cluster.md index 1db3c853..8db3bb25 100644 --- a/docs/resources/ske_cluster.md +++ b/docs/resources/ske_cluster.md @@ -75,16 +75,16 @@ Required: Optional: -- `cri` (String) Specifies the container runtime. E.g. `containerd` +- `cri` (String) Specifies the container runtime. Defaults to `containerd` - `labels` (Map of String) Labels to add to each node. - `max_surge` (Number) Maximum number of additional VMs that are created during an update. - `max_unavailable` (Number) Maximum number of VMs that that can be unavailable during an update. -- `os_name` (String) The name of the OS image. E.g. `flatcar`. +- `os_name` (String) The name of the OS image. Defaults to `flatcar`. - `os_version` (String, Deprecated) This field is deprecated, use `os_version_min` to configure the version and `os_version_used` to get the currently used version instead - `os_version_min` (String) The minimum OS image version. This field will be used to set the minimum OS image version on creation/update of the cluster. If unset, the latest supported OS image version will be used. SKE automatically updates the cluster Kubernetes version if you have set `maintenance.enable_kubernetes_version_updates` to true or if there is a mandatory update, as described in [Updates for Kubernetes versions and Operating System versions in SKE](https://docs.stackit.cloud/stackit/en/version-updates-in-ske-10125631.html). To get the current OS image version being used for the node pool, use the read-only `os_version_used` field. - `taints` (Attributes List) Specifies a taint list as defined below. (see [below for nested schema](#nestedatt--node_pools--taints)) -- `volume_size` (Number) The volume size in GB. E.g. `20` -- `volume_type` (String) Specifies the volume type. E.g. `storage_premium_perf1`. +- `volume_size` (Number) The volume size in GB. Defaults to `20` +- `volume_type` (String) Specifies the volume type. Defaults to `storage_premium_perf1`. Read-Only: diff --git a/docs/resources/ske_kubeconfig.md b/docs/resources/ske_kubeconfig.md index fb90fd5b..15545ea1 100644 --- a/docs/resources/ske_kubeconfig.md +++ b/docs/resources/ske_kubeconfig.md @@ -30,7 +30,7 @@ resource "stackit_ske_kubeconfig" "example" { ### Optional -- `expiration` (Number) Expiration time of the kubeconfig, in seconds. +- `expiration` (Number) Expiration time of the kubeconfig, in seconds. Defaults to `3600` - `refresh` (Boolean) If set to true, the provider will check if the kubeconfig has expired and will generated a new valid one in-place ### Read-Only diff --git a/stackit/internal/services/argus/scrapeconfig/resource.go b/stackit/internal/services/argus/scrapeconfig/resource.go index 56228d05..051df8e0 100644 --- a/stackit/internal/services/argus/scrapeconfig/resource.go +++ b/stackit/internal/services/argus/scrapeconfig/resource.go @@ -203,13 +203,13 @@ func (r *scrapeConfigResource) Schema(_ context.Context, _ resource.SchemaReques }, "scheme": schema.StringAttribute{ - Description: "Specifies the http scheme. E.g. `https`.", + Description: "Specifies the http scheme. Defaults to `https`.", Optional: true, Computed: true, Default: stringdefault.StaticString(DefaultScheme), }, "scrape_interval": schema.StringAttribute{ - Description: "Specifies the scrape interval as duration string. E.g. `5m`.", + Description: "Specifies the scrape interval as duration string. Defaults to `5m`.", Optional: true, Computed: true, Validators: []validator.String{ @@ -218,7 +218,7 @@ func (r *scrapeConfigResource) Schema(_ context.Context, _ resource.SchemaReques Default: stringdefault.StaticString(DefaultScrapeInterval), }, "scrape_timeout": schema.StringAttribute{ - Description: "Specifies the scrape timeout as duration string. E.g.`2m`.", + Description: "Specifies the scrape timeout as duration string. Defaults to `2m`.", Optional: true, Computed: true, Validators: []validator.String{ @@ -227,7 +227,7 @@ func (r *scrapeConfigResource) Schema(_ context.Context, _ resource.SchemaReques Default: stringdefault.StaticString(DefaultScrapeTimeout), }, "sample_limit": schema.Int64Attribute{ - Description: "Specifies the scrape sample limit. Upper limit depends on the service plan. Default is `5000`.", + Description: "Specifies the scrape sample limit. Upper limit depends on the service plan. Defaults to `5000`.", Optional: true, Computed: true, Validators: []validator.Int64{ @@ -251,7 +251,7 @@ func (r *scrapeConfigResource) Schema(_ context.Context, _ resource.SchemaReques ), Attributes: map[string]schema.Attribute{ "enable_url_parameters": schema.BoolAttribute{ - Description: "Specifies if URL parameters are enabled.", + Description: "Specifies if URL parameters are enabled. Defaults to `true`", Optional: true, Computed: true, Default: booldefault.StaticBool(DefaultSAML2EnableURLParameters), diff --git a/stackit/internal/services/dns/recordset/resource.go b/stackit/internal/services/dns/recordset/resource.go index 8b047046..1855e550 100644 --- a/stackit/internal/services/dns/recordset/resource.go +++ b/stackit/internal/services/dns/recordset/resource.go @@ -184,7 +184,7 @@ func (r *recordSetResource) Schema(_ context.Context, _ resource.SchemaRequest, }, }, "active": schema.BoolAttribute{ - Description: "Specifies if the record set is active or not.", + Description: "Specifies if the record set is active or not. Defaults to `true`", Optional: true, Computed: true, Default: booldefault.StaticBool(true), diff --git a/stackit/internal/services/dns/zone/resource.go b/stackit/internal/services/dns/zone/resource.go index 58b9528f..47f127fc 100644 --- a/stackit/internal/services/dns/zone/resource.go +++ b/stackit/internal/services/dns/zone/resource.go @@ -211,7 +211,7 @@ func (r *zoneResource) Schema(_ context.Context, _ resource.SchemaRequest, resp }, }, "is_reverse_zone": schema.BoolAttribute{ - Description: "Specifies, if the zone is a reverse zone or not.", + Description: "Specifies, if the zone is a reverse zone or not. Defaults to `false`", Optional: true, Computed: true, Default: booldefault.StaticBool(false), @@ -254,7 +254,7 @@ func (r *zoneResource) Schema(_ context.Context, _ resource.SchemaRequest, resp }, }, "type": schema.StringAttribute{ - Description: "Zone type. E.g. `primary`", + Description: "Zone type. Defaults to `primary`", Optional: true, Computed: true, Default: stringdefault.StaticString("primary"), diff --git a/stackit/internal/services/ske/cluster/resource.go b/stackit/internal/services/ske/cluster/resource.go index a5ff305f..58da1046 100644 --- a/stackit/internal/services/ske/cluster/resource.go +++ b/stackit/internal/services/ske/cluster/resource.go @@ -375,7 +375,7 @@ func (r *clusterResource) Schema(_ context.Context, _ resource.SchemaRequest, re }, }, "os_name": schema.StringAttribute{ - Description: "The name of the OS image. E.g. `flatcar`.", + Description: "The name of the OS image. Defaults to `flatcar`.", Optional: true, Computed: true, Default: stringdefault.StaticString(DefaultOSName), @@ -397,13 +397,13 @@ func (r *clusterResource) Schema(_ context.Context, _ resource.SchemaRequest, re Computed: true, }, "volume_type": schema.StringAttribute{ - Description: "Specifies the volume type. E.g. `storage_premium_perf1`.", + Description: "Specifies the volume type. Defaults to `storage_premium_perf1`.", Optional: true, Computed: true, Default: stringdefault.StaticString(DefaultVolumeType), }, "volume_size": schema.Int64Attribute{ - Description: "The volume size in GB. E.g. `20`", + Description: "The volume size in GB. Defaults to `20`", Optional: true, Computed: true, Default: int64default.StaticInt64(DefaultVolumeSizeGB), @@ -441,7 +441,7 @@ func (r *clusterResource) Schema(_ context.Context, _ resource.SchemaRequest, re }, }, "cri": schema.StringAttribute{ - Description: "Specifies the container runtime. E.g. `containerd`", + Description: "Specifies the container runtime. Defaults to `containerd`", Optional: true, Computed: true, Default: stringdefault.StaticString(DefaultCRI), diff --git a/stackit/internal/services/ske/kubeconfig/resource.go b/stackit/internal/services/ske/kubeconfig/resource.go index a52a78a2..fe2c451c 100644 --- a/stackit/internal/services/ske/kubeconfig/resource.go +++ b/stackit/internal/services/ske/kubeconfig/resource.go @@ -105,7 +105,7 @@ func (r *kubeconfigResource) Schema(_ context.Context, _ resource.SchemaRequest, "cluster_name": "Name of the SKE cluster.", "project_id": "STACKIT project ID to which the cluster is associated.", "kube_config": "Raw short-lived admin kubeconfig.", - "expiration": "Expiration time of the kubeconfig, in seconds.", + "expiration": "Expiration time of the kubeconfig, in seconds. Defaults to `3600`", "expires_at": "Timestamp when the kubeconfig expires", "refresh": "If set to true, the provider will check if the kubeconfig has expired and will generated a new valid one in-place", }