Luna Lovegood
Luna Lovegood
CCoder.com
Created by Luna Lovegood on 12/9/2024 in #help
`cache_repo` doesn't work
No description
7 replies
CCoder.com
Created by Luna Lovegood on 12/6/2024 in #help
Add `map(string)` to `code_parameter` support type
I'm using the vscode-web module in the template. When my team creates workspaces from the template, I want to allow them to select extensions and apply settings that suit their needs by using the coder_parameter vscode_web_extensions and vscode_settings. In main.tf:
data "coder_parameter" "vscode_web_extensions" {
description = <<-EOF
A list of extensions to install to VS Code web.
EOF
display_name = "VS Code Web Extensions"
mutable = true
name = "vscode_web_extensions"
type = "list(string)"

}

data "coder_parameter" "vscode_settings" {
description = <<-EOF
A map of settings to apply to VS Code web.
EOF
display_name = "VS Code Web Settings"
mutable = true
name = "vscode_settings"
type = "map(string)"
}

module "vscode-web" {
source = "registry.coder.com/modules/vscode-web/coder"
version = "1.0.22"
agent_id = coder_agent.main.id
extensions = data.coder_parameter.vscode_web_extensions.value
accept_license = true
settings = data.coder_parameter.vscode_settings.value

folder = "/workspaces"
subdomain = false
}
data "coder_parameter" "vscode_web_extensions" {
description = <<-EOF
A list of extensions to install to VS Code web.
EOF
display_name = "VS Code Web Extensions"
mutable = true
name = "vscode_web_extensions"
type = "list(string)"

}

data "coder_parameter" "vscode_settings" {
description = <<-EOF
A map of settings to apply to VS Code web.
EOF
display_name = "VS Code Web Settings"
mutable = true
name = "vscode_settings"
type = "map(string)"
}

module "vscode-web" {
source = "registry.coder.com/modules/vscode-web/coder"
version = "1.0.22"
agent_id = coder_agent.main.id
extensions = data.coder_parameter.vscode_web_extensions.value
accept_license = true
settings = data.coder_parameter.vscode_settings.value

folder = "/workspaces"
subdomain = false
}
However, currently, coder_parameter doesn't support the map type, so I don't have a way to implement this for vscode_settings. https://github.com/coder/terraform-provider-coder/blob/c9dbd6f7639765999b3e84c2f966b3a171d31a4d/provider/parameter.go#L202-L208 Will coder_parameter support type map in the near future?
13 replies
CCoder.com
Created by Luna Lovegood on 12/2/2024 in #help
Pass Git credentials from Coder into Envbuilder
Hi, I have deployed Coder on K8s via Helm. As far as I understand after reading the docs, Coder provides an authentication method via a GitHub OAuth app, but this only helps users log in and register with the Coder server. When creating a workspace using Envbuilder, users still need to provide additional credentials in some way (such as ENVBUILDER_GIT_PASSWORD, ENVBUILDER_GIT_SSH_PRIVATE_KEY_PATH, or ENVBUILDER_GIT_SSH_PRIVATE_KEY_BASE64) to clone a private repository. This may not be convenient for users who have already logged in with GitHub or may "feel insecure" about pasting their sensitive credentials. In section Secrets did mention about SSH key pairs for each user, I've add this public key into my github account but I still cannot clone private repo within Envbuilder. How can user use this public key to be able to clone their repo when creating Coder workspace?
3 replies
CCoder.com
Created by Luna Lovegood on 11/29/2024 in #help
Cannot change namespace value for Devcontainer in K8s
No description
18 replies