- Notifications
You must be signed in to change notification settings - Fork927
Description
In v2.11.1 it appears that templates and workspace provisioning is broken, possibly due to the upgrade from Terraform v1.6.6 to v1.7.5. When provisioning a workspace on a known working template in v2.9.x the following error was observed, which appears to originate fromhere.

Initially we thought this was an issue with template and moved thecoder_agent
resource from the sub module to the root of the template. This fixed the error, but then the agent failed to get associated with the k8s deployment.
As part of testing we uploaded a test template and in 2.11.1 we got the following template preview
┌──────────────────────────────────────────────────┐│ Template Preview │├──────────────────────────────────────────────────┤│ RESOURCE │├──────────────────────────────────────────────────┤│ coder_env.java_home │├──────────────────────────────────────────────────┤│ coder_env.path │├──────────────────────────────────────────────────┤│ kubernetes_deployment_v1.workspace │├──────────────────────────────────────────────────┤│ kubernetes_persistent_volume_claim_v1.home │└──────────────────────────────────────────────────┘
Suspecting this was an issue with the upgrade to Terraform v1.7.5 in v2.11.1, we downgraded our staging cluster to v2.11.0 and uploaded the same template. As you can see the v2.11.0 upload correctly shows the agent being associated with the deployment.
┌──────────────────────────────────────────────────┐│ Template Preview │├──────────────────────────────────────────────────┤│ RESOURCE │├──────────────────────────────────────────────────┤│ coder_env.java_home │├──────────────────────────────────────────────────┤│ coder_env.path │├──────────────────────────────────────────────────┤│ kubernetes_deployment_v1.workspace ││ └─ workspace (linux, amd64) │├──────────────────────────────────────────────────┤│ kubernetes_persistent_volume_claim_v1.home │└──────────────────────────────────────────────────┘
A further piece of evidence that this is a v1.7.x issue can be found in thechangelog which undergoes a state file change.
Finally, after downgrading to v2.11.0 all our existing templates, which remained unchanged, were able to spin up workspaces again.