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.
- Spot.io organization admin API token.
- Python 3
- The Terraform CLI, version 0.14 or later.
- AWS Credentials configured for use with Terraform.
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
}
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
If you're new to Spot and want to get started, please checkout our Getting Started guide, available on the Spot Documentation website.
We use GitHub issues for tracking bugs and feature requests. Please use these community resources for getting help:
- Ask a question on Stack Overflow and tag it with terraform-spotinst.
- Join our Spot community on Slack.
- Open an issue.
Please see the contribution guidelines.