fix(aws): derive AMI name prefix from var.prefix#2115
Merged
sitole merged 2 commits intoe2b-dev:mainfrom Mar 13, 2026
Merged
Conversation
The Packer template names AMIs as "${var.prefix}orch-<timestamp>", but
all node pool modules had image_family_prefix hardcoded to "e2b-orch-".
This breaks AMI lookup for any custom PREFIX (e.g. "e2bdev-" produces
"e2bdev-orch-" AMIs that Terraform can't find).
Introduce local.ami_family_prefix computed from var.prefix and use it
for all node pools. Also wire build_image_family_prefix which was
previously missing from main.tf (silently falling back to the hardcoded
default in the submodule).
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
sitole
reviewed
Mar 12, 2026
Member
There was a problem hiding this comment.
Please make it back compatible by changing value TF vars to empty string and then locally evaluate clickhouse_image_family_prefix = var.clickhouse_image_family_prefix == "" ? locals.ami_family_prefix : var.clickhouse_image_family_prefix we still need to be able to override ami for each node pool separately.
Per review: restore image_family_prefix variables with default="" and use conditional evaluation so each node pool can still be overridden independently. When empty (default), falls back to local.ami_family_prefix derived from var.prefix. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
sitole
approved these changes
Mar 13, 2026
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.
Summary
${prefix}orch-<timestamp>, but all Terraform node pool modules hardcodeimage_family_prefix = "e2b-orch-". Any custom PREFIX (e.g.e2bdev-) causesterraform planto fail with "Your query returned no results" when looking up AMIs.local.ami_family_prefix = "${var.prefix}orch-"and use it for all 5 node pools (control_server, api, client, clickhouse, build). Remove the 4 now-unused*_image_family_prefixvariables fromvariables.tf.build_image_family_prefixwas never passed frommain.tfto the cluster module — it silently fell back to the submodule's hardcoded default. Now explicitly wired.Test plan
terraform planstill finds AMIs namede2b-orch-*— no behavior changeterraform plannow correctly looks fore2bdev-orch-*AMIs🤖 Generated with Claude Code