TerraformPilot

Infrastructure as Code

Terraform Kubernetes Provider v3.6.0: kubernetes_priority_class_v1 Breaking Changes

Terraform Kubernetes provider v3.6.0 moves kubernetes_priority_class_v1 to Plugin Framework with breaking validation changes. Upgrade notes inside.

LLuca Berton2 min read

Introduction

#

HashiCorp released v3.6.0 of the hashicorp/terraform-provider-kubernetes provider on Nov 27, 2026. The release is narrowly scoped: it migrates kubernetes_priority_class_v1 from SDKv2 to the Plugin Framework and tightens validation on that resource. Anyone managing PriorityClass objects with Terraform should read this before running terraform plan.

What Is New

#

Breaking change: null no longer accepted in metadata.labels / metadata.annotations

#

Previously, a null entry inside the labels or annotations map was silently dropped. As of 3.6.0, Terraform now rejects it at plan time. The map itself can still be omitted or set to null entirely — it's only individual null values inside the map that are now an error.

resource "kubernetes_priority_class_v1" "example" {
  metadata {
    name = "high-priority"
    labels = {
      team = "platform"
      # tier = null  # no longer allowed — remove the key or use a string
    }
  }
  value = 100000
}

Fix: delete entries that were set to null, or give them a real string value.

Breaking change: value is strictly validated to the signed 32-bit range

#

Plans now reject a value outside the signed 32-bit integer range instead of silently wrapping it. For user-defined priority classes, the practical ceiling is 1000000000.

resource "kubernetes_priority_class_v1" "custom" {
  metadata {
    name = "custom-critical"
  }
  value = 1000000000 # maximum for user-defined classes
}

If an imported built-in class (e.g. system-node-critical, which uses a value above that limit) was previously managed without a metadata.name set, add the name explicitly. No re-import is needed:

resource "kubernetes_priority_class_v1" "system_node_critical" {
  metadata {
    name = "system-node-critical"
  }
  value = 2000001000
}

Plugin Framework migration

#

kubernetes_priority_class_v1 now runs on the Plugin Framework instead of SDKv2. Configuration syntax and existing state remain compatible — no re-import is required. Two cosmetic, non-destructive effects are called out in the release notes:

  • A one-time in-place update may appear for omitted or explicitly empty labels/annotations, normalizing between {} and null.
  • A first plan run with -refresh=false may normalize an unset generate_name from "" to null on a priority class configured with name.

Neither change replaces the resource.

moved blocks from the deprecated kubernetes_priority_class resource to kubernetes_priority_class_v1 are supported, but only with Terraform 1.8 or later:

moved {
  from = kubernetes_priority_class.example
  to   = kubernetes_priority_class_v1.example
}

Import by resource identity is new in this release and requires Terraform 1.12 or later:

terraform import 'kubernetes_priority_class_v1.example' 'high-priority'

All three items are tracked under GH-2974.

Upgrade Steps

#

Pin the new version and re-initialize:

terraform {
  required_providers {
    kubernetes = {
      source  = "hashicorp/kubernetes"
      version = "~> 3.6.0"
    }
  }
}
terraform init -upgrade

Before applying anything, run a dry plan and inspect any kubernetes_priority_class_v1 resources for the known null-map and empty-string validation errors:

terraform plan -out=upgrade.tfplan

If the plan fails on a null label/annotation entry or an out-of-range value, fix the HCL as shown above, then re-plan. For built-in priority classes previously imported without metadata.name, add the name field before planning.

Verify

#

Confirm the provider version in use:

terraform providers

Check that the one-time cosmetic diffs (if any) do not propose a replace:

terraform plan -refresh=false

Look for ~ update in-place on labels/annotations/generate_name rather than -/+ destroy and re-create. If moved blocks were added for a rename from kubernetes_priority_class, confirm Terraform reports no plan diff for that resource and that the state entry now reflects the new type.

Conclusion

#

v3.6.0 is a focused, resource-scoped release: tighter validation and a backend migration for kubernetes_priority_class_v1, with no state re-import required. Teams managing priority classes should audit for null map entries and out-of-range value fields before upgrading, and keep Terraform at 1.8+ (or 1.12+ for identity-based import) to use the new moved/import capabilities. Full details are on the release page.

#Terraform#Kubernetes#Terraform Provider Kubernetes#Plugin Framework#HCL

Share this article