layout | page_title | description |
---|---|---|
Provider: Elasticstack |
The Elasticstack provider provides the resources to interact with Elastic stack products. |
The Elasticstack provider provides the resources to interact with Elastic stack products.
It is recommended to setup at least minimum security, https://www.elastic.co/guide/en/elasticsearch/reference/current/security-minimal-setup.html in order to interract with the Elasticsearch and be able to use the provider's full capabilities
The Elasticstack provider offers few different ways of providing credentials for authentication. The following methods are supported:
- Static credentials
- Environment variables
- Each
elasticsearch
resource supports anelasticsearch_connection
block, allowing use of the same provider to configure many different clusters at the same time
Default static credentials can be provided by adding the username
, password
and endpoints
in elasticsearch
block:
provider "elasticstack" {
elasticsearch {
username = "elastic"
password = "changeme"
endpoints = ["http://localhost:9200"]
}
}
You can provide your credentials for the default connection via the ELASTICSEARCH_USERNAME
, ELASTICSEARCH_PASSWORD
and comma-separated list ELASTICSEARCH_ENDPOINTS
,
environment variables, representing your user, password and Elasticsearch API endpoints respectively.
provider "elasticstack" {
elasticsearch {}
}
See docs related to the specific resources.
provider "elasticstack" {
elasticsearch {
username = "elastic"
password = "changeme"
endpoints = ["http://localhost:9200"]
}
}
- elasticsearch (Block List, Max: 1) Default Elasticsearch connection configuration block. (see below for nested schema)
Optional:
- ca_file (String) Path to a custom Certificate Authority certificate
- endpoints (List of String, Sensitive) A comma-separated list of endpoints where the terraform provider will point to, this must include the http(s) schema and port number.
- insecure (Boolean) Disable TLS certificate validation
- password (String, Sensitive) Password to use for API authentication to Elasticsearch.
- username (String) Username to use for API authentication to Elasticsearch.