fix(jetbrains): scope HTTP version fetch to selected IDEs only#822
Merged
DevelopmentCats merged 2 commits intomainfrom Apr 1, 2026
Merged
fix(jetbrains): scope HTTP version fetch to selected IDEs only#822DevelopmentCats merged 2 commits intomainfrom
DevelopmentCats merged 2 commits intomainfrom
Conversation
The data "http" "jetbrains_ide_versions" resource previously iterated over all IDE options (or all defaults) at plan time, regardless of the user's actual selection. When the JetBrains API was unreachable (e.g. air-gapped environments, DNS failures), this caused a fatal Terraform error — even when no JetBrains IDEs were selected. Changed the for_each on the HTTP data source (and all dependent locals) to use local.selected_ides instead of the full var.options/var.default set. Now: - When no IDEs are selected (default []), zero HTTP requests are made - When N IDEs are selected, only N requests are made (not 9) - Reduces unnecessary latency on every workspace build Closes #821
Contributor
There was a problem hiding this comment.
Pull request overview
Scopes JetBrains release lookups to only the IDEs a user actually selects, avoiding unnecessary (and sometimes fatal) HTTP requests during Terraform plan in environments where data.services.jetbrains.com is unreachable.
Changes:
- Update
data "http" "jetbrains_ide_versions"for_eachto iterate overlocal.selected_idesinstead of all configured options/defaults. - Refactor dependent locals (
parsed_responses,filtered_releases,selected_releases,options_metadata) to also iterate overlocal.selected_ides. - Move/introduce the
selected_idescomputation earlier in the locals block to drive the new iteration strategy.
DevelopmentCats
approved these changes
Apr 1, 2026
Contributor
Version Bump RequiredOne or more modules in this PR need their versions updated. To fix this:
The CI will automatically re-run once you push the updated versions. |
35C4n0r
approved these changes
Apr 1, 2026
DevelopmentCats
pushed a commit
that referenced
this pull request
Apr 1, 2026
…r (1.4.0) (#823) PR #822 bumped the jetbrains module version from `1.3.0` to `1.4.0` (minor), but the change was a bugfix and should have been a patch bump. This corrects all 7 version references in the README from `1.4.0` to `1.3.1`. Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
data "http" "jetbrains_ide_versions"resource fetches release info fromdata.services.jetbrains.comfor all configured IDE options at plan time, regardless of what the user actually selected. When the API is unreachable (air-gapped environments, DNS failures, transient outages), this causes a fatal Terraform error that blocks the workspace build — even when no JetBrains IDEs were selected.Fix
Changed the
for_eachon the HTTP data source (and all dependent locals) from iterating overvar.options/var.defaulttolocal.selected_ides— the user's actual selection.[])["GO"])Validation
terraform testcases passjetbrains_ides=[]— zero HTTP requests, build succeedsjetbrains_ides=["GO"]— single HTTP request for GoLand only,coder_app.jetbrains["GO"]createdCloses #821