Pin the kubernetes provider and move the deployment to kubernetes_deployment_v1 #5
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
GuillaumeHemmen-k8s/coder-sindri-deployment!5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/deployment-v1-pin-kubernetes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The template push log (2026-09-30 08:10 UTC) shows:
The provider has no version constraint, so every push floats to the newest release. v3.0 deprecated all un-suffixed resources; a future major removing them would break every workspace build on the next push, with no warning beyond these lines.
Change
hashicorp/kubernetesto~> 3.2, the version already in use, so behaviour doesn't change today.kubernetes_deployment→kubernetes_deployment_v1. In the provider both names map to the same implementation (resourceKubernetesDeploymentV1,kubernetes/provider.go:292-293), so the schema is identical. The deployment iscount = start_count: it is destroyed on every stop and created on every start, so the type change costs nothing beyond a normal restart. No data involved.Deliberately not changed: the home PVC
kubernetes_persistent_volume_claim.homekeeps its deprecation warning. It is the one persistent resource, and renaming its type would make Terraform destroy and recreate every workspace's home volume. Amovedblock can't help: cross-type moves need provider support, and v3.2.1'sMoveResourceStateis a no-op stub (manifest/provider/server.go:115).Migrating it safely needs
removed { lifecycle { destroy = false } }+ animportblock, with the import made conditional so fresh workspaces (no PVC yet) don't fail. That deserves its own PR and a test against a throwaway workspace. The pin above keeps the deprecated type available until then.Validation
terraform init+terraform validatewith Terraform 1.14.5 (same as the Coder provisioner): valid, providers resolve to coder v2.18.0 / kubernetes v3.2.1 / http v3.6.2, only the intentional PVC warning left. Not plan/applied against a real workspace.🤖 Generated with Claude Code