Skip to content

Commit b06b0da

Browse files
author
Adam Locke
authored
[DOCS] Clarifying env variable substitution (elastic#57370) (elastic#57733)
* Clarifying environment variable substitution in the ES configuration YAML * Update code snippet * Remove extraneous quotes from string example * Incorporating review feedback
1 parent 7ccd056 commit b06b0da

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/reference/setup/configuration.asciidoc

+9-2
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,21 @@ path.logs: /var/log/elasticsearch
7171

7272
Environment variables referenced with the `${...}` notation within the
7373
configuration file will be replaced with the value of the environment
74-
variable, for instance:
74+
variable. For example:
7575

7676
[source,yaml]
7777
--------------------------------------------------
7878
node.name: ${HOSTNAME}
7979
network.host: ${ES_NETWORK_HOST}
8080
--------------------------------------------------
8181

82+
Values for environment variables must be simple strings. Use a comma-separated string to provide values that Elasticsearch will parse as a list. For example, Elasticsearch will split the following string into a list of values for the `${HOSTNAME}` environment variable:
83+
84+
[source,yaml]
85+
----
86+
export HOSTNAME=“host1,host2"
87+
----
88+
8289
[discrete]
8390
[[cluster-setting-types]]
8491
=== Cluster and node setting types
@@ -88,7 +95,7 @@ Cluster and node settings can be categorized based on how they are configured:
8895
[[dynamic-cluster-setting]]
8996
Dynamic::
9097
You can configure and update dynamic settings on a running cluster using the
91-
<<cluster-update-settings,cluster update settings API>>.
98+
<<cluster-update-settings,cluster update settings API>>.
9299
+
93100
You can also configure dynamic settings locally on an unstarted or shut down
94101
node using `elasticsearch.yml`.

0 commit comments

Comments
 (0)