The module will aid in automatically connecting an AWS Account to Spot via terraform.
- Spot.io organization admin API token.
- The Terraform CLI, version 0.14 or later.
- AWS Credentials configured for use with Terraform.
module "spotinst-aws-connect" {
source = "spotinst/aws-connect/spotinst"
#Name for the Spot account. The account name must contain at least one character that is a-z or A-Z
name = "your-account-name"
spotinst_token = "Redacted"
#Policy File (Optional) File with policy to attach to the Spot role
#policy_file = templatefile(minimal-spot-iam-policy.json.tftpl", {
# region = "us-east-1"
# account_id = "123456789" })
}
This Terraform module will do the following:
On Apply:
- Create new Spot account within current Spot organization
- Retrieve unique External-ID returned by spot API
- Create AWS IAM Policy
- 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.