- Home
- Documentation
- resources
- f5xc_discovery Resource - terraform-provider-f5xc
f5xc_discovery Resource - terraform-provider-f5xc
f5xc_discovery (Resource)
Section titled “f5xc_discovery (Resource)”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.
Example Usage
Section titled “Example Usage”# 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 configurationresource "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" } }}Argument Reference
Section titled “Argument Reference”🔶 High Risk Operations — Some operations on this resource have high danger level. Destructive operations may require confirmation.
Metadata Argument Reference
Section titled “Metadata Argument Reference”• 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
Spec Argument Reference
Section titled “Spec Argument Reference”-> 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.
Attributes Reference
Section titled “Attributes Reference”In addition to all arguments above, the following attributes are exported:
• id - Optional String
Unique identifier for the resource
Discovery Consul
Section titled “Discovery Consul”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.
Discovery Consul Access Info
Section titled “Discovery Consul Access Info”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.
Discovery Consul Publish Info
Section titled “Discovery Consul Publish Info”A publish_info block (within discovery_consul) supports the following:
• disable_spec - Optional Block
Enable this option
• publish - Optional Block
Enable this option
Discovery K8S
Section titled “Discovery K8S”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.
Discovery K8S Access Info
Section titled “Discovery K8S Access Info”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
Discovery K8S Access Info Connection Info
Section titled “Discovery K8S Access Info Connection Info”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.
Discovery K8S Access Info Kubeconfig URL
Section titled “Discovery K8S Access Info Kubeconfig URL”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.
Discovery K8S Namespace Mapping
Section titled “Discovery K8S Namespace Mapping”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.
Discovery K8S Namespace Mapping Items
Section titled “Discovery K8S Namespace Mapping Items”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)
Discovery K8S Publish Info
Section titled “Discovery K8S Publish Info”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
Discovery K8S Publish Info DNS Delegation
Section titled “Discovery K8S Publish Info DNS Delegation”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
Discovery K8S Publish Info Publish
Section titled “Discovery K8S Publish Info Publish”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
Timeouts
Section titled “Timeouts”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.
Where Site
Section titled “Where Site”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.
Where Site Ref
Section titled “Where Site Ref”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
Where Virtual Network
Section titled “Where Virtual Network”A virtual_network block (within where) supports the following:
• ref - Optional Block
Virtual network direct reference
See Ref below.
Where Virtual Network Ref
Section titled “Where Virtual Network Ref”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
Where Virtual Site
Section titled “Where Virtual Site”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.
Where Virtual Site Ref
Section titled “Where Virtual Site Ref”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
Common Types
Section titled “Common Types”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.
| Field | Type | Description |
|---|---|---|
name | String | Name of the referenced object |
namespace | String | Namespace containing the referenced object |
tenant | String | Tenant of the referenced object (system-managed) |
Transformers {#common-transformers}
Section titled “Transformers {#common-transformers}”Transformers apply transformations to input values before matching. Multiple transformers can be applied in order.
| Value | Description |
|---|---|
LOWER_CASE | Convert to lowercase |
UPPER_CASE | Convert to uppercase |
BASE64_DECODE | Decodebase64 content |
NORMALIZE_PATH | Normalize URL path |
REMOVE_WHITESPACE | Remove whitespace characters |
URL_DECODE | Decode URL-encoded characters |
TRIM_LEFT | Trim leading whitespace |
TRIM_RIGHT | Trim trailing whitespace |
TRIM | Trim both leading and trailing whitespace |
HTTP Methods {#common-http-methods}
Section titled “HTTP Methods {#common-http-methods}”HTTP methods used for request matching.
| Value | Description |
|---|---|
ANY | Match any HTTP method |
GET | HTTP GET request |
HEAD | HTTP HEAD request |
POST | HTTP POST request |
PUT | HTTP PUT request |
DELETE | HTTP DELETE request |
CONNECT | HTTP CONNECT request |
OPTIONS | HTTP OPTIONS request |
TRACE | HTTP TRACE request |
PATCH | HTTP PATCH request |
COPY | HTTP COPY request (WebDAV) |
TLS Fingerprints {#common-tls-fingerprints}
Section titled “TLS Fingerprints {#common-tls-fingerprints}”TLS fingerprint categories for malicious client detection.
| Value | Description |
|---|---|
TLS_FINGERPRINT_NONE | No fingerprint matching |
ANY_MALICIOUS_FINGERPRINT | Match any known malicious fingerprint |
ADWARE | Adware-associated fingerprints |
DRIDEX | Dridex malware fingerprints |
GOOTKIT | Gootkit malware fingerprints |
RANSOMWARE | Ransomware-associated fingerprints |
TRICKBOT | Trickbot 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.
| Value | Description |
|---|---|
SPAM_SOURCES | Known spam sources |
WINDOWS_EXPLOITS | Windows exploit sources |
WEB_ATTACKS | Web attack sources |
BOTNETS | Known botnet IPs |
SCANNERS | Network scanner IPs |
REPUTATION | Poor reputation IPs |
PHISHING | Phishing-related IPs |
PROXY | Anonymous proxy IPs |
MOBILE_THREATS | Mobile threat sources |
TOR_PROXY | Tor exit nodes |
DENIAL_OF_SERVICE | DoS attack sources |
NETWORK | Known bad network ranges |
Import
Section titled “Import”Import is supported using the following syntax:
# Import using namespace/name formatterraform import f5xc_discovery.example system/example