Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 7487643

Browse files
dimisjimnpalm
andcommitted
feat: Allow setting the market_options runners module to disable spot instances (#657)
* Allow setting the market_options runners module value * Update README.md * fix readme * pass variable through module instantiation * Update variables.tf Co-authored-by: Niek Palm <[email protected]> Co-authored-by: Niek Palm <[email protected]>
1 parent fb90569 commit 7487643

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ No requirements.
328328
| lambda\_subnet\_ids | List of subnets in which the action runners will be launched, the subnets needs to be subnets in the `vpc_id`. | `list(string)` | `[]` | no |
329329
| logging\_retention\_in\_days | Specifies the number of days you want to retain log events for the lambda log group. Possible values are: 0, 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653. | `number` | `180` | no |
330330
| manage\_kms\_key | Let the module manage the KMS key. | `bool` | `true` | no |
331+
| market\_options | Set it to null to use on demand runners. | `string` | `"spot"` | no |
331332
| minimum\_running\_time\_in\_minutes | The time an ec2 action runner should be running at minimum before terminated if non busy. | `number` | `5` | no |
332333
| role\_path | The path that will be added to role path for created roles, if not set the environment name will be used. | `string` | `null` | no |
333334
| role\_permissions\_boundary | Permissions boundary that will be added to the created roles. | `string` | `null` | no |

Diff for: main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ module "runners" {
6868
s3_location_runner_binaries = local.s3_action_runner_url
6969

7070
instance_type = var.instance_type
71+
market_options = var.market_options
7172
block_device_mappings = var.block_device_mappings
7273

7374
runner_architecture = local.runner_architecture

Diff for: variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -340,3 +340,9 @@ variable "runner_additional_security_group_ids" {
340340
type = list(string)
341341
default = []
342342
}
343+
344+
variable "market_options" {
345+
description = "Market options for the action runner instances. Setting the value to `null` let the scaler create on-demand instances instead of spot instanes."
346+
type = string
347+
default = "spot"
348+
}

0 commit comments

Comments
 (0)