The consul_config_entry_service_defaults
resource configures a service defaults config entry that contains common configuration settings for service mesh services, such as upstreams and gateways.
resource "consul_config_entry_service_defaults" "dashboard" {
name = "dashboard"
upstream_config {
defaults = {
mesh_gateway = {
mode = "local"
}
limits = {
max_connections = 512
max_pending_requests = 512
max_concurrent_requests = 512
}
}
overrides {
name = "counting"
mesh_gateway {
mode = "remote"
}
}
}
}
expose
(Block Set, Min: 1) Specifies default configurations for exposing HTTP paths through Envoy. (see below for nested schema)name
(String) Specifies the name of the service you are setting the defaults for.protocol
(String) Specifies the default protocol for the service.balance_inbound_connections
(String) Specifies the strategy for allocating inbound connections to the service across Envoy proxy threads.destination
(Block Set) Configures the destination for service traffic through terminating gateways. (see below for nested schema)envoy_extensions
(Block List) List of extensions to modify Envoy proxy configuration. (see below for nested schema)external_sni
(String) Specifies the TLS server name indication (SNI) when federating with an external system.local_connect_timeout_ms
(Number) Specifies the number of milliseconds allowed for establishing connections to the local application instance before timing out.local_request_timeout_ms
(Number) Specifies the timeout for HTTP requests to the local application instance.max_inbound_connections
(Number) Specifies the maximum number of concurrent inbound connections to each service instance.mesh_gateway
(Block Set) Specifies the default mesh gateway mode field for the service. (see below for nested schema)meta
(Map of String) Specifies a set of custom key-value pairs to add to the Consul KV store.mode
(String) Specifies a mode for how the service directs inbound and outbound traffic.mutual_tls_mode
(String) Controls whether mutual TLS is required for incoming connections to this service. This setting is only supported for services with transparent proxy enabled.namespace
(String) Specifies the Consul namespace that the configuration entry applies to.partition
(String) Specifies the name of the name of the Consul admin partition that the configuration entry applies to. Refer to Admin Partitions for additional information.transparent_proxy
(Block Set) Controls configurations specific to proxies in transparent mode. Refer to Transparent Proxy Mode for additional information. (see below for nested schema)upstream_config
(Block Set) Controls default upstream connection settings and custom overrides for individual upstream services. (see below for nested schema)id
(String) The ID of this resource.expose
Optional:
checks
(Boolean)paths
(Block List) (see below for nested schema)expose.paths
Optional:
listener_port
(Number)local_path_port
(Number)path
(String)protocol
(String)destination
Required:
addresses
(List of String)port
(Number)envoy_extensions
Optional:
arguments
(Map of String)consul_version
(String)envoy_version
(String)name
(String)required
(Boolean)mesh_gateway
Required:
mode
(String)transparent_proxy
Required:
dialed_directly
(Boolean)outbound_listener_port
(Number)upstream_config
Optional:
defaults
(Block Set) Specifies configurations that set default upstream settings. For information about overriding the default configurations for in for individual upstreams, refer to UpstreamConfig.Overrides. (see below for nested schema)overrides
(Block List) Specifies options that override the default upstream configurations for individual upstreams. (see below for nested schema)upstream_config.defaults
Optional:
balance_outbound_connections
(String) Sets the strategy for allocating outbound connections from upstreams across Envoy proxy threads.connect_timeout_ms
(Number)limits
(Block Set) Map that specifies a set of limits to apply to when connecting upstream services. (see below for nested schema)mesh_gateway
(Block Set) Specifies the default mesh gateway mode field for all upstreams. (see below for nested schema)passive_health_check
(Block Set) Map that specifies a set of rules that enable Consul to remove hosts from the upstream cluster that are unreachable or that return errors. (see below for nested schema)protocol
(String) Specifies the default protocol for the service.upstream_config.defaults.limits
Optional:
max_concurrent_requests
(Number) Specifies the maximum number of concurrent requests.max_connections
(Number) Specifies the maximum number of connections a service instance can establish against the upstream.max_pending_requests
(Number) Specifies the maximum number of requests that are queued while waiting for a connection to establish.upstream_config.defaults.mesh_gateway
Optional:
mode
(String)upstream_config.defaults.passive_health_check
Optional:
base_ejection_time
(String) Specifies the minimum amount of time that an ejected host must remain outside the cluster before rejoining.enforcing_consecutive_5xx
(Number) Specifies a percentage that indicates how many times out of 100 that Consul ejects the host when it detects an outlier status.interval
(String) Specifies the time between checks.max_ejection_percent
(Number) Specifies the maximum percentage of an upstream cluster that Consul ejects when the proxy reports an outlier.max_failures
(Number) Specifies the number of consecutive failures allowed per check interval. If exceeded, Consul removes the host from the load balancer.upstream_config.overrides
Optional:
balance_outbound_connections
(String) Sets the strategy for allocating outbound connections from upstreams across Envoy proxy threads.connect_timeout_ms
(Number)envoy_listener_json
(String)limits
(Block Set) Map that specifies a set of limits to apply to when connecting upstream services. (see below for nested schema)mesh_gateway
(Block Set) Specifies the default mesh gateway mode field for all upstreams. (see below for nested schema)name
(String) Specifies the name of the service you are setting the defaults for.namespace
(String) Specifies the namespace containing the upstream service that the configuration applies to.partition
(String) Specifies the name of the name of the Consul admin partition that the configuration entry applies to.passive_health_check
(Block Set) Map that specifies a set of rules that enable Consul to remove hosts from the upstream cluster that are unreachable or that return errors. (see below for nested schema)peer
(String) Specifies the peer name of the upstream service that the configuration applies to.protocol
(String) Specifies the default protocol for the service.upstream_config.overrides.limits
Optional:
max_concurrent_requests
(Number) Specifies the maximum number of concurrent requests.max_connections
(Number) Specifies the maximum number of connections a service instance can establish against the upstream.max_pending_requests
(Number) Specifies the maximum number of requests that are queued while waiting for a connection to establish.upstream_config.overrides.mesh_gateway
Optional:
mode
(String)upstream_config.overrides.passive_health_check
Optional:
base_ejection_time
(String) Specifies the minimum amount of time that an ejected host must remain outside the cluster before rejoining.enforcing_consecutive_5xx
(Number) Specifies a percentage that indicates how many times out of 100 that Consul ejects the host when it detects an outlier status.interval
(String) Specifies the time between checks.max_ejection_percent
(Number) Specifies the maximum percentage of an upstream cluster that Consul ejects when the proxy reports an outlier.max_failures
(Number) Specifies the number of consecutive failures allowed per check interval. If exceeded, Consul removes the host from the load balancer.