Or, by using an elasticsearch_connection
block with the same parameters on a per-resource level. This lets you use the provider to configure multiple Elastic Stack instances in a single configuration file and spin up a fully configured Elastic deployment on Elastic Cloud.
The Elastic Stack, as code
The Elastic Stack Terraform provider allows you to manage crucial Elasticsearch resources (and in the future, Elastic Stack resources) like:
- Index templates
- Snapshot repositories, snapshot policies
- ILM policies
- Users
- Roles
Using the Elastic Stack provider with Elastic Cloud
The example below breaks down how to use the Elastic Stack provider to jumpstart and configure an Elastic Cloud deployment. Note that the provider works the same with both Elastic Cloud deployments, as well as on-premises or self-managed Elastic Stack clusters.
You can refer to a previous blog post on Elastic Cloud deployment resources. This post focuses on the Elastic Stack provider, its current capabilities, and partially builds on top of the previous blog’s concepts.
In order to use both the Elastic Cloud provider (to spin up an Elastic Stack on Elastic Cloud) and the Elastic Stack provider, simply use an elasticsearch_connection
block alongside outputs from the ec_deployment
resource.
First set up your deployment using the Elastic Cloud provider (ec), and create it with several data tier configurations:
Leave a Reply