Skip to content

Commit be27dc4

Browse files
committed
fix: remove spot related tags when spot is disabled
1 parent 882be2b commit be27dc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module "node" {
6363
max_size = local.instance_capacity.max
6464
max_instance_lifetime = "604800"
6565
wait_for_capacity_timeout = "300s"
66-
tag_specifications_resource_types = ["instance", "volume", "spot-instances-request"]
66+
tag_specifications_resource_types = var.instance_spot.enabled ? ["instance", "volume", "spot-instances-request"] : ["instance", "volume"]
6767

6868
mixed_instances_policy = {
6969
instances_distribution = {

0 commit comments

Comments
 (0)