Skip to content

Commit d648517

Browse files
matifaliclaudeDevelopmentCats
authored
fix(jetbrains): update Terraform version requirement to 1.9+ (#513)
## Summary - Updated `required_version` constraint from `>= 1.0` to `>= 1.9` in jetbrains module - Added inline comment explaining the cross-variable validation requirement - Bumped module version from `1.1.0` to `1.1.1` (patch version) ## Issue The jetbrains module uses cross-variable validation at line 169-171 where `var.options` is referenced within the `var.ide_config` validation block: ```tf validation { condition = alltrue([ for code in var.options : contains(keys(var.ide_config), code) ]) error_message = "The ide_config must be a superset of var.options." } ``` This pattern requires Terraform 1.9+ and fails on earlier versions with: ``` Error: Invalid reference in variable validation The condition for variable "ide_config" can only refer to the variable itself, using var.ide_config. ``` ## References - Terrafomr release blog that talks abut this feature: https://www.hashicorp.com/en/blog/terraform-1-9-enhances-input-variable-validations - Terraform PR that added this feature: hashicorp/terraform#34955 - HashiCorp Support Article: https://support.hashicorp.com/hc/en-us/articles/43291233547027 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: DevCats <christofer@coder.com>
1 parent d3b40c0 commit d648517

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

registry/coder/modules/jetbrains/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This module adds JetBrains IDE buttons to launch IDEs directly from the dashboar
1414
module "jetbrains" {
1515
count = data.coder_workspace.me.start_count
1616
source = "registry.coder.com/coder/jetbrains/coder"
17-
version = "1.1.0"
17+
version = "1.1.1"
1818
agent_id = coder_agent.example.id
1919
folder = "/home/coder/project"
2020
# tooltip = "You need to [Install Coder Desktop](https://coder.com/docs/user-guides/desktop#install-coder-desktop) to use this button." # Optional
@@ -40,7 +40,7 @@ When `default` contains IDE codes, those IDEs are created directly without user
4040
module "jetbrains" {
4141
count = data.coder_workspace.me.start_count
4242
source = "registry.coder.com/coder/jetbrains/coder"
43-
version = "1.1.0"
43+
version = "1.1.1"
4444
agent_id = coder_agent.example.id
4545
folder = "/home/coder/project"
4646
default = ["PY", "IU"] # Pre-configure GoLand and IntelliJ IDEA
@@ -53,7 +53,7 @@ module "jetbrains" {
5353
module "jetbrains" {
5454
count = data.coder_workspace.me.start_count
5555
source = "registry.coder.com/coder/jetbrains/coder"
56-
version = "1.1.0"
56+
version = "1.1.1"
5757
agent_id = coder_agent.example.id
5858
folder = "/home/coder/project"
5959
# Show parameter with limited options
@@ -67,7 +67,7 @@ module "jetbrains" {
6767
module "jetbrains" {
6868
count = data.coder_workspace.me.start_count
6969
source = "registry.coder.com/coder/jetbrains/coder"
70-
version = "1.1.0"
70+
version = "1.1.1"
7171
agent_id = coder_agent.example.id
7272
folder = "/home/coder/project"
7373
default = ["IU", "PY"]
@@ -82,7 +82,7 @@ module "jetbrains" {
8282
module "jetbrains" {
8383
count = data.coder_workspace.me.start_count
8484
source = "registry.coder.com/coder/jetbrains/coder"
85-
version = "1.1.0"
85+
version = "1.1.1"
8686
agent_id = coder_agent.example.id
8787
folder = "/workspace/project"
8888
@@ -108,7 +108,7 @@ module "jetbrains" {
108108
module "jetbrains_pycharm" {
109109
count = data.coder_workspace.me.start_count
110110
source = "registry.coder.com/coder/jetbrains/coder"
111-
version = "1.1.0"
111+
version = "1.1.1"
112112
agent_id = coder_agent.example.id
113113
folder = "/workspace/project"
114114
@@ -128,7 +128,7 @@ Add helpful tooltip text that appears when users hover over the IDE app buttons:
128128
module "jetbrains" {
129129
count = data.coder_workspace.me.start_count
130130
source = "registry.coder.com/coder/jetbrains/coder"
131-
version = "1.1.0"
131+
version = "1.1.1"
132132
agent_id = coder_agent.example.id
133133
folder = "/home/coder/project"
134134
default = ["IU", "PY"]

registry/coder/modules/jetbrains/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.0"
2+
required_version = ">= 1.9"
33

44
required_providers {
55
coder = {
@@ -163,7 +163,8 @@ variable "ide_config" {
163163
condition = length(var.ide_config) > 0
164164
error_message = "The ide_config must not be empty."
165165
}
166-
# ide_config must be a superset of var.. options
166+
# ide_config must be a superset of var.options
167+
# Requires Terraform 1.9+ for cross-variable validation references
167168
validation {
168169
condition = alltrue([
169170
for code in var.options : contains(keys(var.ide_config), code)

0 commit comments

Comments
 (0)