Spotinst & Terraform Getting Started: Create A Cost-Efficient Auto Scaling on AWS

Getting Started with Spot and Terraform — Cost-Efficient Auto Scaling on AWS

Reading Time: < 1 minutes

How to use Spot & Terraform

In this post, we will explain how to create a cost-efficient Auto-Scaling in AWS using the Spot plugin for Terraform (listed in the Terraform registry as the Spotinst provider).

Step One: Install Terraform

Get the latest Terraform build, and make sure you have the Spotinst provider installed there.

Step Two: Connect Spot as a Provider

provider "spotinst" {
  token = "spotinst-token"  #generate in the Spot Console / API
  account = "act-123abcd"   #your Spot account ID (starts with act-)
resource "spotinst_elastigroup_aws" "spot-elastigroup-tf-provider-v2" {

 # Group Parameters

 # Full list of parameters here ;


[alert type=”info”]For more detailed info about each property – please use the documentation. [/alert]


Once you have everything setup correctly, you can execute your Terraform file and apply the changes. It should trigger an API call to Spot and create an Elastigroup.