Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add var preferred_spot_types #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ resource "spotinst_ocean_ecs_launch_spec" "ocean_ecs_launchspec" {
}
}

instance_types = var.instance_types
restrict_scale_down = var.restrict_scale_down
subnet_ids = var.subnet_ids
instance_types = var.instance_types
preferred_spot_types = var.preferred_spot_types
restrict_scale_down = var.restrict_scale_down
subnet_ids = var.subnet_ids

dynamic "attributes" {
for_each = var.attributes == null ? {} : var.attributes
Expand Down Expand Up @@ -96,7 +97,7 @@ resource "spotinst_ocean_ecs_launch_spec" "ocean_ecs_launchspec" {
dynamic "images" {
for_each = var.images == null ? [] : var.images
content {
image_id = images.value["image_id"]
image_id = images.value["image_id"]
}
}
}
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,10 @@ variable "images" {
}))
default = null
description = "Array of objects (Image object, containing the id of the image used to launch instances.)"
}
}

variable "preferred_spot_types" {
type = list(string)
default = []
description = "Array of preferred spot types"
}