INFRA-6062: Trim region suffix from cluster_name in Gateway API LB name prefix#96
Merged
marcin-janas merged 1 commit intomainfrom Mar 26, 2026
Conversation
…efix Signed-off-by: Marcin Janas <marcin.janas@toolsforhumanity.com>
lglgd
approved these changes
Mar 26, 2026
tcharewicz
approved these changes
Mar 26, 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.
Requestor/Issue: https://linear.app/worldcoin/issue/INFRA-6062/create-gateway-api-albnlb-from-terraform-aws-eks
Tested (yes/no): yes
Description/Why: clusters following the
<name>-<region>naming convention (e.g.tools-gatewayapi1-dev-us-east-1) exceed the 21-charactergateway_api_lb_name_prefixlimit because the region is included in the default prefix. ALB and NLB modules already strip the region, so this aligns behavior. The fix auto-trims the-<region>suffix fromcluster_namebefore using it as the defaultgateway_api_lb_name_prefix, avoiding the precondition error without requiring callers to set the variable explicitly