README ¶
Elastic Search Service (ESS)
This module simplifies provisioning ELK Services within a Elastic Search Service (ESS) cluster using Terraform.
Supported Scenarios
- Provisioning Elasticsearch clusters on ESS.
Note: Support will be for CREATE
and DELETE
scenarios until there exists a native Terraform Provider for ESS. Until then we are limited to using create and destroy provisioners. There are no update
provisioners based on the Terraform codebase and documentation.
Unsupported Scenarios
Other ELK Stack services are not yet supported by this module. However, they may be supported based on subsequent design and implementation spikes. Other ELK services include:
Usage
Pre-requisites
This module assumes that an account for ESS has been setup. There are instructions to do this located on https://www.elastic.co/. You will need to provide the following information in order to authenticate with ESS:
- API Key, Bearer Token or Basic Auth header. Documentation for this is TBD.
Module Usage
module "elastic_cluster" {
source = "../elastic-search-service/"
cloud = "azure"
region = "eastus2"
name = "foo deployment"
auth_token = "********"
auth_type = "..."
deployment_template_id = "azure-io-optimized"
deployment_configuration_id = "azure.data.highio.l32sv2"
elasticsearch = {
version = "6.8.7"
cluster_topology = {
memory_per_node = 1024
node_count_per_zone = 1
zone_count = 1
node_type = {
data = true
ingest = true
master = true
ml = false
}
}
}
}
output "cluster_properties" {
description = "Properties of the deployed cluster"
value = module.elastic_cluster.cluster_properties
}
Variables
See variables.tf for a full description of all the configuration values that are supported.
Outputs
output "cluster_properties" {
description = "Properties of the deployed cluster"
type = object({
elastic_search = object({
cluster_id = string
username = string
password = string
endpoint = string
})
})
}
Implementation Strategy
This module is different from most in that there is no underlying Terraform provider that can be used to provision resources in any of Elastic's products. Because of this we have decided to provision resources using shell scripts (located in the scripts directory). The script is unix compatible and will not work on Windows without using WSL.
Elastic has indicated that a Terraform Provider for Elastic products is in the works. At that time, this module should be updated to leverage the native Terraform provider as it will be easier to maintain in the long term and will also support resource updates.
License
Copyright © Microsoft Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.