- Have an ECS cluster created and integrated with Ocean on Spot.io
- Spot Account and API Token
### Create Ocean ECS Cluster ###
module "ocean_ecs" {
source = "stevenfeltner/ecs-ocean/spotinst"
cluster_name = "ECS-Workshop"
desired_capacity = 0
region = "us-west-2"
subnet_ids = ["subnet-123456789, subnet-123456789, subnet-123456789, subnet-123456789"]
security_group_ids = ["sg-123456789"]
iam_instance_profile = "arn:aws:iam::123456789:instance-profile/ecsInstanceRole"
tags = {CreatedBy = "terraform"}
}
### Create Ocean ECS Launchspec ###
module "ocean_ecs_launchspec" {
source = "stevenfeltner/ecs-ocean-launchspec/spotinst"
name = "VNG1"
ocean_id = module.ocean_ecs.ocean_id
attributes = {Test = "example"}
tags = {CreatedBy = "terraform"}
}
### Outputs ###
output "ocean_id" {
value = module.ocean_ecs.ocean_id
}
output "ocean_launchspec_id" {
value = module.ocean_ecs_launchspec.launchspec_id
}
Name | Version |
---|---|
spotinst | >= 1.45.0 |
ecs-ocean
- Creates Ocean Cluster Docecs-ocean-launchspec
- (Optional) Add custom virtual node groups
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.
Code is licensed under the Apache License 2.0.