mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
Remove unnecessary quotes from HCL variables
This commit is contained in:
parent
ddc09b661c
commit
ab9c7d2dd4
@ -151,7 +151,7 @@ A script check:
|
|||||||
```hcl
|
```hcl
|
||||||
check = {
|
check = {
|
||||||
id = "mem-util"
|
id = "mem-util"
|
||||||
name = "Memory utilization"
|
name = "Memory utilization"
|
||||||
args = ["/usr/local/bin/check_mem.py", "-limit", "256MB"]
|
args = ["/usr/local/bin/check_mem.py", "-limit", "256MB"]
|
||||||
interval = "10s"
|
interval = "10s"
|
||||||
timeout = "1s"
|
timeout = "1s"
|
||||||
@ -186,12 +186,12 @@ check = {
|
|||||||
tls_skip_verify = false
|
tls_skip_verify = false
|
||||||
method = "POST"
|
method = "POST"
|
||||||
header = {
|
header = {
|
||||||
Content-Type = ["application/json"]
|
Content-Type = ["application/json"]
|
||||||
}
|
}
|
||||||
body = "{\"method\":\"health\"}"
|
body = "{\"method\":\"health\"}"
|
||||||
disable_redirects = true
|
disable_redirects = true
|
||||||
interval = "10s"
|
interval = "10s"
|
||||||
timeout = "1s"
|
timeout = "1s"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -248,11 +248,11 @@ A TTL check:
|
|||||||
<CodeTabs heading="TTL Check">
|
<CodeTabs heading="TTL Check">
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
check = {
|
check = {
|
||||||
id = "web-app"
|
id = "web-app"
|
||||||
name = "Web App Status"
|
name = "Web App Status"
|
||||||
notes = "Web app does a curl internally every 10 seconds"
|
notes = "Web app does a curl internally every 10 seconds"
|
||||||
ttl = "30s"
|
ttl = "30s"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -305,11 +305,11 @@ A gRPC check for the whole application:
|
|||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
check = {
|
check = {
|
||||||
id = "mem-util"
|
id = "mem-util"
|
||||||
name = "Service health status"
|
name = "Service health status"
|
||||||
grpc = "127.0.0.1:12345"
|
grpc = "127.0.0.1:12345"
|
||||||
grpc_use_tls = true
|
grpc_use_tls = true
|
||||||
interval = "10s"
|
interval = "10s"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -482,11 +482,11 @@ health check definition, like so:
|
|||||||
<CodeTabs heading="Status Field Example">
|
<CodeTabs heading="Status Field Example">
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
check = {
|
check = {
|
||||||
"id": "mem",
|
id = "mem"
|
||||||
"args": ["/bin/check_mem", "-limit", "256MB"]
|
args = ["/bin/check_mem", "-limit", "256MB"]
|
||||||
"interval": "10s"
|
interval = "10s"
|
||||||
"status": "passing"
|
status = "passing"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -516,10 +516,10 @@ provided by adding a `service_id` field to a check configuration:
|
|||||||
<CodeTabs heading="Status Field Example">
|
<CodeTabs heading="Status Field Example">
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
check = {
|
check = {
|
||||||
id = "web-app"
|
id = "web-app"
|
||||||
name = "Web App Status"
|
name = "Web App Status"
|
||||||
service_id = "web-app"
|
service_id = "web-app"
|
||||||
ttl = "30s"
|
ttl = "30s"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -635,7 +635,7 @@ checks = [
|
|||||||
name = "HTTP TCP on port 80"
|
name = "HTTP TCP on port 80"
|
||||||
tcp = "localhost:80"
|
tcp = "localhost:80"
|
||||||
interval = "10s"
|
interval = "10s"
|
||||||
timeout = "1s"
|
timeout = "1s"
|
||||||
success_before_passing = 3
|
success_before_passing = 3
|
||||||
failures_before_warning = 1
|
failures_before_warning = 1
|
||||||
failures_before_critical = 3
|
failures_before_critical = 3
|
||||||
|
@ -460,19 +460,19 @@ In the following example, Vault is registered as a service and provided access t
|
|||||||
```hcl
|
```hcl
|
||||||
# Provide KV visibility to all agents.
|
# Provide KV visibility to all agents.
|
||||||
agent_prefix "" {
|
agent_prefix "" {
|
||||||
"policy" = "read"
|
policy = "read"
|
||||||
}
|
}
|
||||||
# Enable resources prefixed with 'vault/' to write to the KV
|
# Enable resources prefixed with 'vault/' to write to the KV
|
||||||
key_prefix "vault/" {
|
key_prefix "vault/" {
|
||||||
"policy" = "write"
|
policy = "write"
|
||||||
}
|
}
|
||||||
# Enable the vault service to write to the KV
|
# Enable the vault service to write to the KV
|
||||||
service "vault" {
|
service "vault" {
|
||||||
"policy" = "write"
|
policy = "write"
|
||||||
}
|
}
|
||||||
# Enable the agent to initialize a new session.
|
# Enable the agent to initialize a new session.
|
||||||
session_prefix "" {
|
session_prefix "" {
|
||||||
"policy" = "write"
|
policy = "write"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -38,12 +38,12 @@ Specify the value of the `SecretID` attribute with the `token` parameter when co
|
|||||||
<CodeBlockConfig lineNumbers highlight="6">
|
<CodeBlockConfig lineNumbers highlight="6">
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
"service" = {
|
service = {
|
||||||
"id" = "redis"
|
id = "redis"
|
||||||
"name" = "redis"
|
name = "redis"
|
||||||
...
|
...
|
||||||
"namespace" = "foo"
|
namespace = "foo"
|
||||||
"token" = "233b604b-b92e-48c8-a253-5f11514e4b50"
|
token = "233b604b-b92e-48c8-a253-5f11514e4b50"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -86,8 +86,8 @@ In the following example, the agent is configured to use a default token:
|
|||||||
<CodeTabs>
|
<CodeTabs>
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
"tokens" = {
|
tokens = {
|
||||||
"default" = "233b604b-b92e-48c8-a253-5f11514e4b50"
|
default = "233b604b-b92e-48c8-a253-5f11514e4b50"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user