-
Notifications
You must be signed in to change notification settings - Fork 4
Allow modules require specific Coder version #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@kylecarbs any thoughts on how we can do this? My idea is to add a property to such modules let's say |
@mafredri what are you doing thoughts on this? See my comment above. |
Don't we already do this? For example: I think the best place for this is terraform, since runtime (script) failure means late detection of issues / non-functional workspace after build. |
@mafredri This Coder provider. We are talking about the Coder version. e.g. v2.7.2 An example is a module that depends on the |
@matifali Ah, I see. I'd say, the We could add a new data source, like coder_deployment "me" {}
something {
lifecycle {
postcondition {
condition = check_version(coder_deployment.me.version)
error_message = "Coder deployment version must be higher than XXX."
}
}
} Or maybe it can be a separate resource with param, like: resource "coder_deployment" "some_module" {
require_version = ">=1.0.0"
} |
@mafredri Hmm or something we can add to coder_workspace or the agent. As the scripts are being run by the agent so something like something {
lifecycle {
postcondition {
condition = check_version(coder_agent.example.version)
error_message = "Coder deployment version must be higher than XXX."
}
}
} |
@matifali I suppose that's an option, although terraform doesn't have any better idea of what version of the agent is truly going to run. So I think checking the deployment version is a good approximation (ideally, latest agent should be downloaded on start). I don't have any strong opinions on that, though. One simple change we definitely can make is expose a |
@mafredri Exposing is not a problem I think. We can already get the version within a script using something like I am wondering if it's ok to do it in scripts or if we should/can do it in Terraform. The benefit of doing it in Terraform is we can fail at build stage instead of the |
Can we have this built-in to the coder provider? For example to use coder provider v0.17.0 one needs to be on Coder version 2.8.3+. |
If a module relies on a new feature in Coder, we should have a way to detect/prevent it from being used on old versions
The text was updated successfully, but these errors were encountered: