Closed ddelange closed 2 years ago
Commenting out the two erroneous arguments leads to a successful plan:
# kops_instance_group.nodes["subnet-87b73aed"] will be created
+ resource "kops_instance_group" "nodes" {
+ cluster_name = (known after apply)
+ id = (known after apply)
+ image = (known after apply)
+ machine_type = "t3a.small"
+ max_size = 2
+ min_size = 0
+ name = "node-eu-central-1a"
+ revision = 1
+ role = "Node"
+ subnets = [
+ "subnet-87b73aed",
]
+ mixed_instances_policy {
+ instances = [
+ "t3a.small",
+ "t3.small",
]
+ on_demand_allocation_strategy = "lowest-price"
+ spot_allocation_strategy = "lowest-price"
+ spot_instance_pools = 2
}
}
Hey, thanks for trying it out.
The issue here is that null
and 0
do not mean the same thing and terraform has some limitations on this.
It should be set like this:
on_demand_base {
value = 0
}
on_demand_above_base {
value = 0
}
There have been a couple of issues related to this #330 #256 for example. Hope this helps.
Thanks for the quick reply, already read something about nullable arguments in the docs, should have rung a bell...
Trying out first thing tomorrow!
Goal
Start a simple kops cluster with 100% spot workers
Setup
Following
MixedInstancesPolicySpec
, I drafted the following instance groups forMaster
andNode
in a specific availability zone:Result
When running
terraform plan
, the following errors occur:Question
Can you advise on how to set up the node instance group with a mixed instances policy?
Versions