Skip to content

f5xc_cluster Resource - terraform-provider-f5xc

Manages cluster will create the object in the storage backend for namespace metadata.namespace. in F5 Distributed Cloud.

~> Note For more information about this resource, please refer to the F5 XC API Documentation.

# Cluster Resource Example
# Manages cluster will create the object in the storage backend for namespace metadata.namespace. in F5 Distributed Cloud.
terraform {
required_version = ">= 1.0"
required_providers {
f5xc = {
source = "f5xc-salesdemos/f5xc"
version = ">= 0.1.0"
}
}
}
# Basic Cluster configuration
resource "f5xc_cluster" "example" {
name = "example-cluster"
namespace = "staging"
labels = {
environment = "production"
managed_by = "terraform"
}
annotations = {
"owner" = "platform-team"
}
# Resource-specific configuration
# [OneOf: auto_http_config, http1_config, http2_options] En...
auto_http_config {
# Configure auto_http_config settings
}
# CircuitBreaker provides a mechanism for watching failures...
circuit_breaker {
# Configure circuit_breaker settings
}
# List of key-value pairs that define default subset. This ...
default_subset {
# Configure default_subset settings
}
}

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

name - Required String
Name of the Cluster. Must be unique within the namespace

namespace - Required String
Namespace where the Cluster will be created

annotations - Optional Map
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata

description - Optional String
Human readable description for the object

disable - Optional Bool
A value of true will administratively disable the object

labels - Optional Map
Labels is a user defined key value map that can be attached to resources for organization and filtering

-> One of the following:auto_http_config - Optional Block
Enable this option

http1_config - Optional Block
HTTP/1.1 Protocol OPTIONS for upstream connections
See Http1 Config below for details.

http2_options - Optional Block
Http2 Protocol OPTIONS for upstream connections
See Http2 Options below for details.

circuit_breaker - Optional Block
CircuitBreaker provides a mechanism for watching failures in upstream connections or requests and if the failures reach a certain threshold, automatically fail subsequent requests which allows to apply back pressure on downstream quickly
See Circuit Breaker below for details.

connection_timeout - Required Number Defaults to 2 Specified in milliseconds
The timeout for new network connections to endpoints in the cluster. The seconds

default_subset - Optional Block
List of key-value pairs that define default subset. This subset can be referred in fallback_policy which gets used when route specifies no metadata or no subset matching the metadata exists

-> One of the following:disable_proxy_protocol - Optional Block
Configuration parameter for disable proxy protocol

proxy_protocol_v1 - Optional Block
Configuration parameter for proxy protocol v1

endpoint_selection - Required String Defaults to DISTRIBUTED
Possible values are DISTRIBUTED, LOCAL_ONLY, LOCAL_PREFERRED
[Enum: DISTRIBUTED|LOCAL_ONLY|LOCAL_PREFERRED] Policy for selection of endpoints from local site/remote site/both Consider both remote and local endpoints for load balancing LOCAL_ONLY: Consider only local endpoints for load balancing Enable this policy to load balance ONLY among locally discovered endpoints Prefer the local endpoints for

endpoint_subsets - Optional Block
Configure endpoint groups based on metadata labels for traffic routing. Supports weighted distribution and session affinity across labeled endpoints
See Endpoint Subsets below for details.

endpoints - Optional Block
List of endpoints for this cluster
See Endpoints below for details.

fallback_policy - Required String Defaults to NO_FALLBACK
Possible values are NO_FALLBACK, ANY_ENDPOINT, DEFAULT_SUBSET
[Enum: NO_FALLBACK|ANY_ENDPOINT|DEFAULT_SUBSET] Enumeration for SubsetFallbackPolicy if subset match is not found. The request fails as if the cluster had no endpoint matching the subset policy Any cluster endpoint may be selected if the cluster had no endpoint matching the subset policy Load balancing is done over endpoints matching

health_checks - Optional Block
Health check configuration for backend monitoring
See Health Checks below for details.

http_idle_timeout - Required Number
The idle timeout for upstream connection pool connections. The idle timeout is defined as the period in which there are no active requests. When the idle timeout is reached the connection will be closed

loadbalancer_algorithm - Required String Defaults to ROUND_ROBIN
Possible values are ROUND_ROBIN, LEAST_REQUEST, RING_HASH, RANDOM, LB_OVERRIDE
[Enum: ROUND_ROBIN|LEAST_REQUEST|RING_HASH|RANDOM|LB_OVERRIDE] Different load balancing algorithms supported When a connection to an endpoint in an upstream cluster is required, the load balancer uses loadbalancer_algorithm to determine which host is selected. - ROUND_ROBIN: ROUND_ROBIN Policy in which each healthy/available upstream endpoint is selected in

-> One of the following:max_requests_per_connection - Optional Number
Sets the maximum number of requests allowed per connection to the origin server. Enter a value >=1 to define the request limit per connection

-> One of the following:no_panic_threshold - Optional Block
Configuration parameter for no panic threshold

no_request_limit_per_connection - Optional Block
Configuration parameter for no request limit per connection

outlier_detection - Optional Block
Outlier detection and ejection is the process of dynamically determining whether some number of hosts in an upstream cluster are performing unlike the others and removing them from the healthy load balancing set. Outlier detection is a form of passive health checkingg. Algorithm 1
See Outlier Detection below for details.

panic_threshold - Optional Number
Configure a threshold (percentage of unhealthy endpoints) below which all endpoints will be considered for loadbalancing ignoring its health status

proxy_protocol_v2 - Optional Block
Configuration parameter for proxy protocol v2

timeouts - Optional Block
See Timeouts below for details.

tls_parameters - Optional Block
TLS configuration for upstream connections
See TLS Parameters below for details.

upstream_conn_pool_reuse_type - Optional Block
Select upstream connection pool reuse state for every downstream connection. This configuration choice is for HTTP(S) LB only
See Upstream Conn Pool Reuse Type below for details.

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

id - Optional String
Unique identifier for the resource


A circuit_breaker block supports the following:

connection_limit - Optional Number
The maximum number of connections that loadbalancer will establish to all hosts in an upstream cluster. In practice this is only applicable to TCP and HTTP/1.1 clusters since HTTP/2 uses a single connection to each host. Remove endpoint out of load balancing decision, if number of connections

max_requests - Optional Number
The maximum number of requests that can be outstanding to all hosts in a cluster at any given time. In practice this is applicable to HTTP/2 clusters since HTTP/1.1 clusters are governed by the maximum connections (connection_limit). Remove endpoint out of load balancing decision, if requests

pending_requests - Optional Number
The maximum number of requests that will be queued while waiting for a ready connection pool connection. Since HTTP/2 requests are sent over a single connection, this circuit breaker only comes into play as the initial connection is created, as requests will be multiplexed immediately

priority - Optional String Defaults to DEFAULT
Possible values are DEFAULT, HIGH
[Enum: DEFAULT|HIGH] Priority routing for each request. Different connection pools are used based on the priority selected for the request. Also, circuit-breaker configuration at destination cluster is chosen based on selected priority

retries - Optional Number
The maximum number of retries that can be outstanding to all hosts in a cluster at any given time. Remove endpoint out of load balancing decision, if retries for request exceed this count

An endpoint_subsets block supports the following:

keys - Optional List
List of keys that define a cluster subset class

An endpoints block supports the following:

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

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

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

A health_checks block supports the following:

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

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

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

A http1_config block supports the following:

header_transformation - Optional Block
Header Transformation OPTIONS for HTTP/1.1 request/response headers
See Header Transformation below.

A header_transformation block (within http1_config) supports the following:

default_header_transformation - Optional Block
Enable this option

legacy_header_transformation - Optional Block
Enable this option

preserve_case_header_transformation - Optional Block
Enable this option

proper_case_header_transformation - Optional Block
Enable this option

A http2_options block supports the following:

enabled - Optional Bool
Enable/disable HTTP2 Protocol for upstream connections

An outlier_detection block supports the following:

base_ejection_time - Optional Number
The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. This causes hosts to GET ejected for longer periods if they continue to fail

consecutive_5xx - Optional Number
If an upstream endpoint returns some number of consecutive 5xx, it will be ejected. Note that in this case a 5xx means an actual 5xx respond code, or an event that would cause the HTTP router to return one on the upstream’s behalf(reset, connection failure, etc.) consecutive_5xx indicates the

consecutive_gateway_failure - Optional Number
If an upstream endpoint returns some number of consecutive “gateway errors” (502, 503 or 504 status code), it will be ejected. Note that this includes events that would cause the HTTP router to return one of these status codes on the upstream’s behalf (reset, connection failure, etc.)

interval - Optional Number Defaults to 10000ms
The time interval between ejection analysis sweeps. This can result in both new ejections as well as endpoints being returned to service

max_ejection_percent - Optional Number Defaults to 10%
The maximum % of an upstream cluster that can be ejected due to outlier detection. but will eject at least one host regardless of the value

A timeouts block supports the following:

create - Optional String (Defaults to 10 minutes)
Used when creating the resource

delete - Optional String (Defaults to 10 minutes)
Used when deleting the resource

read - Optional String (Defaults to 5 minutes)
Used when retrieving the resource

update - Optional String (Defaults to 10 minutes)
Used when updating the resource

A tls_parameters block supports the following:

cert_params - Optional Block
Certificate Parameters for authentication, TLS ciphers, and trust store
See Cert Params below.

common_params - Optional Block
Information of different aspects for TLS authentication related to ciphers, certificates and trust store
See Common Params below.

default_session_key_caching - Optional Block
Configuration parameter for default session key caching

disable_session_key_caching - Optional Block
Configuration parameter for disable session key caching

disable_sni - Optional Block
Configuration parameter for disable sni

max_session_keys - Optional Number
Number of session keys that are cached

sni - Optional String
SNI value to be used

use_host_header_as_sni - Optional Block
Enable this option

A cert_params block (within tls_parameters) supports the following:

certificates - Optional Block
Client TLS Certificate required for mTLS authentication
See Certificates below.

cipher_suites - Optional List
The following list specifies the supported cipher suite TLS_AES_128_GCM_SHA256 TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

maximum_protocol_version - Optional String Defaults to TLS_AUTO
Possible values are TLS_AUTO, TLSv1_0, TLSv1_1, TLSv1_2, TLSv1_3
[Enum: TLS_AUTO|TLSv1_0|TLSv1_1|TLSv1_2|TLSv1_3] TlsProtocol is enumeration of supported TLS versions F5 Distributed Cloud will choose the optimal TLS version

minimum_protocol_version - Optional String Defaults to TLS_AUTO
Possible values are TLS_AUTO, TLSv1_0, TLSv1_1, TLSv1_2, TLSv1_3
[Enum: TLS_AUTO|TLSv1_0|TLSv1_1|TLSv1_2|TLSv1_3] TlsProtocol is enumeration of supported TLS versions F5 Distributed Cloud will choose the optimal TLS version

validation_params - Optional Block
Includes URL for a trust store, whether SAN verification is required and list of Subject Alt Names for verification
See Validation Params below.

A certificates block (within tls_parameters.cert_params) supports the following:

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

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

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

TLS Parameters Cert Params Validation Params

Section titled “TLS Parameters Cert Params Validation Params”

A validation_params block (within tls_parameters.cert_params) supports the following:

skip_hostname_verification - Optional Bool
When True, skip verification of hostname i.e. CN/Subject Alt Name of certificate is not matched to the connecting hostname

trusted_ca - Optional Block
Root CA Certificate Reference. Reference to Root CA Certificate
See Trusted CA below.

trusted_ca_url - Optional String
Inline Root CA Certificate

verify_subject_alt_names - Optional List
List of acceptable Subject Alt Names/CN in the peer’s certificate. When skip_hostname_verification is false and verify_subject_alt_names is empty, the hostname of the peer will be used for matching against SAN/CN of peer’s certificate

TLS Parameters Cert Params Validation Params Trusted CA

Section titled “TLS Parameters Cert Params Validation Params Trusted CA”

Deeply nested CA block collapsed for readability.

TLS Parameters Cert Params Validation Params Trusted CA Trusted CA List

Section titled “TLS Parameters Cert Params Validation Params Trusted CA Trusted CA List”

Deeply nested List block collapsed for readability.

A common_params block (within tls_parameters) supports the following:

cipher_suites - Optional List
The following list specifies the supported cipher suite TLS_AES_128_GCM_SHA256 TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

maximum_protocol_version - Optional String Defaults to TLS_AUTO
Possible values are TLS_AUTO, TLSv1_0, TLSv1_1, TLSv1_2, TLSv1_3
[Enum: TLS_AUTO|TLSv1_0|TLSv1_1|TLSv1_2|TLSv1_3] TlsProtocol is enumeration of supported TLS versions F5 Distributed Cloud will choose the optimal TLS version

minimum_protocol_version - Optional String Defaults to TLS_AUTO
Possible values are TLS_AUTO, TLSv1_0, TLSv1_1, TLSv1_2, TLSv1_3
[Enum: TLS_AUTO|TLSv1_0|TLSv1_1|TLSv1_2|TLSv1_3] TlsProtocol is enumeration of supported TLS versions F5 Distributed Cloud will choose the optimal TLS version

tls_certificates - Optional Block
TLS Certificates. Set of TLS certificates
See TLS Certificates below.

validation_params - Optional Block
Includes URL for a trust store, whether SAN verification is required and list of Subject Alt Names for verification
See Validation Params below.

TLS Parameters Common Params TLS Certificates

Section titled “TLS Parameters Common Params TLS Certificates”

A tls_certificates block (within tls_parameters.common_params) supports the following:

certificate_url - Optional String
TLS certificate. Certificate or certificate chain in PEM format including the PEM headers

custom_hash_algorithms - Optional Block
Specifies the hash algorithms to be used
See Custom Hash Algorithms below.

description_spec - Optional String
Description. Description for the certificate

disable_ocsp_stapling - Optional Block
Configuration parameter for disable OCSP stapling

private_key - Optional Block
SecretType is used in an object to indicate a sensitive/confidential field
See Private Key below.

use_system_defaults - Optional Block
Configuration parameter for use system defaults

TLS Parameters Common Params TLS Certificates Custom Hash Algorithms

Section titled “TLS Parameters Common Params TLS Certificates Custom Hash Algorithms”

Deeply nested Algorithms block collapsed for readability.

TLS Parameters Common Params TLS Certificates Private Key

Section titled “TLS Parameters Common Params TLS Certificates Private Key”

Deeply nested Key block collapsed for readability.

TLS Parameters Common Params TLS Certificates Private Key Blindfold Secret Info

Section titled “TLS Parameters Common Params TLS Certificates Private Key Blindfold Secret Info”

Deeply nested Info block collapsed for readability.

TLS Parameters Common Params TLS Certificates Private Key Clear Secret Info

Section titled “TLS Parameters Common Params TLS Certificates Private Key Clear Secret Info”

Deeply nested Info block collapsed for readability.

TLS Parameters Common Params Validation Params

Section titled “TLS Parameters Common Params Validation Params”

A validation_params block (within tls_parameters.common_params) supports the following:

skip_hostname_verification - Optional Bool
When True, skip verification of hostname i.e. CN/Subject Alt Name of certificate is not matched to the connecting hostname

trusted_ca - Optional Block
Root CA Certificate Reference. Reference to Root CA Certificate
See Trusted CA below.

trusted_ca_url - Optional String
Inline Root CA Certificate

verify_subject_alt_names - Optional List
List of acceptable Subject Alt Names/CN in the peer’s certificate. When skip_hostname_verification is false and verify_subject_alt_names is empty, the hostname of the peer will be used for matching against SAN/CN of peer’s certificate

TLS Parameters Common Params Validation Params Trusted CA

Section titled “TLS Parameters Common Params Validation Params Trusted CA”

Deeply nested CA block collapsed for readability.

TLS Parameters Common Params Validation Params Trusted CA Trusted CA List

Section titled “TLS Parameters Common Params Validation Params Trusted CA Trusted CA List”

Deeply nested List block collapsed for readability.

An upstream_conn_pool_reuse_type block supports the following:

disable_conn_pool_reuse - Optional Block
Configuration parameter for disable conn pool reuse

enable_conn_pool_reuse - Optional Block
Configuration parameter for enable conn pool reuse


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

Import is supported using the following syntax:

Terminal window
# Import using namespace/name format
terraform import f5xc_cluster.example system/example