Skip to content

ryanpflynn/terraform-spotinst-aws-connect

 
 

Repository files navigation

Connect AWS Account To Spot.io Terraform Module

Introduction

The module will aid in automatically connecting an AWS Account to Spot via terraform. This will leverage a null_resource calling a python script calling the Spot.io APIs to: create a Spot account within your Spot Organization, create a secure autogenerated externalId and add the ARN of the created IAM role to the Spot platform.

Pre-Reqs

  • Spot.io organization admin API token.
  • Python 3
  • The Terraform CLI, version 0.14 or later.
  • AWS Credentials configured for use with Terraform.

Example

module "spotinst-aws-connect" {
    source = "spotinst/aws-connect/spotinst"

    spotinst_token = "Redacted"
  
    #AWS Profile (Optional)
    #profile = ""

    #(Optional) Name of the account in Spot platform - If none is provided use AWS account alias as the account name.
    #name = "test-terraform"
  
    #Policy File (Optional) File with policy to attach to role
    #policy_file = example.json
}

Run

This Terraform module will do the following:

On Apply:

  • Create AWS IAM Policy
  • Create new Spot account within current Spot organization
  • Retrieve unique auto-generated External-ID
  • Create AWS IAM Role with trust relationship
  • Assign policy to IAM Role
  • Provide IAM Role to newly created Spot Account

On Destroy:

  • Remove all above resources including deleting the Spot account from the Spot platform

Documentation

If you're new to Spot and want to get started, please checkout our Getting Started guide, available on the Spot Documentation website.

Getting Help

We use GitHub issues for tracking bugs and feature requests. Please use these community resources for getting help:

Community

Contributing

Please see the contribution guidelines.

About

A Terraform module to connect an AWS account to Spot.io.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 54.2%
  • Python 42.8%
  • Makefile 1.6%
  • Shell 1.4%