|
| 1 | +--- |
| 2 | +Title: "Tanzu Kubernetes Cluster (Class-based Cluster) Data Source" |
| 3 | +Description: |- |
| 4 | + Reading a unified Tanzu Kubernetes Grid cluster. |
| 5 | +--- |
| 6 | + |
| 7 | +# Tanzu Kubernetes Cluster (Class-based Cluster) Data Source |
| 8 | + |
| 9 | +This data source "tanzu-mission-control_tanzu_kubernetes_cluster" enables users get the details for a TMC managed Tanzu Kubernetes Grid cluster for both Tanzu Kubernetes Grid Vsphere 2.x & Tanzu Kubernetes Grid Service 2.x. |
| 10 | + |
| 11 | + |
| 12 | +## Example Usage |
| 13 | + |
| 14 | +```terraform |
| 15 | +data "tanzu-mission-control_tanzu_kubernetes_cluster" "read_tanzu_cluster" { |
| 16 | + name = "tanzu-cluster" |
| 17 | + management_cluster_name = "tanzu-mgmt-cluster" |
| 18 | + provisioner_name = "tanzu-provisioner" |
| 19 | +} |
| 20 | +``` |
| 21 | + |
| 22 | + |
| 23 | +<!-- schema generated by tfplugindocs --> |
| 24 | +## Schema |
| 25 | + |
| 26 | +### Required |
| 27 | + |
| 28 | +- `management_cluster_name` (String) Management cluster name |
| 29 | +- `name` (String) Cluster name |
| 30 | +- `provisioner_name` (String) Cluster provisioner name |
| 31 | + |
| 32 | +### Optional |
| 33 | + |
| 34 | +- `meta` (Block List, Max: 1) Metadata for the resource (see [below for nested schema](#nestedblock--meta)) |
| 35 | +- `spec` (Block List, Max: 1) Spec of tanzu kubernetes cluster. (see [below for nested schema](#nestedblock--spec)) |
| 36 | +- `timeout_policy` (Block List, Max: 1) Timeout policy for Tanzu Kubernetes cluster. (see [below for nested schema](#nestedblock--timeout_policy)) |
| 37 | + |
| 38 | +### Read-Only |
| 39 | + |
| 40 | +- `id` (String) The ID of this resource. |
| 41 | + |
| 42 | +<a id="nestedblock--meta"></a> |
| 43 | +### Nested Schema for `meta` |
| 44 | + |
| 45 | +Optional: |
| 46 | + |
| 47 | +- `annotations` (Map of String) Annotations for the resource |
| 48 | +- `description` (String) Description of the resource |
| 49 | +- `labels` (Map of String) Labels for the resource |
| 50 | + |
| 51 | +Read-Only: |
| 52 | + |
| 53 | +- `resource_version` (String) Resource version of the resource |
| 54 | +- `uid` (String) UID of the resource |
| 55 | + |
| 56 | + |
| 57 | +<a id="nestedblock--spec"></a> |
| 58 | +### Nested Schema for `spec` |
| 59 | + |
| 60 | +Required: |
| 61 | + |
| 62 | +- `topology` (Block List, Min: 1, Max: 1) The cluster topology. (see [below for nested schema](#nestedblock--spec--topology)) |
| 63 | + |
| 64 | +Optional: |
| 65 | + |
| 66 | +- `cluster_group_name` (String) Name of the cluster group to which this cluster belongs. |
| 67 | +- `image_registry` (String) Name of the image registry configuration to use. |
| 68 | +- `proxy_name` (String) Name of the proxy configuration to use. |
| 69 | + |
| 70 | +Read-Only: |
| 71 | + |
| 72 | +- `kubeconfig` (String) Cluster's kubeconfig. |
| 73 | +- `tmc_managed` (Boolean) TMC-managed flag indicates if the cluster is managed by tmc. |
| 74 | +(Default: False) |
| 75 | + |
| 76 | +<a id="nestedblock--spec--topology"></a> |
| 77 | +### Nested Schema for `spec.topology` |
| 78 | + |
| 79 | +Required: |
| 80 | + |
| 81 | +- `cluster_variables` (String) Variables configuration for the cluster. |
| 82 | +- `control_plane` (Block List, Min: 1, Max: 1) Control plane specific configuration. (see [below for nested schema](#nestedblock--spec--topology--control_plane)) |
| 83 | +- `nodepool` (Block List, Min: 1) (Repeatable Block) Node pool definition for the cluster. (see [below for nested schema](#nestedblock--spec--topology--nodepool)) |
| 84 | +- `version` (String) Kubernetes version of the cluster. |
| 85 | + |
| 86 | +Optional: |
| 87 | + |
| 88 | +- `cluster_class` (String) The name of the cluster class for the cluster. |
| 89 | +- `core_addon` (Block List) (Repeatable Block) The core addons. (see [below for nested schema](#nestedblock--spec--topology--core_addon)) |
| 90 | +- `network` (Block List, Max: 1) Network specific configuration. (see [below for nested schema](#nestedblock--spec--topology--network)) |
| 91 | + |
| 92 | +<a id="nestedblock--spec--topology--control_plane"></a> |
| 93 | +### Nested Schema for `spec.topology.control_plane` |
| 94 | + |
| 95 | +Required: |
| 96 | + |
| 97 | +- `replicas` (Number) Number of replicas |
| 98 | + |
| 99 | +Optional: |
| 100 | + |
| 101 | +- `meta` (Block List, Max: 1) Metadata for the resource (see [below for nested schema](#nestedblock--spec--topology--control_plane--meta)) |
| 102 | +- `os_image` (Block List, Max: 1) OS image block (see [below for nested schema](#nestedblock--spec--topology--control_plane--os_image)) |
| 103 | + |
| 104 | +<a id="nestedblock--spec--topology--control_plane--meta"></a> |
| 105 | +### Nested Schema for `spec.topology.control_plane.meta` |
| 106 | + |
| 107 | +Optional: |
| 108 | + |
| 109 | +- `annotations` (Map of String) Annotations for the resource |
| 110 | +- `description` (String) Description of the resource |
| 111 | +- `labels` (Map of String) Labels for the resource |
| 112 | + |
| 113 | +Read-Only: |
| 114 | + |
| 115 | +- `resource_version` (String) Resource version of the resource |
| 116 | +- `uid` (String) UID of the resource |
| 117 | + |
| 118 | + |
| 119 | +<a id="nestedblock--spec--topology--control_plane--os_image"></a> |
| 120 | +### Nested Schema for `spec.topology.control_plane.os_image` |
| 121 | + |
| 122 | +Required: |
| 123 | + |
| 124 | +- `arch` (String) The architecture of the OS image. |
| 125 | +- `name` (String) The name of the OS image. |
| 126 | +- `version` (String) The version of the OS image. |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | +<a id="nestedblock--spec--topology--nodepool"></a> |
| 131 | +### Nested Schema for `spec.topology.nodepool` |
| 132 | + |
| 133 | +Required: |
| 134 | + |
| 135 | +- `name` (String) Name of the node pool. |
| 136 | +- `spec` (Block List, Min: 1) Spec for the node pool. (see [below for nested schema](#nestedblock--spec--topology--nodepool--spec)) |
| 137 | + |
| 138 | +Optional: |
| 139 | + |
| 140 | +- `description` (String) Description of the node pool. |
| 141 | + |
| 142 | +<a id="nestedblock--spec--topology--nodepool--spec"></a> |
| 143 | +### Nested Schema for `spec.topology.nodepool.spec` |
| 144 | + |
| 145 | +Required: |
| 146 | + |
| 147 | +- `replicas` (Number) Number of replicas |
| 148 | +- `worker_class` (String) The name of the machine deployment class used to create the node pool. |
| 149 | + |
| 150 | +Optional: |
| 151 | + |
| 152 | +- `failure_domain` (String) The failure domain the machines will be created in. |
| 153 | +- `meta` (Block List, Max: 1) Metadata for the resource (see [below for nested schema](#nestedblock--spec--topology--nodepool--spec--meta)) |
| 154 | +- `os_image` (Block List, Max: 1) OS image block (see [below for nested schema](#nestedblock--spec--topology--nodepool--spec--os_image)) |
| 155 | +- `overrides` (String) Overrides can be used to override cluster level variables. |
| 156 | + |
| 157 | +<a id="nestedblock--spec--topology--nodepool--spec--meta"></a> |
| 158 | +### Nested Schema for `spec.topology.nodepool.spec.meta` |
| 159 | + |
| 160 | +Optional: |
| 161 | + |
| 162 | +- `annotations` (Map of String) Annotations for the resource |
| 163 | +- `labels` (Map of String) Labels for the resource |
| 164 | + |
| 165 | + |
| 166 | +<a id="nestedblock--spec--topology--nodepool--spec--os_image"></a> |
| 167 | +### Nested Schema for `spec.topology.nodepool.spec.os_image` |
| 168 | + |
| 169 | +Required: |
| 170 | + |
| 171 | +- `arch` (String) The architecture of the OS image. |
| 172 | +- `name` (String) The name of the OS image. |
| 173 | +- `version` (String) The version of the OS image. |
| 174 | + |
| 175 | + |
| 176 | + |
| 177 | + |
| 178 | +<a id="nestedblock--spec--topology--core_addon"></a> |
| 179 | +### Nested Schema for `spec.topology.core_addon` |
| 180 | + |
| 181 | +Required: |
| 182 | + |
| 183 | +- `provider` (String) Provider of core add on |
| 184 | +- `type` (String) Type of core add on |
| 185 | + |
| 186 | + |
| 187 | +<a id="nestedblock--spec--topology--network"></a> |
| 188 | +### Nested Schema for `spec.topology.network` |
| 189 | + |
| 190 | +Optional: |
| 191 | + |
| 192 | +- `pod_cidr_blocks` (List of String) Pod CIDR for Kubernetes pods defaults to 192.168.0.0/16. |
| 193 | +- `service_cidr_blocks` (List of String) Service CIDR for kubernetes services defaults to 10.96.0.0/12. |
| 194 | +- `service_domain` (String) Domain name for services. |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | +<a id="nestedblock--timeout_policy"></a> |
| 200 | +### Nested Schema for `timeout_policy` |
| 201 | + |
| 202 | +Optional: |
| 203 | + |
| 204 | +- `fail_on_timeout` (Boolean) Fail on timeout if timeout is reached and cluster is not ready. (Default = true) |
| 205 | +- `timeout` (Number) Timeout in minutes for tanzu kubernetes creation process. A value of 0 means that no timeout is set. (Default: 60) |
| 206 | +- `wait_for_kubeconfig` (Boolean) Wait for kubeconfig. (Default = true) |
0 commit comments