Skip to content

f5xc_discovery Resource - terraform-provider-f5xc

Manages a Discovery resource in F5 Distributed Cloud for api to create discovery object for a site or virtual site in system namespace. configuration.

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

# Discovery Resource Example
# Manages a Discovery resource in F5 Distributed Cloud for api to create discovery object for a site or virtual site in system namespace. configuration.
terraform {
required_version = ">= 1.0"
required_providers {
f5xc = {
source = "f5xc-salesdemos/f5xc"
version = ">= 0.1.0"
}
}
}
# Basic Discovery configuration
resource "f5xc_discovery" "example" {
name = "example-discovery"
namespace = "staging"
labels = {
environment = "production"
managed_by = "terraform"
}
annotations = {
"owner" = "platform-team"
}
# Discovery configuration
discovery_k8s {
access_info {
kubeconfig_url {
clear_secret_info {
url = "string:///base64-kubeconfig"
}
}
isolated {}
}
publish_info {
disable {}
}
}
# Site selection
where {
site {
ref {
name = "example-site"
namespace = "staging"
}
network_type = "VIRTUAL_NETWORK_SITE_LOCAL_INSIDE"
}
}
}

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

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

namespace - Required String
Namespace where the Discovery 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:cluster_id - Optional String
Specify identifier for discovery cluster. This identifier can be specified in endpoint object to discover only from this discovery object

-> One of the following:discovery_consul - Optional Block
Discovery configuration for Hashicorp Consul
See Discovery Consul below for details.

discovery_k8s - Optional Block
Configuration parameter for discovery K8S
See Discovery K8S below for details.

no_cluster_id - Optional Block
Enable this option

timeouts - Optional Block
See Timeouts below for details.

where - Optional Block
NetworkSiteRefSelector defines a union of reference to site or reference to virtual_network or reference to virtual_site It is used to determine virtual network using following rules * Direct reference to virtual_network object * Site local network when refering to site object * All site local
See Where below for details.

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

id - Optional String
Unique identifier for the resource


A discovery_consul block supports the following:

access_info - Optional Block
Hashicorp Consul API server information
See Access Info below.

publish_info - Optional Block
Configuration parameter for publish info
See Publish Info below.

An access_info block (within discovery_consul) supports the following:

connection_info - Optional Block
Configuration details to access discovery service REST API
See Connection Info below.

http_basic_auth_info - Optional Block
Authentication parameters to access Hashicorp Consul
See HTTP Basic Auth Info below.

Discovery Consul Access Info Connection Info

Section titled “Discovery Consul Access Info Connection Info”

A connection_info block (within discovery_consul.access_info) supports the following:

api_server - Optional String
API server must be a fully qualified domain string and port specified as host:port pair

tls_info - Optional Block
TLS config for client of discovery service
See TLS Info below.

Discovery Consul Access Info Connection Info TLS Info

Section titled “Discovery Consul Access Info Connection Info TLS Info”

Deeply nested Info block collapsed for readability.

Discovery Consul Access Info Connection Info TLS Info Key URL

Section titled “Discovery Consul Access Info Connection Info TLS Info Key URL”

Deeply nested URL block collapsed for readability.

Discovery Consul Access Info Connection Info TLS Info Key URL Blindfold Secret Info

Section titled “Discovery Consul Access Info Connection Info TLS Info Key URL Blindfold Secret Info”

Deeply nested Info block collapsed for readability.

Discovery Consul Access Info Connection Info TLS Info Key URL Clear Secret Info

Section titled “Discovery Consul Access Info Connection Info TLS Info Key URL Clear Secret Info”

Deeply nested Info block collapsed for readability.

Discovery Consul Access Info HTTP Basic Auth Info

Section titled “Discovery Consul Access Info HTTP Basic Auth Info”

Deeply nested Info block collapsed for readability.

Discovery Consul Access Info HTTP Basic Auth Info Passwd URL

Section titled “Discovery Consul Access Info HTTP Basic Auth Info Passwd URL”

Deeply nested URL block collapsed for readability.

Discovery Consul Access Info HTTP Basic Auth Info Passwd URL Blindfold Secret Info

Section titled “Discovery Consul Access Info HTTP Basic Auth Info Passwd URL Blindfold Secret Info”

Deeply nested Info block collapsed for readability.

Discovery Consul Access Info HTTP Basic Auth Info Passwd URL Clear Secret Info

Section titled “Discovery Consul Access Info HTTP Basic Auth Info Passwd URL Clear Secret Info”

Deeply nested Info block collapsed for readability.

A publish_info block (within discovery_consul) supports the following:

disable_spec - Optional Block
Enable this option

publish - Optional Block
Enable this option

A discovery_k8s block supports the following:

access_info - Optional Block
Configuration parameter for access info
See Access Info below.

default_all - Optional Block
Configuration parameter for default all

namespace_mapping - Optional Block
Select the mapping between K8S namespaces from which services will be discovered and App Namespace to which the discovered services will be shared
See Namespace Mapping below.

publish_info - Optional Block
Configuration parameter for publish info
See Publish Info below.

An access_info block (within discovery_k8s) supports the following:

connection_info - Optional Block
Configuration details to access discovery service REST API
See Connection Info below.

isolated - Optional Block
Enable this option

kubeconfig_url - Optional Block
SecretType is used in an object to indicate a sensitive/confidential field
See Kubeconfig URL below.

reachable - Optional Block
Enable this option

A connection_info block (within discovery_k8s.access_info) supports the following:

api_server - Optional String
API server must be a fully qualified domain string and port specified as host:port pair

tls_info - Optional Block
TLS config for client of discovery service
See TLS Info below.

Discovery K8S Access Info Connection Info TLS Info

Section titled “Discovery K8S Access Info Connection Info TLS Info”

Deeply nested Info block collapsed for readability.

Discovery K8S Access Info Connection Info TLS Info Key URL

Section titled “Discovery K8S Access Info Connection Info TLS Info Key URL”

Deeply nested URL block collapsed for readability.

Discovery K8S Access Info Connection Info TLS Info Key URL Blindfold Secret Info

Section titled “Discovery K8S Access Info Connection Info TLS Info Key URL Blindfold Secret Info”

Deeply nested Info block collapsed for readability.

Discovery K8S Access Info Connection Info TLS Info Key URL Clear Secret Info

Section titled “Discovery K8S Access Info Connection Info TLS Info Key URL Clear Secret Info”

Deeply nested Info block collapsed for readability.

A kubeconfig_url block (within discovery_k8s.access_info) supports the following:

blindfold_secret_info - Optional Block
BlindfoldSecretInfoType specifies information about the Secret managed by F5XC Secret Management
See Blindfold Secret Info below.

clear_secret_info - Optional Block
ClearSecretInfoType specifies information about the Secret that is not encrypted
See Clear Secret Info below.

Discovery K8S Access Info Kubeconfig URL Blindfold Secret Info

Section titled “Discovery K8S Access Info Kubeconfig URL Blindfold Secret Info”

Deeply nested Info block collapsed for readability.

Discovery K8S Access Info Kubeconfig URL Clear Secret Info

Section titled “Discovery K8S Access Info Kubeconfig URL Clear Secret Info”

Deeply nested Info block collapsed for readability.

A namespace_mapping block (within discovery_k8s) supports the following:

items - Optional Block
Map K8S namespace(s) to App Namespaces. In Shared Configuration, Discovered Services can only be mapped to a single App Namespace, which is determined by the first matched regex
See Items below.

An items block (within discovery_k8s.namespace_mapping) supports the following:

namespace - Optional String
F5XC Application Namespaces. Select a namespace

namespace_regex - Optional String
The regex here will be used to match K8S namespace(s)

A publish_info block (within discovery_k8s) supports the following:

disable_spec - Optional Block
Enable this option

dns_delegation - Optional Block
Configuration parameter for DNS delegation
See DNS Delegation below.

publish - Optional Block
K8SPublishType
See Publish below.

publish_fqdns - Optional Block
Configuration parameter for publish fqdns

A dns_delegation block (within discovery_k8s.publish_info) supports the following:

dns_mode - Optional String Defaults to CORE_DNS
Possible values are CORE_DNS, KUBE_DNS
[Enum: CORE_DNS|KUBE_DNS] Two modes are possible CoreDNS: Whether external K8S cluster is running core-DNS KubeDNS: External K8S cluster is running kube-DNS

subdomain - Optional String
The DNS subdomain for which F5XC will respond to DNS queries

A publish block (within discovery_k8s.publish_info) supports the following:

namespace - Optional String
The namespace where the service/endpoints need to be created if it’s not included in the domain. The external K8S administrator needs to ensure that the namespace exists

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 where block supports the following:

site - Optional Block
Specifies a direct reference to a site configuration object
See Site below.

virtual_network - Optional Block
Specifies a direct reference to a network configuration object
See Virtual Network below.

virtual_site - Optional Block
Virtual Site. A reference to virtual_site object
See Virtual Site below.

A site block (within where) supports the following:

disable_internet_vip - Optional Block
Enable this option

enable_internet_vip - Optional Block
Enable this option

network_type - Optional String Defaults to VIRTUAL_NETWORK_SITE_LOCAL
Possible values are VIRTUAL_NETWORK_SITE_LOCAL, VIRTUAL_NETWORK_SITE_LOCAL_INSIDE, VIRTUAL_NETWORK_PER_SITE, VIRTUAL_NETWORK_PUBLIC, VIRTUAL_NETWORK_GLOBAL, VIRTUAL_NETWORK_SITE_SERVICE, VIRTUAL_NETWORK_VER_INTERNAL, VIRTUAL_NETWORK_SITE_LOCAL_INSIDE_OUTSIDE, VIRTUAL_NETWORK_IP_AUTO, VIRTUAL_NETWORK_VOLTADN_PRIVATE_NETWORK, VIRTUAL_NETWORK_SRV6_NETWORK, VIRTUAL_NETWORK_IP_FABRIC, VIRTUAL_NETWORK_SEGMENT, VIRTUAL_NETWORK_MANAGEMENT
[Enum: VIRTUAL_NETWORK_SITE_LOCAL|VIRTUAL_NETWORK_SITE_LOCAL_INSIDE|VIRTUAL_NETWORK_PER_SITE|VIRTUAL_NETWORK_PUBLIC|VIRTUAL_NETWORK_GLOBAL|VIRTUAL_NETWORK_SITE_SERVICE|VIRTUAL_NETWORK_VER_INTERNAL|VIRTUAL_NETWORK_SITE_LOCAL_INSIDE_OUTSIDE|VIRTUAL_NETWORK_IP_AUTO|VIRTUAL_NETWORK_VOLTADN_PRIVATE_NETWORK|VIRTUAL_NETWORK_SRV6_NETWORK|VIRTUAL_NETWORK_IP_FABRIC|VIRTUAL_NETWORK_SEGMENT|VIRTUAL_NETWORK_MANAGEMENT] Different types of virtual networks understood by the system Virtual-network of type VIRTUAL_NETWORK_SITE_LOCAL provides connectivity to public (outside) network. This is an insecure network and is connected to public internet via NAT Gateways/firwalls Virtual-network of this type is local to

ref - Optional Block
Reference. A site direct reference
See Ref below.

A ref block (within where.site) 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 virtual_network block (within where) supports the following:

ref - Optional Block
Virtual network direct reference
See Ref below.

A ref block (within where.virtual_network) 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 virtual_site block (within where) supports the following:

disable_internet_vip - Optional Block
Enable this option

enable_internet_vip - Optional Block
Enable this option

network_type - Optional String Defaults to VIRTUAL_NETWORK_SITE_LOCAL
Possible values are VIRTUAL_NETWORK_SITE_LOCAL, VIRTUAL_NETWORK_SITE_LOCAL_INSIDE, VIRTUAL_NETWORK_PER_SITE, VIRTUAL_NETWORK_PUBLIC, VIRTUAL_NETWORK_GLOBAL, VIRTUAL_NETWORK_SITE_SERVICE, VIRTUAL_NETWORK_VER_INTERNAL, VIRTUAL_NETWORK_SITE_LOCAL_INSIDE_OUTSIDE, VIRTUAL_NETWORK_IP_AUTO, VIRTUAL_NETWORK_VOLTADN_PRIVATE_NETWORK, VIRTUAL_NETWORK_SRV6_NETWORK, VIRTUAL_NETWORK_IP_FABRIC, VIRTUAL_NETWORK_SEGMENT, VIRTUAL_NETWORK_MANAGEMENT
[Enum: VIRTUAL_NETWORK_SITE_LOCAL|VIRTUAL_NETWORK_SITE_LOCAL_INSIDE|VIRTUAL_NETWORK_PER_SITE|VIRTUAL_NETWORK_PUBLIC|VIRTUAL_NETWORK_GLOBAL|VIRTUAL_NETWORK_SITE_SERVICE|VIRTUAL_NETWORK_VER_INTERNAL|VIRTUAL_NETWORK_SITE_LOCAL_INSIDE_OUTSIDE|VIRTUAL_NETWORK_IP_AUTO|VIRTUAL_NETWORK_VOLTADN_PRIVATE_NETWORK|VIRTUAL_NETWORK_SRV6_NETWORK|VIRTUAL_NETWORK_IP_FABRIC|VIRTUAL_NETWORK_SEGMENT|VIRTUAL_NETWORK_MANAGEMENT] Different types of virtual networks understood by the system Virtual-network of type VIRTUAL_NETWORK_SITE_LOCAL provides connectivity to public (outside) network. This is an insecure network and is connected to public internet via NAT Gateways/firwalls Virtual-network of this type is local to

ref - Optional Block
Virtual_site direct reference
See Ref below.

A ref block (within where.virtual_site) 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


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_discovery.example system/example