fbpx

Installing The Spotinst Terraform Plugin

Disclaimer: Spotinst has two Terraform provider versions:

Both are fully maintained and currently, there is no deprecation date for the previous provider.

The reason that Spotinst manages two providers is that we want to allow our Terraform customers to receive our latest provider features in a faster pace than it would be received directly from Hashicorp.

 

The installation can be done via:

  • HashiCorp binaries
  • Spotinst Resources.

Official provider installation - From HashiCorp

Terraform Spotinst provider page.

  1. Get the latest Terraform binary build
  2. Create a template.tf that includes the spotinst provider configuration.
  3. Run terraform init
    if command failed – continue below to manual installation.
  4. The latest change log release version of the Spotinst provider should be downloaded

Supported Terraform binaries are v0.10.6 and above

Important! Schema between official and previous providers contains breaking changes. If you are new to Spotinst Terraform provider we encourage you to use the official version.

Manually installation:

place the plugin executable (terraform-provider-spotinst) in one of the following locations depending on the host operating system:

Windows systems – create a file named terraform.rc in the sub-path terraform.d/plugins beneath your user’s “Application Data”  %APPDATA% directory:

%APPDATA%/terraform.rc

Mac or Unix-like systems – create a file named .terraformrc in your home directory:

~/.terraformrc

Edit the file and add the following content:

providers {
  spotinst = "/path/to/terraform-provider-spotinst"
}

Example:

providers {
  spotinst = "/Users/Spotinst/Terraform/terraform-provider-spotinst"
}

Running terraform init will search this directory for additional plugins during initialization phase.

In case of working with the official provider, after terraform init the provider binary exist under .terraform/plugins/<platform>/terraform-provider-spotinst_v1.x.x

Official provider installation - from Spotinst resources

We strive to always have the latest features available for our customers reflected on our official Terraform provider. Since cutting new releases for the official provider might take some time as it is not managed by Spotinst, we enable customers a download link for the latest official provider, the same procedure as described above for the previous provider (change the binary version in the link to match yours).

You can check the change log for the latest addition to the official Spotinst provider

Download Links:

linux_amd64

https://s3.amazonaws.com/spotinst-public/integrations/terraform/v0.11.4/providers/v2/linux_amd64/terraform-provider-spotinst

darwin_amd64

https://s3.amazonaws.com/spotinst-public/integrations/terraform/v0.11.4/providers/v2/darwin_amd64/terraform-provider-spotinst

windows_amd64

https://s3.amazonaws.com/spotinst-public/integrations/terraform/v0.11.4/providers/v2/windows_amd64/terraform-provider-spotinst.exe