André König
André König
CCoder.com
Created by André König on 3/16/2023 in #help
HTTPS leads to 502 Bad Gateway
We have the Coder Server and all the workspaces within an own Tailnet. Everything works as expected when running code-server via http. Now, when we try to utilize tailscale cert and pass the generated cert / key to the code-server in our template, we run into a 502, when opening the code-server via the Coder Server workspace view. I'm pretty sure that we oversee something here. This is our current configuration:
resource "coder_app" "code-server" {
agent_id = coder_agent.dev.id
slug = "code-server"
display_name = "VS Code"
icon = "/icon/code.svg"
url = "https://${local.fqdn}/?folder=/home/${data.coder_workspace.me.owner}/project"

share = "owner"
subdomain = false

healthcheck {
url = "https://${local.fqdn}/healthz"
interval = 5
threshold = 6
}
}
resource "coder_app" "code-server" {
agent_id = coder_agent.dev.id
slug = "code-server"
display_name = "VS Code"
icon = "/icon/code.svg"
url = "https://${local.fqdn}/?folder=/home/${data.coder_workspace.me.owner}/project"

share = "owner"
subdomain = false

healthcheck {
url = "https://${local.fqdn}/healthz"
interval = 5
threshold = 6
}
}
Whereas, local.fqdn contains the whole tailnet *.ts.net domain. In the workspace view, everything looks good, but when opening code-server, the 502 appears. Any pointer into the right direction is highly appreciated 🙂
13 replies