0

我正在尝试使用实例队列创建 EMR 集群。我提到了bid_price,它给了我如下错误,所以尝试提及bid_price_as_percentage_of_on_demand_price。在没有同时指定这两个选项的情况下进行了尝试,但不知何故,它每次都会以相同的细节出错 -

│ Error: error running EMR Job Flow: ValidationException: Specify at most one of bidPrice or bidPriceAsPercentageOfOnDemandPrice value for the Spot Instance fleet : request.
│ status code: 400, request id: c6bfea8e-e596-43ac-a504-203dbf122d5f

这是我来自 terraform 模块的核心实例队列块-

core_instance_fleet {
dynamic "instance_type_configs" {
for_each = var.instance_type_configs_core
content {
bid_price = instance_type_configs.value.bid_price
bid_price_as_percentage_of_on_demand_price = instance_type_configs.value.bid_price_as_percentage_of_on_demand_price
instance_type = instance_type_configs.value.instance_type
weighted_capacity = instance_type_configs.value.weighted_capacity
ebs_config {
size = var.ebs_core_size
type = var.ebs_core_type
volumes_per_instance = var.ebs_volumes_per_instance_core
}
}
}
launch_specifications {
spot_specification {
allocation_strategy = var.allocation_strategy_spotInstance
timeout_action = var.timeout_action
timeout_duration_minutes = var.timeout_duration_minutes
}
}
name = var.emr_core_node
target_spot_capacity = var.target_on_spot_capacity_core
}

我的 terraform.vars-

instance_type_configs_core = {
"one" = {
bid_price = "3"
#bid_price_as_percentage_of_on_demand_price = "0"
instance_type = "c5.xlarge"
weighted_capacity = "1"
},
"two" = {
bid_price = "3"
#bid_price_as_percentage_of_on_demand_price = "100"
instance_type = "c4.xlarge"
weighted_capacity = "1"
}
}


terraform -v
Terraform v1.1.4
on darwin_amd64

provider registry.terraform.io/hashicorp/aws v3.73.0

所以不确定我哪里出错了。任何建议将不胜感激。谢谢!

4

0 回答 0