2023-10-05 14:33:44 +00:00
---
layout: docs
page_title: Consul server configuration JSON schema reference
description: Learn about the fields available in the JSON scheme for configuring ECS task connections to Consul servers.
---
# Consul server configuration JSON schema reference
2024-05-22 22:36:57 +00:00
This topic provides reference information about the JSON schema used to build the `config.tf` file. Refer to [Configure Consul server settings](/consul/docs/ecs/deploy/terraform#configure-consul-server-settings) for information about how Consul on ECS uses the JSON schema.
2023-10-05 14:33:44 +00:00
2023-10-19 15:24:17 +00:00
## Configuration model
The following list describes the attributes, data types, and default values, if any, in the `config.tf` file. Click on a value to learn more about the attribute.
2024-05-22 22:36:57 +00:00
- [`consulServers`](#consulservers): map
2023-10-19 15:24:17 +00:00
- [`hosts`](#consulservers-hosts): string
- [`skipServerWatch`](#consulservers-hosts): boolean | `false`
2024-05-22 22:36:57 +00:00
- [`defaults`](#consulservers-defaults): map
- [`caCertFile`](#consulservers-defaults): string
- [`tlsServerName`](#consulservers-defaults): string
2023-10-19 15:24:17 +00:00
- [`tls`](#consulservers-defaults): boolean | `false`
2024-05-22 22:36:57 +00:00
- [`grpc`](#consulservers-grpc): map
- [`port`](#consulservers-grpc): number
- [`caCertFile`](#consulservers-grpc): string
- [`tlsServerName`](#consulservers-grpc): string
2023-10-19 15:24:17 +00:00
- [`tls`](#consulservers-grpc): boolean | `false`
2024-05-22 22:36:57 +00:00
- [`http`](#consulservers-http): map
2023-10-19 15:24:17 +00:00
- [`https`](#consulservers-http): boolean | `false`
- [`port`](#consulservers-http): number
- [`caCertFile`](#consulservers-http): string
- [`tlsServerName`](#consulservers-http): string
- [`tls`](#consulservers-http): boolean | `false`
## Specification
2024-05-22 22:36:57 +00:00
This section provides details about the attributes in the `config.tf` file.
2023-10-19 15:24:17 +00:00
### `consulServers`
2024-05-22 22:36:57 +00:00
Parent-level attribute containing all of the server configurations. All other configurations in the file are children of the `consulServers` attribute.
2023-10-19 15:24:17 +00:00
#### Values
- Default: None
- Data type: Map
### `consulServers.hosts`
2024-05-22 22:36:57 +00:00
Map that contains the `skipServerWatch` configuration for Consul server hosts.
2023-10-19 15:24:17 +00:00
#### Values
- Default: None
- Data type: Map
### `consulServers.hosts.skipServerWatch`
2024-05-22 22:36:57 +00:00
Boolean that disables watches on the Consul server. Set to `true` if the Consul server is already behind a load balancer.
2023-10-19 15:24:17 +00:00
#### Values
- Default: `false`
- Data type: Boolean
### `consulServers.defaults`
2024-05-22 22:36:57 +00:00
Map of default server configurations. Defaults apply to gRPC and HTTP traffic.
2023-10-19 15:24:17 +00:00
#### Values
- Default: None
- Data type: Map
The following table describes the attributes available in the `defaults` configuration:
| Attribute | Description | Data type | Default |
| --- | --- | --- | --- |
| `caCertFile` | Specifies the path to the certificate .pem file. | String | None |
| `tlsServerName` | Specifies the name of the TLS server. | String | None |
| `tls` | Enables TLS on the server. | Boolean | `false` |
### `consulServers.grpc`
2024-05-22 22:36:57 +00:00
Map of server configuration for gRPC traffic that override attributes defined in `consulServers.defaults`.
2023-10-19 15:24:17 +00:00
#### Values
- Default: None
- Data type: Map
The following table describes the attributes available in the `grpc` configuration:
| Attribute | Description | Data type | Default |
| --- | --- | --- | --- |
| `port` | Specifies the port number for gRPC communication. | Number | None |
| `caCertFile` | Specifies the path to the certificate .pem file. | String | None |
| `tlsServerName` | Specifies the name of the TLS server. | String | None |
| `tls` | Enables TLS for gRPC traffic on the server. | Boolean | `false` |
### `consulServers.http`
2024-05-22 22:36:57 +00:00
Map of server configuration for HTTP traffic that override attributes defined in `consulServers.defaults`.
2023-10-19 15:24:17 +00:00
#### Values
- Default: None
- Data type: Map
The following table describes the attributes available in the `grpc` configuration:
| Attribute | Description | Data type | Default |
| --- | --- | --- | --- |
| `https` | Enables HTTPS. | Boolean | `false` |
| `port` | Specifies the port number for HTTPS communication. | Number | None |
| `caCertFile` | Specifies the path to the certificate .pem file. | String | None |
| `tlsServerName` | Specifies the name of the TLS server. | String | None |
| `tls` | Enables TLS for HTTPS traffic on the server. | Boolean | `false` |