Terraform Kubernetes provider 4.0.0-beta1 brings breaking schema changes, and HashiCorp says to back up state first
HashiCorp published the first beta of version 4.0 of the Terraform Kubernetes provider on December 3. It migrates many resources to the Terraform Plugin Framework and writes a newer state schema, so rolling back to 3.x requires restoring a pre-upgrade state backup.
Why it matters
The release notes say 14 managed resources, including Services, PersistentVolumes and PersistentVolumeClaims, write the new state schema, and once 4.0 saves them, pinning the 3.x provider alone is not enough to go back. Deployments, DaemonSets, StatefulSets, Pods, Jobs and CronJobs move to the Plugin Framework, and fields such as container resources and Deployment strategy change from blocks to object arguments, so references and ignore_changes paths drop their zero index.
The horizontal pod autoscaler v2 resource no longer sends an empty behavior object or a zero stabilization window when they are omitted, so new autoscalers get Kubernetes' default 300-second scale-down window while existing ones keep their values. The v2beta2 autoscaler resource is removed, and Ingress, IngressClass and NetworkPolicy switch selected blocks to object arguments.
Because this is a pre-release, teams should test it outside production, back up state first and follow the v4 upgrade guide before rewriting modules.