Skip to content

xcsh_k8s_cluster (Data Source)

Retrieves information about k8s_cluster will create the object in the storage backend for namespace metadata.namespace in F5 Distributed Cloud. This is a read-only data source.

~> Note: For more information, see the F5 Distributed Cloud API documentation.

# K8SCluster Data Source Example
terraform {
required_version = ">= 1.0"
required_providers {
xcsh = {
source = "f5-sales-demo/xcsh"
version = ">= 0.1.0"
}
}
}
# Look up an existing K8SCluster by name
data "xcsh_k8s_cluster" "example" {
name = "example-k8s-cluster"
namespace = "system"
}
output "k8s_cluster_id" {
value = data.xcsh_k8s_cluster.example.id
}

-> Syntax Rule: This provider uses OneOf groups for mutually exclusive options. Fields documented as “Optional Block” use block syntax field_name { ... }. Empty OneOf object attributes use field_name = {}; conditional selection uses condition ? {} : null. Boolean attributes (such as add_hsts and http_redirect) use = true or = false.

🔶 High Risk Operations — Some operations on this resource have high danger level. Destructive operations may require confirmation.

Required fields:

  • name
  • namespace

Example (API format):

metadata:
name: my-k8s-cluster
namespace: demo-app
spec: {}

• name - Required String
Name of the K8SCluster

• namespace - Optional String
Namespace where the K8SCluster exists

In addition to all arguments above, the following attributes are exported:

• annotations - Optional Map
Annotations applied to this resource

• cluster_scoped_access_deny - Optional Object Defaults to map[]
Enable this option. Server applies default when omitted

• cluster_scoped_access_permit - Optional Object
Enable this option

• cluster_wide_app_list - Optional String
Cluster Wide Application List. List of cluster wide applications

• description - Optional String
Description of the K8SCluster

• global_access_enable - Optional Object
Configuration parameter for global access enable

• id - Optional String
Unique identifier for the resource

• insecure_registry_list - Optional String
Docker Insecure Registry List. List of Docker insecure registries

• labels - Optional Map
Labels applied to this resource

• local_access_config - Optional String
Parameters required to enable local access

• no_cluster_wide_apps - Optional Object Defaults to map[]
Enable this option. Server applies default when omitted

• no_global_access - Optional Object Defaults to map[]
Configuration parameter for no global access. Server applies default when omitted

• no_insecure_registries - Optional Object Defaults to map[]
Enable this option. Server applies default when omitted

• no_local_access - Optional Object Defaults to map[]
Configuration parameter for no local access. Server applies default when omitted

• use_custom_cluster_role_bindings - Optional String
List of active cluster role binding list for a K8S cluster

• use_custom_cluster_role_list - Optional String
List of active cluster role list for a K8S cluster

• use_custom_pod_security_admission - Optional String
Type establishes a direct reference from one object(the referrer) to another(the referred). Such a reference is in form of tenant/namespace/name

• use_custom_psp_list - Optional String
List of active Pod security policies for a K8S cluster

• use_default_cluster_role_bindings - Optional Object Defaults to map[]
Enable this option. Server applies default when omitted

• use_default_cluster_roles - Optional Object Defaults to map[]
Enable this option. Server applies default when omitted

• use_default_pod_security_admission - Optional Object
Enable this option

• use_default_psp - Optional Object Defaults to map[]
Configuration parameter for use default psp. Server applies default when omitted

• vk8s_namespace_access_deny - Optional Object Defaults to map[]
Enable this option. Server applies default when omitted

• vk8s_namespace_access_permit - Optional Object
Enable this option

• cluster_wide_apps - Optional List
Cluster Wide Application List. List of cluster wide applications

• argo_cd - Optional String
Description Parameters for Argo Continuous Deployment(CD) application

• dashboard - Optional Object
Description Parameters for K8S dashboard

• metrics_server - Optional Object
Description Parameters for Kubernetes Metrics Server application

• prometheus - Optional Object
Description Parameters for Prometheus server access

• local_domain - Optional String
Parameters required to enable local access

• default_port - Optional Object
Enable this option

• local_domain - Optional String
ArgoCD will be accessible at <site name>.<local domain>

• password - Optional String
SecretType is used in an object to indicate a sensitive/confidential field

• port - Optional Number
Use custom ArgoCD port. Available port range is less than 65000 except reserved ports

• blindfold_secret_info - Optional String
BlindfoldSecretInfoType specifies information about the Secret managed by F5XC Secret Management

• clear_secret_info - Optional String
ClearSecretInfoType specifies information about the Secret that is not encrypted

• decryption_provider - Optional String
Name of the Secret Management Access object that contains information about the backend Secret Management service

• location - Optional String
Location is the uri_ref. It could be in URL format for string:/// Or it could be a path if the store provider is an HTTP/HTTPS location

• store_provider - Optional String
Name of the Secret Management Access object that contains information about the store to GET encrypted bytes This field needs to be provided only if the URL scheme is not string:///

• provider_ref - Optional String
Name of the Secret Management Access object that contains information about the store to GET encrypted bytes This field needs to be provided only if the URL scheme is not string:///

• url - Optional String
URL of the secret. Currently supported URL schemes is string:///. For string:/// scheme, Secret needs to be encoded Base64 format. When asked for this secret, caller will GET Secret bytes after Base64 decoding

• insecure_registries - Optional List
List of Docker insecure registries in format ‘example.com:5000’

• default_port - Optional Object
Enable this option

• local_domain - Optional String
Local K8S API server will be accessible at <site name>.<local domain>

• port - Optional Number
Use custom K8S port for API server. Available port range is less than 65000 except reserved ports

• cluster_role_bindings - Optional List
List of active cluster role binding list for a K8S cluster

• name - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name

• namespace - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace

• tenant - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant

• cluster_roles - Optional List
List of active cluster role list for a K8S cluster

• name - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name

• namespace - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace

• tenant - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant

• name - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name

• namespace - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace

• tenant - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant

• pod_security_policies - Optional List
List of active Pod security policies for a K8S cluster

• name - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name

• namespace - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace

• tenant - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant


The following type definitions are used throughout this resource. See the full definition here rather than repeated inline.

Object Reference {#common-object-reference}

Section titled “Object Reference {#common-object-reference}”

Object references establish a direct reference from one configuration object to another in F5 Distributed Cloud. References use the format tenant/namespace/name.

FieldTypeDescription
nameStringName of the referenced object
namespaceStringNamespace containing the referenced object
tenantStringTenant of the referenced object (system-managed)

Transformers apply transformations to input values before matching. Multiple transformers can be applied in order.

ValueDescription
LOWER_CASEConvert to lowercase
UPPER_CASEConvert to uppercase
BASE64_DECODEDecodebase64 content
NORMALIZE_PATHNormalize URL path
REMOVE_WHITESPACERemove whitespace characters
URL_DECODEDecode URL-encoded characters
TRIM_LEFTTrim leading whitespace
TRIM_RIGHTTrim trailing whitespace
TRIMTrim both leading and trailing whitespace

HTTP methods used for request matching.

ValueDescription
ANYMatch any HTTP method
GETHTTP GET request
HEADHTTP HEAD request
POSTHTTP POST request
PUTHTTP PUT request
DELETEHTTP DELETE request
CONNECTHTTP CONNECT request
OPTIONSHTTP OPTIONS request
TRACEHTTP TRACE request
PATCHHTTP PATCH request
COPYHTTP COPY request (WebDAV)

TLS Fingerprints {#common-tls-fingerprints}

Section titled “TLS Fingerprints {#common-tls-fingerprints}”

TLS fingerprint categories for malicious client detection.

ValueDescription
TLS_FINGERPRINT_NONENo fingerprint matching
ANY_MALICIOUS_FINGERPRINTMatch any known malicious fingerprint
ADWAREAdware-associated fingerprints
DRIDEXDridex malware fingerprints
GOOTKITGootkit malware fingerprints
RANSOMWARERansomware-associated fingerprints
TRICKBOTTrickbot malware fingerprints

IP Threat Categories {#common-ip-threat-categories}

Section titled “IP Threat Categories {#common-ip-threat-categories}”

IP address threat categories for security filtering.

ValueDescription
SPAM_SOURCESKnown spam sources
WINDOWS_EXPLOITSWindows exploit sources
WEB_ATTACKSWeb attack sources
BOTNETSKnown botnet IPs
SCANNERSNetwork scanner IPs
REPUTATIONPoor reputation IPs
PHISHINGPhishing-related IPs
PROXYAnonymous proxy IPs
MOBILE_THREATSMobile threat sources
TOR_PROXYTor exit nodes
DENIAL_OF_SERVICEDoS attack sources
NETWORKKnown bad network ranges