@ -14,11 +14,6 @@ variable "agent_id" {
description = " The ID of a Coder agent. "
description = " The ID of a Coder agent. "
}
}
variable " agent_name " {
type = string
description = " The name of a Coder agent. "
}
variable " folder " {
variable " folder " {
type = string
type = string
description = " The directory to open in the IDE. e.g. /home/coder/project "
description = " The directory to open in the IDE. e.g. /home/coder/project "
@ -33,13 +28,14 @@ variable "default" {
variable " jetbrains_ides " {
variable " jetbrains_ides " {
type = list ( string )
type = list ( string )
description = " The list of IDE product codes. "
description = " The list of IDE product codes. "
default = [ " IU " , " PS " , " WS " , " PY " , " CL " , " GO " , " RM " ]
validation {
validation {
condition = (
condition = (
alltrue ( [
alltrue ( [
for code in var . jetbrains_ides : contains ( [ " IU " , " IC" , " PS" , " WS " , " PY " , " PC " , " CL " , " GO " , " DB " , " RD " , " RM " ] , code )
for code in var . jetbrains_ides : contains ( [ " IU " , " PS" , " WS " , " PY " , " CL " , " GO " , " RM " ] , code )
] )
] )
)
)
error_message = " The jetbrains_ides must be a list of valid product codes. Valid product codes are : IU, IC , PS, WS, PY, PC , CL, GO, DB, RD , RM."
error_message = " The jetbrains_ides must be a list of valid product codes. Valid product codes are IU, PS, WS, PY, CL, GO, RM."
}
}
# check if the list is empty
# check if the list is empty
validation {
validation {
@ -58,57 +54,37 @@ locals {
" GO " = {
" GO " = {
icon = " /icon/goland.svg " ,
icon = " /icon/goland.svg " ,
name = " GoLand " ,
name = " GoLand " ,
value = jsonencode ( [ " GO " , " 232. 9921.53" , " https://download.jetbrains.com/go/goland-2023.2.2 .tar.gz" ] )
value = jsonencode ( [ " GO " , " 232. 10203.20" , " https://download.jetbrains.com/go/goland-2023.2.4 .tar.gz" ] )
} ,
} ,
" WS " = {
" WS " = {
icon = " /icon/webstorm.svg " ,
icon = " /icon/webstorm.svg " ,
name = " WebStorm " ,
name = " WebStorm " ,
value = jsonencode ( [ " WS " , " 232. 9921.42" , " https://download.jetbrains.com/webstorm/WebStorm-2023.2.2 .tar.gz" ] )
value = jsonencode ( [ " WS " , " 232. 10203.14" , " https://download.jetbrains.com/webstorm/WebStorm-2023.2.4 .tar.gz" ] )
} ,
} ,
" IU " = {
" IU " = {
icon = " /icon/intellij.svg " ,
icon = " /icon/intellij.svg " ,
name = " IntelliJ IDEA Ultimate " ,
name = " IntelliJ IDEA Ultimate " ,
value = jsonencode ( [ " IU " , " 232.9921.47 " , " https://download.jetbrains.com/idea/ideaIU-2023.2.2.tar.gz " ] )
value = jsonencode ( [ " IU " , " 232.10203.10 " , " https://download.jetbrains.com/idea/ideaIU-2023.2.4.tar.gz " ] )
} ,
" IC " = {
icon = " /icon/intellij.svg " ,
name = " IntelliJ IDEA Community " ,
value = jsonencode ( [ " IC " , " 232.9921.47 " , " https://download.jetbrains.com/idea/ideaIC-2023.2.2.tar.gz " ] )
} ,
} ,
" PY " = {
" PY " = {
icon = " /icon/pycharm.svg " ,
icon = " /icon/pycharm.svg " ,
name = " PyCharm Professional " ,
name = " PyCharm Professional " ,
value = jsonencode ( [ " PY " , " 232. 9559.58 " , " https://download.jetbrains.com/python/pycharm-professional-2023.2. 1 .tar.gz" ] )
value = jsonencode ( [ " PY " , " 232.10203.26 " , " https://download.jetbrains.com/python/pycharm-professional-2023.2.4.tar.gz " ] )
} ,
} ,
" PC " = {
icon = " /icon/pycharm.svg " ,
name = " PyCharm Community " ,
value = jsonencode ( [ " PC " , " 232.9559.58 " , " https://download.jetbrains.com/python/pycharm-community-2023.2.1.tar.gz " ] )
} ,
" RD " = {
icon = " /icon/rider.svg " ,
name = " Rider " ,
value = jsonencode ( [ " RD " , " 232.9559.61 " , " https://download.jetbrains.com/rider/JetBrains.Rider-2023.2.1.tar.gz " ] )
}
" CL " = {
" CL " = {
icon = " /icon/clion.svg " ,
icon = " /icon/clion.svg " ,
name = " CLion " ,
name = " CLion " ,
value = jsonencode ( [ " CL " , " 232.9921.42 " , " https://download.jetbrains.com/cpp/CLion-2023.2.2.tar.gz " ] )
value = jsonencode ( [ " CL " , " 232.9921.42 " , " https://download.jetbrains.com/cpp/CLion-2023.2.2.tar.gz " ] )
} ,
} ,
" DB " = {
icon = " /icon/datagrip.svg " ,
name = " DataGrip " ,
value = jsonencode ( [ " DB " , " 232.9559.28 " , " https://download.jetbrains.com/datagrip/datagrip-2023.2.1.tar.gz " ] )
} ,
" PS " = {
" PS " = {
icon = " /icon/phpstorm.svg " ,
icon = " /icon/phpstorm.svg " ,
name = " PhpStorm " ,
name = " PhpStorm " ,
value = jsonencode ( [ " PS " , " 232. 9559.64" , " https://download.jetbrains.com/webide/PhpStorm-2023.2.1 .tar.gz" ] )
value = jsonencode ( [ " PS " , " 232.10072.32 " , " https://download.jetbrains.com/webide/PhpStorm-2023.2.3.tar.gz " ] )
} ,
} ,
" RM " = {
" RM " = {
icon = " /icon/rubymine.svg " ,
icon = " /icon/rubymine.svg " ,
name = " RubyMine " ,
name = " RubyMine " ,
value = jsonencode ( [ " RM " , " 232. 9921.48" , " https://download.jetbrains.com/ruby/RubyMine-2023.2.2 .tar.gz" ] )
value = jsonencode ( [ " RM " , " 232. 10203.15" , " https://download.jetbrains.com/ruby/RubyMine-2023.2.4 .tar.gz" ] )
}
}
}
}
}
}
@ -143,8 +119,8 @@ resource "coder_app" "gateway" {
url = join ( " " , [
url = join ( " " , [
" jetbrains-gateway://connect#type=coder&workspace= " ,
" jetbrains-gateway://connect#type=coder&workspace= " ,
data . coder_workspace . me . name ,
data . coder_workspace . me . name ,
" &agent =" ,
" &agent _id =" ,
var . agent_ name ,
var . agent_ id ,
" &folder= " ,
" &folder= " ,
var . folder ,
var . folder ,
" &url= " ,
" &url= " ,