github hetznercloud/terraform-provider-hcloud v1.53.0

latest release: v1.53.1
22 hours ago

Server Types now depend on Locations.

  • We added a new locations property to the Server Types resource. The new property defines a list of supported Locations and additional per Locations details such as deprecations information.

  • We deprecated the deprecation property from the Server Types resource. The property will gradually be phased out as per Locations deprecations are being announced. Please use the new per Locations deprecation information instead.

See our changelog for more details.

Upgrading

// Before
data "hcloud_server_type" "main" {
  name = "cx22"
}

check "server_type" {
  assert {
    condition     = !data.hcloud_server_type.main.is_deprecated
    error_message = "Server Type ${data.hcloud_server_type.main.name} is deprecated"
  }
}
// After
data "hcloud_location" "main" {
  name = "fsn1"
}

data "hcloud_server_type" "main" {
  name = "cx22"
}

locals {
  server_type_location = one([
    for o in data.hcloud_server_type.main.locations : o
    if o.name == data.hcloud_location.main.name
  ])
}

check "server_type_location" {
  assert {
    condition     = local.server_type_location != null
    error_message = "Server Type ${data.hcloud_server_type.main.name} does not exists in Location ${data.hcloud_location.main.name}"
  }
  assert {
    condition     = !local.server_type_location.is_deprecated
    error_message = "Server Type ${data.hcloud_server_type.main.name} is deprecated in Location ${data.hcloud_location.main.name}"
  }
}

Features

  • add category property to server type (#1184)
  • per locations server types (#1193)

Bug Fixes

  • ensure exponential poll backoff is configured (#1160)
  • handle not found volume deletion (#1189)
  • wait for floating_ip assign action to complete (#1195)
  • add experimental features maturity (#1191)

Don't miss a new terraform-provider-hcloud release

NewReleases is sending notifications on new releases.