Import Spot resources into Terraform

Import Spot resources into Terraform

More and more, DevOps and platform teams are using infrastructure as code to design and implement infrastructure in the cloud. Hashicorp’s Terraform is one of the most popular infrastructure as code tools. It enables you to define your desired state of infrastructure using code, and deploy those changes to your cloud. Spot by NetApp has extensive support for Terraform in Elastigroup and Ocean, our products for cloud infrastructure management. When integrated together, you can use your existing Terraform templates while Spot determines and optimizes cloud infrastructure resources for the best possible mix of compute type, size and lifecycle for the workload. 

In past posts, we’ve discussed how Terraform can help with deployment management, and we’ve walked through how to create an Ocean cluster using Terraform. If you already have an Ocean cluster running and you are starting to work with Terraform, this tutorial will help you import an Ocean cluster or any other spot resource (Elastigroup, virtual node group etc.) into Terraform. 

In this tutorial, you’ll go through the steps to create a cluster via the Ocean UI and manage it using Terraform. By importing Ocean to Terraform, you’ll automatically create the state of the resource and have a template to use to manage it. You can use this method to duplicate Ocean environments in Terraform by using the template that was created during the import process.