News

Elastic and HashiCorp partner to bring infrastructure-as-code to Elastic Cloud

Operations and SRE teams often rely on HashiCorp Terraform to safely manage production-related infrastructure using methodologies such as infrastructure as code, which allows you to apply peer-reviewed infrastructure changes in an automated and controlled fashion.

We’re expanding our partnership with HashiCorp, a leader in multi-cloud infrastructure automation software, to offer a verified Terraform provider — bringing you the best possible infrastructure-as-code experience when you use Terraform to deploy and manage Elastic Cloud.

The HashiCorp Terraform verified provider for  Elastic Cloud works with Elasticsearch Service on Elastic Cloud, Elastic Cloud Enterprise, and Elasticsearch Service Private environments.

With the Elastic Cloud Terraform provider, you can use the same automation code to deploy Elastic Cloud deployments across all public clouds available in Elasticsearch Service on Elastic Cloud, or on premises using Elastic Cloud Enterprise. The provider builds upon the beta version to allow you to leverage Elastic Cloud features, such as autoscaling and deployment aliases. You can also take advantage of new deployment extensions and run the provider on ARM64 devices. 

Deployment autoscaling

You can use the Terraform provider to control and modify your deployment’s autoscaling policy — regardless of deployment topology or data tier configuration. Create deployments that dynamically scale in size to help ensure your deployment remains performant and reliable. As resource utilization increases, so does your resource capacity.  

Deployment aliases

You can also create a deployment endpoint alias that allows you access to your deployment through a user-specified name that is available via the Internet. Manage your deployment aliases using variables and tfvars files. This helps you reduce management overhead and enable configuration management for your Beat clients by managing cluster names as code.

Deployment aliases and autoscaling can be configured in your deployment Terraform resource:

resource "ec_deployment" "example_minimal" { 
  region                 = "us-east-1" 
  name = "my-example-deployment" 
  // The deployment can be reached on:   // my-alias.es.us-east-1.aws.cloud.es.io:9423 
  alias = "my-alias" 
  version                = "7.13" 
  deployment_template_id = "aws-io-optimized-v2" 
  elasticsearch { 
    autoscale = "true" 
    topology { 
      id   = "cold" 
      size = "8g" 
    } 
    topology { 
      id   = "hot_content" 
      size = "8g" 
      autoscaling { 
        // Optionally change the policy max size. 
        max_size = "59g" 
      } 
    } 
    topology { 
      id   = "warm" 
      size = "8g" 
    } 
  } 
  kibana {} 
  apm {} 
  enterprise_search {} 
} 

Deployment extensions 

Start using deployment extensions to manage and upload your Elastic plugins and script bundles. It’s easy to do when you use the new resource type  ec_deployment_extension to upload and manage deployment extensions and plugins on Elastic Cloud. 

ARM64 device support

The Elastic Cloud Terraform provider works natively on ARM64 devices, so you can run your infrastructure as code from the latest devices, such as an Apple Macbook with the M1 chip. 

Getting started

To get started with the provider, hop over to the Terraform Registry, explore the provider’s documentation and functionality, and start managing your Elastic Cloud deployments using Terraform. HashiCorp offers remote state storage on Terraform Cloud for free. Love Terraform, but not yet using Elastic for enterprise search, observability, or security? Get started with a free trial, or subscribe from your favorite cloud service provider’s marketplace.
ElasticON Global 2021

Join us at ElasticON Global for free!

Our biggest event of the year is back Oct 5-7. Take your organization's search, observability, or security capabilities to a whole new level.