Skip to content

problems with validation for jetbrains gateway module folder #61

Closed
@Forestsoft-de

Description

@Forestsoft-de

The error message is:

Error: Invalid value for variable
on main.tf line 248, in module "jetbrains_gateway":
  248:   folder         = "/home/coder/${local.folder_name}"
    ├────────────────
    │ var.folder is "/home/coder/foo/"
The folder must be a full path and must not start with a ~.
This was checked by the validation rule at .terraform/modules/jetbrains_gateway/main.tf:29,3-13.

The hcl is

locals {
    base_name = try(element(split("/", data.coder_parameter.git_repo.value), length(split("/", data.coder_parameter.git_repo.value)) - 1), "project/")
    #folder_name = try(local.base_name, "project/")
    folder_name = "foo/"

}
}
module "jetbrains_gateway" {
  source         = "registry.coder.com/modules/jetbrains-gateway/coder"
  version        = "1.0.13"
  agent_id       = coder_agent.main.id
  agent_name     =  "main"
  folder         = "/home/coder/${local.folder_name}"
  jetbrains_ides = ["PS", "GO", "IU", "PY", "WS"]
  default        = "PS"
}

i guessed there is a problem with the evaluation of folder_name and so i tried to set on the foldername directly.

BR
Sebastian

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions