-
Notifications
You must be signed in to change notification settings - Fork 885
coder_parameters of terraform module are not properly collected #8090
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
Ahh, we shall fix this! Thank you for the report. |
@sthdev what version of the provider are you using? I wrote a test for this on v0.7.0 and it seems to work as expected (collecting child module parameters along with the parent). |
I am also using 0.7.0. To clarify: Setting up the workspace works without problems. It's just that the wizard to set up a new workspace does not show the parameters of the parent module if the child module also defines parameters. The workspace can still be created with the default values of the parent module's parameters. Therefore, I don't suspect the bug to be in the coder terraform provider but in the coder frontend. It does not seem to recognize that there are additional parameters for which the user can specify values. |
Ahh, I see. It's odd because the parameters come out in the same format... |
By the way, the Coder version is 0.24.0. I'll update to 0.24.1 and see how it looks. |
I think it'll be the same, but worth trying! |
You're right. The parent parameters are still not shown. |
@mtojek can you look into this? |
I suspect the culprit which is the function responsible for reading parameters in the right order. This routine examines local I think that we could partially fix this by appending remote parameters to the original list. I don't think that we should download all modules to check if they hide parameters. Anyway, if that solution makes sense, I can park some time for this in the next week. |
Why don't you let terraform do the heavy lifting? |
We do, but terraform, or rather the Go library, does not respect the order of parameters and randomizes it. That's why we need to correct the behavior. |
Hi,
I have created a Terraform module,
coder-template-base
, which contains all the basic resources and data elements for all my Coder workspaces in Kubernetes, since these are mostly identical for all my workspace templates. In particular,coder-template-base
contains severalcoder_parameters
in order to allow users to adjust e.g. the home volume size.The actual Coder workspace templates use and parameterize this module, roughly like this:
This works fine, the Coder UI properly shows input fields for all
coder_parameters
ofcoder-template-base
, as long as the templates that use this module do not definecoder_parameters
of their own. If the template defines additionalcoder_parameters
like in the example below, the Coder UI only shows these additionalcoder_parameters
, but not those ofcoder-template-base
.It looks like the algorithm, which collects all
coder_parameters
does not examine the imported modules if it already findscoder_parameters
in the template's terraform files.The text was updated successfully, but these errors were encountered: