You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+37-4Lines changed: 37 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,9 @@ The following methods are supported:
26
26
27
27
### Static credentials
28
28
29
-
Default static credentials can be provided by adding the `username`, `password` and `endpoints` in `elasticsearch` block:
29
+
#### Elasticsearch
30
+
31
+
Default static credentials can be provided by adding the `username`, `password` and `endpoints` in the `elasticsearch` block:
30
32
31
33
```terraform
32
34
provider "elasticstack" {
@@ -49,16 +51,47 @@ provider "elasticstack" {
49
51
}
50
52
```
51
53
54
+
#### Kibana
55
+
56
+
Default static credentials can be provided by adding the `username`, `password` and `endpoints` in the `kibana` block:
57
+
58
+
```terraform
59
+
provider "elasticstack" {
60
+
kibana {
61
+
username = "elastic"
62
+
password = "changeme"
63
+
endpoints = ["http://localhost:5601"]
64
+
}
65
+
}
66
+
```
67
+
68
+
If no credentials are supplied the provider will fall back to using those provided in the `elasticsearch` block.
69
+
52
70
### Environment Variables
53
71
54
-
You can provide your credentials for the default connection via the `ELASTICSEARCH_USERNAME`, `ELASTICSEARCH_PASSWORD` and comma-separated list `ELASTICSEARCH_ENDPOINTS`,
55
-
environment variables, representing your user, password and Elasticsearch API endpoints respectively.
72
+
The provider configuration can be specified through environment variables.
73
+
74
+
For Elasticsearch resources, you can use the following variables:
75
+
-`ELASTICSEARCH_USERNAME` - The username to use for Elasticsearch authentication
76
+
-`ELASTICSEARCH_PASSWORD` - The password to use for Elasticsearch authentication
77
+
-`ELASTICSEARCH_ENDPOINTS` - A comma separated list of Elasticsearch hosts to connect to
78
+
-`ELASTICSEARCH_API_KEY` - An Elasticsearch API key to use instead of `ELASTICSEARCH_USERNAME` and `ELASTICSEARCH_PASSWORD`
79
+
80
+
Kibana resources will re-use any Elasticsearch credentials specified, these may be overridden with the following variables:
81
+
-`KIBANA_USERNAME` - The username to use for Kibana authentication
82
+
-`KIBANA_PASSWORD` - The password to use for Kibana authentication
83
+
-`KIBANA_ENDPOINT` - The Kibana host to connect to
56
84
57
-
Alternatively the `ELASTICSEARCH_API_KEY` variable can be specified instead of `ELASTICSEARCH_USERNAME` and `ELASTICSEARCH_PASSWORD`.
85
+
Fleet resources will re-use any Kibana or Elasticsearch credentials specified, these may be overridden with the following variables:
86
+
-`FLEET_USERNAME` - The username to use for Kibana authentication
87
+
-`FLEET_PASSWORD` - The password to use for Kibana authentication
88
+
-`FLEET_ENDPOINT` - The Kibana host to connect to. ** Note the Fleet API is hosted within Kibana. This must be a Kibana HTTP host **
89
+
-`FLEET_API_KEY` - API key to use for authentication to Fleet
0 commit comments