Skip to content

namespace parameter (sensitive = true) cannot be changed with --parameters-file or --always-prompt #5556

Closed
@NiklasRosenstein

Description

@NiklasRosenstein

I'm currently working on extending my Kubernetes template, in which I have a variable as such:

variable "namespace" {
  type        = string
  sensitive   = true
  description = "The namespace to create workspaces in (must exist prior to creating workspaces)."
}

When I run coder template push --always-prompt, it prompts me for the value for var.namespace, which I set to default, or coderfoobar, or any other value other than coder but when using the template it always ends up with the value coder (as per the namespace that the resources end up being created in).

Could this be because I deployed Coder via the Coder Helm chart into a Kubernetes cluster under the coder namespace?

The Kubernetes cluster I'm trying create the workspace in is actually a different one.

I believe something similar also happened with use_kubeconfig, where it was always set to null even if I set the default = true, so I had to hard code the provider configuration

provider "kubernetes" {
  # Authenticate via ~/.kube/config or a Coder-specific ServiceAccount (null).
  config_path = "~/.kube/config"
}

(And because of #5548 / because #5551 is not merged yet I put a ~/.kube/config file into the Coder pod by hand 😄 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions