Skip to content

Latest commit

 

History

History
87 lines (59 loc) · 2.57 KB

File metadata and controls

87 lines (59 loc) · 2.57 KB
layout page_title description
Provider: Elasticstack
The Elasticstack provider provides the resources to interact with Elastic stack products.

Elasticstack Provider

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

Authentication

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 an elasticsearch_connection block, allowing use of the same provider to configure many different clusters at the same time

Static credentials

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"]
  }
}

Environment Variables

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 {}
}

Per resource credentials

See docs related to the specific resources.

Example Usage

provider "elasticstack" {
  elasticsearch {
    username  = "elastic"
    password  = "changeme"
    endpoints = ["http://localhost:9200"]
  }
}

Schema

Optional

  • elasticsearch (Block List, Max: 1) Default Elasticsearch connection configuration block. (see below for nested schema)

Nested Schema for elasticsearch

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.