Repository navigation
fix(2-networking): derive the IL5 NGFW landing gateway from the configured region - #301
Merged
Merged
Conversation
…e configured region The bootstrap.xml object read the landing gateway from a hard-coded us-east4/landing-default subnet key, so the stage failed in any other IL4 or IL5 region. Key the lookup by the bootstrap region instead, as the NGFW instance templates already do, and validate that subnets.landing holds landing-default and each environment's first tenant subnet in regions.primary.
Both stage 2 samples set every subnet to us-central1 while Stage 0 defaults regions.primary to us-east4, so copying a sample unchanged failed the region validations. Use the <region> placeholder that the Stage 0 and Stage 1 samples already use, and tell operators in the stage READMEs and the DDG to replace it with regions.primary.
…t regions Extend the subnets validation from landing-default to the landing, dmz and mgmt default subnets, because the NGFW instance templates look up all three by region inside try() and a wrong region otherwise fails only at apply. Shorten both validation error messages. Update the stage README so the <region> replacement step applies to every operator, drop the regions.secondary reference, and stop limiting IL4 and IL5 to us-east4 and us-central1.
15 of 26 tasks
aghassemlouei
approved these changes
Oct 20, 2026
aghassemlouei
left a comment
Member
There was a problem hiding this comment.
Verified that keying lz_gateway_ip in fast/stages-aw/2-networking-b-il5-ngfw/ngfw.tf by ${each.value}/landing-default aligns bootstrap-xml with the regional instance template lookups, and that the subnets variable validations and <region> sample placeholders catch mismatched Stage 2 region settings at plan time.
Merged
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.
Description
This change lets the IL4 and IL5 networking stage deploy in any Assured Workloads IL4 or IL5 region, not only
us-east4.The
bootstrap-xmlobject in thefast/stages-aw/2-networking-b-il5-ngfw/ngfw.tffile read the landing gateway from the hard-codedus-east4/landing-defaultsubnet key. In any other region, the lookup failed at plan time. Google lists IL4 and IL5 support forus-central1,us-east1,us-east4,us-west1,us-west2,us-west3,us-west4and theusmulti-region.each.valueas its key, which matches how the NGFW instance templates already pick their subnets.subnetsvariable requires thelanding-default,dmz-defaultandmgmt-defaultsubnets in every region ofvar.regions. The NGFW instance templates look up all three by region insidetry(), so a wrong region previously failed only at apply.regions.primary. Thebootstrap.xmltenant routes and the stage outputs already index that subnet.terraform.tfvars.samplefiles previously set every subnet tous-central1, while Stage 0 defaultsregions.primarytous-east4. The samples now use the<region>placeholder that the Stage 0 and Stage 1 samples already use, with a comment that it must matchregions.primary.docs/ddg.mdguide now tell every operator to replace<region>.us-east4andus-central1, and it no longer mentions the removedregions.secondarykey.tests/tools/test_stage2_networking.pyfile checks that thengfw.tffile has no literalus-east4/subnet key, that the new validation covers all three default subnets, and that both samples use the<region>placeholder.Neither validation breaks a working configuration. Each one rejects only inputs that already failed at plan or apply time.
No tracking issue exists for this fix.
Type of Change
Deployment & Compliance Impact
Checklist
Code Quality & Reusability
modules/orfast/stages-aw/can be leveraged for this change.docs/naming-convention.md.Documentation
README.mdof the modified module or blueprint.Security
Testing
Testing Performed
terraform fmt -check -recursivepasses on the2-networking-a-fedrampand2-networking-b-il5-ngfwstages.terraform init -backend=falseandterraform validatepass on the2-networking-b-il5-ngfwstage. A temporary file declared thegoogleandgoogle-betabillingprovider aliases that the downloaded2-networking-providers.tffile normally supplies. Without those aliases, validation fails onmaintoo.terraform planagainst a scratch module with copies of theregions,envs_foldersandsubnetsvariables exercised the new validations.us-west2andregions.primary = "us-west2"plans with no changes.landing-default,dmz-defaultormgmt-defaultsubnet in another region fails with the new default subnet error.pytest -qpasses, with 67 tests including the new guard test.tools/tfdoc.py --replaceregenerated the stage README table, andtools/check_documentation.pypasses for the2-networking-b-il5-ngfwstage.mainand are out of scope.tools/check_documentation.pyreportsFAIL_STALE_TOCfor the2-networking-a-fedrampREADME.tools/check_boilerplate.py fast testsflags the untouchedfast/stages-aw/1-resman/branch-tenants.tffile.Notes for reviewers
regions.primaryvalidations, so splitting the FedRAMP sample out would leave it unusable with the Stage 0 default region.tests/tools/*to a flattests/directory. Whichever PR merges second needs a rebase that carries the new test intotests/test_stage2_networking.py.tools/lint.shand does not overlap with this diff.