Update server_base_path format logic in modules
This change addresses the improvement of readability and consistency by simplifying the `server_base_path` construction logic, thereby enhancing maintainability across the respective Terraform modules.
This commit is contained in:
@@ -90,7 +90,7 @@ resource "coder_app" "jupyterlab" {
|
||||
}
|
||||
|
||||
locals {
|
||||
server_base_path = var.subdomain ? "" : format(var.agent_name != null ? "/@%s/%s.%s/apps/%s" : "/@%s/%s/apps/%s", data.coder_workspace_owner.me.name, data.coder_workspace.me.name, var.agent_name, var.slug)
|
||||
server_base_path = var.subdomain ? "" : format("/@%s/%s%s/apps/%s", data.coder_workspace_owner.me.name, data.coder_workspace.me.name, var.agent_name != null ? ".${var.agent_name}" : "", var.slug)
|
||||
url = "http://localhost:${var.port}${local.server_base_path}"
|
||||
healthcheck_url = "http://localhost:${var.port}${local.server_base_path}/api"
|
||||
}
|
||||
Reference in New Issue
Block a user