You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In coder/coder#13122 a user sees empty values when referencing ${data.coder_workspace.me.template_id} in their template. This happens because their coder server version is behind the provider, and this kind of issue will continue to appear as we implement more provider functionality (#220, #219).
There are two things we should do to fix this:
In our docs under each attribute and resource, declare the Coder version requirements
As an extra check, we could pass in the Coder version to the provisioner, and then check the version against the oldest version of Coder supported by the provisioner. WDYT?
As an extra check, we could pass in the Coder version to the provisioner, and then check the version against the oldest version of Coder supported by the provisioner. WDYT?
I think passing the version is a good idea, but I think we should add rules to convert old parameters into new ones instead of "breaking" at certain version boundaries.
We want to minimize upgrade anxiety caused by breakage.
Coder provisioner uses terraform-plugin-coder in different contexts - a dry run, a template run, a workspace build, etc. We can't use helpers.RequireEnv() in other modes than "workspace build", as the provisioner does not set these values (empty variable). If we switch to helpers.RequireEnv() now, "template import" will fail due to unset env values.
We can implement a workaround by passing the extra env variable CODER_WORKSPACE_BUILD_ID=.... If this variable is set, the plugin should presence the required env values.
In coder/coder#13122 a user sees empty values when referencing
${data.coder_workspace.me.template_id}
in their template. This happens because their coder server version is behind the provider, and this kind of issue will continue to appear as we implement more provider functionality (#220, #219).There are two things we should do to fix this:
In our docs under each attribute and resource, declare the Coder version requirements
Replace code like:
terraform-provider-coder/provider/workspace.go
Lines 83 to 90 in 3cc9802
with
LookupEnv
and fail the build when a value is missing instead of using blanks.The text was updated successfully, but these errors were encountered: