Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

### Changed

- [GCP] Required Google provider 5.15 or later for machine-type availability lookups. (PR #459)

### Fixed

- [AWS] Persisted the selected availability zone to prevent unintended cluster rebuilds when AWS zone or instance-type offerings change. (PR #458)
- [GCP] Persisted the selected zone to prevent unintended instance and disk rebuilds when the available zone list changes, and rejected unavailable zones instead of silently selecting another zone.
- [GCP] Kept all instances and managed disks in one zone offering every requested instance type, including autoscaling nodes, and validated the stored zone against current offerings. Requires Google provider 5.15 or later.
- [GCP] Persisted the selected zone to prevent unintended instance and disk rebuilds when the available zone list changes, and rejected unavailable zones instead of silently selecting another zone. (PR #459)
- [GCP] Limited automatic zone selection to zones offering all requested instance types, including autoscaling nodes, and validated explicit and stored zones against current offerings. All instances and managed disks remain in one zone. (PR #459)

## [16.1.2] 2026-11-04

Expand Down
3 changes: 1 addition & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1172,8 +1172,7 @@ assigned number.
Defines the name of the specific geographical location where the cluster resources will be hosted.

**Requirement**: Must be a Google Cloud region with an available zone offering
all selected instance types. Custom N1 machine types are checked by
family. Refer to [Google Cloud documentation](https://cloud.google.com/compute/docs/regions-zones#available)
all selected instance types. Refer to [Google Cloud documentation](https://cloud.google.com/compute/docs/regions-zones#available)
for the list of available regions and their characteristics.

#### 5.3.3 zone (optional)
Expand Down
8 changes: 2 additions & 6 deletions gcp/infrastructure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,20 @@ data "google_compute_zones" "available" {

locals {
instance_types = distinct([for instance in var.instances : instance.type])
# Custom N1 shapes are not listed by the API; check their machine family.
machine_type_names = {
for type in local.instance_types : type => startswith(type, "custom-") ? "n1-standard-1" : type
}
}

data "google_compute_machine_types" "available" {
for_each = toset(data.google_compute_zones.available.names)
project = var.project
zone = each.key
filter = join(" OR ", [for type in distinct(values(local.machine_type_names)) : "name = ${jsonencode(type)}"])
filter = join(" OR ", [for type in local.instance_types : "name = \"${type}\""])
}

locals {
zone_choices = toset([
for zone, offerings in data.google_compute_machine_types.available : zone
if alltrue([
for type in local.instance_types : contains(offerings.machine_types[*].name, local.machine_type_names[type])
for type in local.instance_types : contains(offerings.machine_types[*].name, type)
])
])
}
Expand Down
Loading