Skip to content

Commit ada047d

Browse files
shaneogtlrx
authored andcommitted
[discovery-gce] Align code examples and documentation (#28876)
The docs state that `_gce_` is recommended but the code sample states that `_gce:hostname_` is recommended. This aligns the code sample with the documentation. Also replace `type` with `zen.hosts_provider` as discovery.type was removed in #25080.
1 parent 9350d8e commit ada047d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/plugins/discovery-gce.asciidoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ Examples:
8383
--------------------------------------------------
8484
# get the IP address from network interface 1
8585
network.host: _gce:privateIp:1_
86-
# shortcut for _gce:privateIp:0_
87-
network.host: _gce_
88-
# Using GCE internal hostname (recommended)
86+
# Using GCE internal hostname
8987
network.host: _gce:hostname_
88+
# shortcut for _gce:privateIp:0_ (recommended)
89+
network.host: _gce_
9090
--------------------------------------------------
9191

9292
[[discovery-gce-usage-short]]
@@ -227,7 +227,7 @@ cloud:
227227
project_id: es-cloud
228228
zone: europe-west1-a
229229
discovery:
230-
type: gce
230+
zen.hosts_provider: gce
231231
--------------------------------------------------
232232

233233

@@ -341,7 +341,7 @@ cloud:
341341
project_id: <your-google-project-id>
342342
zone: ["<your-zone1>", "<your-zone2>"]
343343
discovery:
344-
type: gce
344+
zen.hosts_provider: gce
345345
--------------------------------------------------
346346

347347

@@ -377,7 +377,7 @@ cloud:
377377
project_id: es-cloud
378378
zone: europe-west1-a
379379
discovery:
380-
type: gce
380+
zen.hosts_provider: gce
381381
gce:
382382
tags: elasticsearch, dev
383383
--------------------------------------------------
@@ -492,7 +492,7 @@ cloud:
492492
project_id: es-cloud
493493
zone: europe-west1-a
494494
discovery:
495-
type: gce
495+
zen.hosts_provider: gce
496496
--------------------------------------------------
497497

498498
Replaces `project_id` and `zone` with your settings.

0 commit comments

Comments
 (0)