* Implement kubeconfig resource * Update acc test, skip get credentials * Update acc test * Add warning on Create * Add option to refresh * Fix lint * Add comment, generate docs * Update stackit/internal/services/ske/cluster/resource.go Co-authored-by: João Palet <joao.palet@outlook.com> * Update stackit/internal/services/ske/kubeconfig/resource.go Co-authored-by: João Palet <joao.palet@outlook.com> * Changes after review * Fix schema * Gen docs * Rename * Credentials handling in datasource, update acc test * Fix datasource * Update descriptions --------- Co-authored-by: João Palet <joao.palet@outlook.com>
155 lines
5.9 KiB
Markdown
155 lines
5.9 KiB
Markdown
---
|
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
|
page_title: "stackit_ske_cluster Resource - stackit"
|
|
subcategory: ""
|
|
description: |-
|
|
SKE Cluster Resource schema. Must have a region specified in the provider configuration.
|
|
---
|
|
|
|
# stackit_ske_cluster (Resource)
|
|
|
|
SKE Cluster Resource schema. Must have a `region` specified in the provider configuration.
|
|
|
|
## Example Usage
|
|
|
|
```terraform
|
|
resource "stackit_ske_cluster" "example" {
|
|
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
name = "example"
|
|
kubernetes_version = "1.25"
|
|
node_pools = [
|
|
{
|
|
name = "np-example"
|
|
machine_type = "x.x"
|
|
os_version = "x.x.x"
|
|
minimum = "2"
|
|
maximum = "3"
|
|
availability_zones = ["eu01-3"]
|
|
}
|
|
]
|
|
maintenance = {
|
|
enable_kubernetes_version_updates = true
|
|
enable_machine_image_version_updates = true
|
|
start = "01:00:00Z"
|
|
end = "02:00:00Z"
|
|
}
|
|
}
|
|
```
|
|
|
|
<!-- schema generated by tfplugindocs -->
|
|
## Schema
|
|
|
|
### Required
|
|
|
|
- `kubernetes_version` (String) Kubernetes version. Must only contain major and minor version (e.g. 1.22)
|
|
- `name` (String) The cluster name.
|
|
- `node_pools` (Attributes List) One or more `node_pool` block as defined below. (see [below for nested schema](#nestedatt--node_pools))
|
|
- `project_id` (String) STACKIT project ID to which the cluster is associated.
|
|
|
|
### Optional
|
|
|
|
- `allow_privileged_containers` (Boolean) Flag to specify if privileged mode for containers is enabled or not.
|
|
This should be used with care since it also disables a couple of other features like the use of some volume type (e.g. PVCs).
|
|
Deprecated as of Kubernetes 1.25 and later
|
|
- `extensions` (Attributes) A single extensions block as defined below. (see [below for nested schema](#nestedatt--extensions))
|
|
- `hibernations` (Attributes List) One or more hibernation block as defined below. (see [below for nested schema](#nestedatt--hibernations))
|
|
- `maintenance` (Attributes) A single maintenance block as defined below. (see [below for nested schema](#nestedatt--maintenance))
|
|
|
|
### Read-Only
|
|
|
|
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`name`".
|
|
- `kube_config` (String, Sensitive, Deprecated) Static token kubeconfig used for connecting to the cluster. This field will be empty for clusters with Kubernetes v1.27+, or if you have obtained the kubeconfig or performed credentials rotation using the new process, either through the Portal or the SKE API. Use the stackit_ske_kubeconfig resource instead. For more information, see How to rotate SKE credentials (https://docs.stackit.cloud/stackit/en/how-to-rotate-ske-credentials-200016334.html).
|
|
- `kubernetes_version_used` (String) Full Kubernetes version used. For example, if 1.22 was selected, this value may result to 1.22.15
|
|
|
|
<a id="nestedatt--node_pools"></a>
|
|
### Nested Schema for `node_pools`
|
|
|
|
Required:
|
|
|
|
- `availability_zones` (List of String) Specify a list of availability zones. E.g. `eu01-m`
|
|
- `machine_type` (String) The machine type.
|
|
- `maximum` (Number) Maximum number of nodes in the pool.
|
|
- `minimum` (Number) Minimum number of nodes in the pool.
|
|
- `name` (String) Specifies the name of the node pool.
|
|
- `os_version` (String) The OS image version.
|
|
|
|
Optional:
|
|
|
|
- `cri` (String) Specifies the container runtime. E.g. `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`.
|
|
- `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`.
|
|
|
|
<a id="nestedatt--node_pools--taints"></a>
|
|
### Nested Schema for `node_pools.taints`
|
|
|
|
Required:
|
|
|
|
- `effect` (String) The taint effect. E.g `PreferNoSchedule`.
|
|
- `key` (String) Taint key to be applied to a node.
|
|
|
|
Optional:
|
|
|
|
- `value` (String) Taint value corresponding to the taint key.
|
|
|
|
|
|
|
|
<a id="nestedatt--extensions"></a>
|
|
### Nested Schema for `extensions`
|
|
|
|
Optional:
|
|
|
|
- `acl` (Attributes) Cluster access control configuration. (see [below for nested schema](#nestedatt--extensions--acl))
|
|
- `argus` (Attributes) A single argus block as defined below. (see [below for nested schema](#nestedatt--extensions--argus))
|
|
|
|
<a id="nestedatt--extensions--acl"></a>
|
|
### Nested Schema for `extensions.acl`
|
|
|
|
Required:
|
|
|
|
- `enabled` (Boolean) Is ACL enabled?
|
|
|
|
Optional:
|
|
|
|
- `allowed_cidrs` (List of String) Specify a list of CIDRs to whitelist.
|
|
|
|
|
|
<a id="nestedatt--extensions--argus"></a>
|
|
### Nested Schema for `extensions.argus`
|
|
|
|
Required:
|
|
|
|
- `enabled` (Boolean) Flag to enable/disable Argus extensions.
|
|
|
|
Optional:
|
|
|
|
- `argus_instance_id` (String) Argus instance ID to choose which Argus instance is used. Required when enabled is set to `true`.
|
|
|
|
|
|
|
|
<a id="nestedatt--hibernations"></a>
|
|
### Nested Schema for `hibernations`
|
|
|
|
Required:
|
|
|
|
- `end` (String) End time of hibernation in crontab syntax. E.g. `0 8 * * *` for waking up the cluster at 8am.
|
|
- `start` (String) Start time of cluster hibernation in crontab syntax. E.g. `0 18 * * *` for starting everyday at 6pm.
|
|
|
|
Optional:
|
|
|
|
- `timezone` (String) Timezone name corresponding to a file in the IANA Time Zone database. i.e. `Europe/Berlin`.
|
|
|
|
|
|
<a id="nestedatt--maintenance"></a>
|
|
### Nested Schema for `maintenance`
|
|
|
|
Required:
|
|
|
|
- `enable_kubernetes_version_updates` (Boolean) Flag to enable/disable auto-updates of the Kubernetes version.
|
|
- `enable_machine_image_version_updates` (Boolean) Flag to enable/disable auto-updates of the OS image version.
|
|
- `end` (String) Time for maintenance window end. E.g. `01:23:45Z`, `05:00:00+02:00`.
|
|
- `start` (String) Time for maintenance window start. E.g. `01:23:45Z`, `05:00:00+02:00`.
|