terraform upcloud: fix flexible plans

pull/11696/head
davidumea 2024-10-14 14:01:41 +02:00 committed by Fredrik Liv
parent e74f69dac6
commit f552faec3e
No known key found for this signature in database
GPG Key ID: 207869278D64F059
3 changed files with 10 additions and 10 deletions

View File

@ -130,8 +130,8 @@ resource "upcloud_server" "master" {
hostname = "${local.resource-prefix}${each.key}"
plan = each.value.plan
cpu = each.value.plan == null ? null : each.value.cpu
mem = each.value.plan == null ? null : each.value.mem
cpu = each.value.cpu
mem = each.value.mem
zone = var.zone
server_group = each.value.server_group == null ? null : upcloud_server_group.server_groups[each.value.server_group].id
@ -194,8 +194,8 @@ resource "upcloud_server" "worker" {
hostname = "${local.resource-prefix}${each.key}"
plan = each.value.plan
cpu = each.value.plan == null ? null : each.value.cpu
mem = each.value.plan == null ? null : each.value.mem
cpu = each.value.cpu
mem = each.value.mem
zone = var.zone
server_group = each.value.server_group == null ? null : upcloud_server_group.server_groups[each.value.server_group].id
@ -259,8 +259,8 @@ resource "upcloud_server" "bastion" {
hostname = "${local.resource-prefix}${each.key}"
plan = each.value.plan
cpu = each.value.plan == null ? null : each.value.cpu
mem = each.value.plan == null ? null : each.value.mem
cpu = each.value.cpu
mem = each.value.mem
zone = var.zone
server_group = each.value.server_group == null ? null : upcloud_server_group.server_groups[each.value.server_group].id

View File

@ -29,8 +29,8 @@ variable "machines" {
type = map(object({
node_type = string
plan = string
cpu = string
mem = string
cpu = optional(number)
mem = optional(number)
disk_size = number
server_group : string
force_public_ip : optional(bool, false)

View File

@ -51,8 +51,8 @@ variable "machines" {
type = map(object({
node_type = string
plan = string
cpu = string
mem = string
cpu = optional(number)
mem = optional(number)
disk_size = number
server_group : string
force_public_ip : optional(bool, false)