ecs-ocean
joshdlee/ecs-ocean/spotinst
Spotinst Terraform Module to integrate existing ECS cluster with Spot.io Ocean
Spot Ocean ECS Terraform Module Prerequisites Have an ECS cluster Spot Account and API Token defined in the Spotinst Terraform Provider Usage ``hcl module "ocean_ecs" { source = "../ecs-ocean" cluster_name = "ECS-Workshop" region = "us-west-2" subnet_ids = ["subnet-123456789,subnet-123456789"] security_group_ids = ["sg-123456789"] image_id = "ami-123456789" iam_instance_profile = "arn:aws:iam::123456789:instance-profile/ecsInstanceRole" tags = {CreatedBy = "terraform"} } ` Providers | Name | Version | |------|---------| | spotinst | >= 1.45.0 | Modules ecs-ocean - Creates Ocean Cluster ecs-ocean-launchspec` - (Optional) Add custom virtual node groups Doc Documentation If you're new to Spot and want to get started, please checkout our Getting Started guide, available on the Spot Documentati
| Name | Type | Description | Default |
|---|---|---|---|
| cluster_name | string | The ECS cluster name. | required |
| security_group_ids | list(string) | One or more security group ids. | required |
| region | string | The region the cluster will run in. | required |
| subnet_ids | list(string) | A comma-separated list of subnet identifiers for the Ocean cluster. Subnet IDs s | required |
| desired_capacity | number | The number of instances to launch and maintain in the cluster. | null |
| http_tokens | string | Determines if a signed token is required or not. Valid values: optional or requi | null |
| conditional_roll | bool | Spot will perform a cluster Roll in accordance with a relevant modification of t | false |
| iam_instance_profile | string | The instance profile iam role | null |
| max_vcpu | number | The maximum cpu in vCPU units that can be allocated to the cluster. | null |
| scheduled_task | object({ shutdown_is_enabled | Scheduled Tasks Block | null |
| name | string | The Ocean cluster name. | null |
| max_size | number | The upper limit of instances the cluster can scale up to. | 1000 |
| tags | map(string) | Optionally adds tags to instances launched in an Ocean cluster. | null |
| associate_public_ip_address | bool | Configure public IP address allocation. | null |
| utilize_commitments | bool | If savings plans exist, Ocean will utilize them before launching Spot instances. | null |
| num_of_units | number | The number of units to retain as headroom, where each unit has the defined headr | 0 |
| max_scale_down_percentage | number | Would represent the maximum % to scale-down. Number between 1-100. | 10 |
| batch_min_healthy_percentage | number | Indicates the threshold of minimum healthy instances in single batch. If the amo | 50 |
| min_size | number | The lower limit of instances the cluster can scale down to. | 0 |
| user_data | string | Base64-encoded MIME user data to make available to the instances. | null |
| autoscaler_is_auto_config | bool | Automatically configure and optimize headroom resources. | true |
| cooldown | number | Cooldown period between scaling actions. | null |
| auto_headroom_percentage | number | The auto-headroom percentage. Set a number between 0-200 to control the headroom | null |
| ebs_optimized | bool | Enable EBS optimized for cluster. Flag will enable optimized capacity for high b | true |
| … and 5 more inputs | |||
ocean_id