Data Platform Cluster
Get information on a Dataplatform Cluster.
The Dataplatform Cluster Data Source can be used to search for and return an existing Dataplatform Cluster. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search and make sure that your resources have unique names.
Example Usage
By ID
By Name
By Name with Partial Match
Argument Reference
id
- (Optional) ID of the cluster you want to search for.name
- (Optional) Name of an existing cluster that you want to search for. Search by name is case-insensitive. The whole resource name is required ifpartial_match
parameter is not set to true.partial_match
- (Optional) Whether partial matching is allowed or not when using name argument. Default value is false.
Either id
or name
must be provided. If none, or both are provided, the datasource will return an error.
Attributes Reference
The following attributes are returned by the datasource:
id
- The UUID of the cluster.datacenter_id
- The UUID of the virtual data center (VDC) in which the cluster is provisioned.name
- The name of your cluster.version
- The version of the Data Platform.maintenance_window
- Starting time of a weekly 4 hour-long window, during which maintenance might occur in hh:mm:ss formattime
- Time at which the maintenance should start.day_of_the_week
kube_config
- Kubernetes configurationconfig
- structured kubernetes config consisting of a list with 1 item with the following fields:api_version - Kubernetes API Version
kind - "Config"
current-context - string
clusters - list of
name - name of cluster
cluster - map of
certificate-authority-data - base64 decoded cluster CA data
server - server address in the form
https://host:port
contexts - list of
name - context name
context - map of
cluster - cluster name
user - cluster user
users - list of
name - user name
user - map of
token - user token used for authentication
user_tokens
- a convenience map to be search the token of a specific userkey - is the user name
value - is the token
server
- cluster server (same asconfig[0].clusters[0].cluster.server
but provided as an attribute for ease of use)ca_crt
- base64 decoded cluster certificate authority data (provided as an attribute for direct use)lans
- A list of LANs you want this node pool to be part oflan_id
- The LAN ID of an existing LAN at the related data centerdhcp
- Indicates if the Kubernetes node pool LAN will reserve an IP using DHCP. The default value is 'true'.routes
- An array of additional LANs attached to worker nodesgateway
- IPv4 or IPv6 gateway IP for the routenetwork
- IPv4 or IPv6 CIDR to be routed via the interface
NOTE: The whole config
node is marked as sensitive.
Example of accessing a Dataplatform Cluster using the user's token
Example of accessing a kubernetes cluster using the token from the config
Example of dumping the kube_config raw data into a yaml file
NOTE: Dumping kube_config
data into files poses a security risk.
NOTE: Using sensitive_content
for local_file
does not show the data written to the file during the plan phase.
Last updated