Skip to content

Conversation

@rowansmithau
Copy link
Contributor

@rowansmithau rowansmithau commented Dec 18, 2025

Description

As part of https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/guides/v3-upgrade-guide various resources change from non versioned to versioned. This PR changes the Coder authored templates to versioned resources.

  • Updated kubernetes_persistent_volume_claim to kubernetes_persistent_volume_claim_v1
  • Updated kubernetes_deployment to kubernetes_deployment_v1
  • Updated kubernetes_pod to kubernetes_pod_v1
  • Updated kubernetes_secret to kubernetes_secret_v1
  • Updated all resource references and dependencies

I also had to fix up a couple of templates, i.e. remove agent_name as it wasn't valid usage, agent_id remains. The source parameter for jetbrains module in registry/coder/templates/kubernetes-envbox/main.tf also had to be fixed.

Type of Change

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Template Information

Path:

  • registry/coder/templates/kubernetes
  • registry/coder/templates/kubernetes-devcontainer
  • registry/coder/templates/kubernetes-envbox

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun fmt)
  • Changes tested locally

Related Issues

- Updated kubernetes_persistent_volume_claim to kubernetes_persistent_volume_claim_v1
- Updated kubernetes_deployment to kubernetes_deployment_v1
- Updated kubernetes_pod to kubernetes_pod_v1
- Updated all resource references and dependencies

Changes made in preparation for Kubernetes provider v3 upgrade as per:
https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/guides/v3-upgrade-guide

Templates updated:
- registry/coder/templates/kubernetes
- registry/coder/templates/kubernetes-devcontainer
- registry/coder/templates/kubernetes-envbox
@rowansmithau rowansmithau self-assigned this Dec 18, 2025
- Update kubernetes_secret to kubernetes_secret_v1 in kubernetes-devcontainer
- Update data source reference for kubernetes_secret_v1
- Fix jetbrains module source path (remove /modules/ from path)

Additional fixes for Kubernetes provider v3 compatibility.
- Remove agent_name from code-server module (line 110)
- Remove agent_name from jetbrains module (line 120)

The agent_name argument is deprecated in newer module versions.
@rowansmithau rowansmithau marked this pull request as ready for review December 18, 2025 01:16
Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Rowan. Changes look good to me. Assuming you have tested it already.
Can you replicate the same to https://github.com/coder/coder/tree/main/examples/templates

@rowansmithau rowansmithau merged commit ac44ad8 into main Dec 18, 2025
4 checks passed
@rowansmithau rowansmithau deleted the kube_provider_v3 branch December 18, 2025 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants