Skip to content
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

coder_parameter default value for type string is empty #218

Open
NiklasRosenstein opened this issue Apr 29, 2024 · 3 comments
Open

coder_parameter default value for type string is empty #218

NiklasRosenstein opened this issue Apr 29, 2024 · 3 comments

Comments

@NiklasRosenstein
Copy link

The placeholder for a string parameter suggests that if you leave the field empty, the parameter default will be used. However, what you actually get in the Terraform run is an empty string.

image
@coder-labeler coder-labeler bot added the bug label Apr 29, 2024
@matifali
Copy link
Member

The module dotfiles was recently updated to support a default fallback repo.

module "dotfiles" {
  source               = "registry.coder.com/modules/dotfiles/coder"
  version              = "1.0.12"
  agent_id             = coder_agent.example.id
  default_dotfiles_uri = "https://github.com/coder/dotfiles"
}

@matifali matifali removed the bug label May 1, 2024
@NiklasRosenstein
Copy link
Author

@matifali We're not using this module. I suppose it is relatively easy to work around this issue by falling back to your default value, but it requires you to mention the default URL at least twice in the template and is not intuitive to workspace template developers.

@matifali matifali added the bug label May 3, 2024
@matifali
Copy link
Member

matifali commented May 3, 2024

This relates to the provider, and I am moving it to the coder/terraform-provider-coder repo.

cc: @stirby

@matifali matifali transferred this issue from coder/coder May 3, 2024
@matifali matifali changed the title Users should be able to fall back to the default of a variable by choosing an empty string for the parameter coder_parameter default value for type string is empty May 3, 2024
@matifali matifali removed the bug label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants