terraform-provider-coder icon indicating copy to clipboard operation
terraform-provider-coder copied to clipboard

coder_parameter default value for type string is empty

Open NiklasRosenstein opened this issue 1 year ago • 3 comments

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

NiklasRosenstein avatar Apr 29 '24 17:04 NiklasRosenstein

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 avatar Apr 30 '24 03:04 matifali

@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.

NiklasRosenstein avatar May 03 '24 15:05 NiklasRosenstein

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

cc: @stirby

matifali avatar May 03 '24 17:05 matifali