Skip to content

fix(stages-aw): coalesce assured_workloads.folder in Stage 2/3 parent fallbacks - #426

Open
johnlakeee wants to merge 1 commit into
mainfrom
fix/stages-aw-folder-parent-fallbacks
Open

johnlakeee wants to merge 1 commit into
mainfrom
fix/stages-aw-folder-parent-fallbacks

Conversation

@johnlakeee

Copy link
Copy Markdown
Collaborator

Description

Align fast/stages-aw/2-networking-b-il5-ngfw/main.tf and fast/stages-aw/3-security/main.tf with 2-networking-a-fedramp/main.tf by coalescing var.common_services_folder and var.assured_workloads.folder before falling back to organizations/${var.organization.id}.

  • Update module "folder".parent in 2-networking-b-il5-ngfw/main.tf and 3-security/main.tf
  • Add unit test tests/test_stage_folder_fallbacks.py

Part of #388 (Milestone 1 — Group A, PR 5 of 6).

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Testing Performed

  • terraform fmt -check -recursive, terraform validate, tflint (155 directories, 0 failed)
  • ruff check & ruff format --check
  • pytest: 132 passed
  • All tests/test_*.sh shell suites passed

@github-actions github-actions Bot added Security Something is insecure or can be secured Scope - Fast Related to Fabric FAST deployment stages in the fast directory Bug Something isn't working Level of Effort - Low Quick, well-defined tasks with no unknowns; takes a few hours up to one day to complete Priority - High Critical issues blocking development or users; urgent bugs or core features for release labels Nov 16, 2026

@aghassemlouei aghassemlouei left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for aligning the Stage 2b and Stage 3 folder parent fallback order with Stage 2a. Inspecting the variable definitions across the three stages surfaced one null-safety mismatch in fast/stages-aw/2-networking-b-il5-ngfw along with a pull request template gap:

  • Unlike fast/stages-aw/2-networking-a-fedramp/variables.tf and fast/stages-aw/3-security/variables.tf, which declare variable "assured_workloads" with type = object({ regime = optional(string), location = optional(string), folder = optional(string) }), nullable = false, and default = {}, fast/stages-aw/2-networking-b-il5-ngfw/variables.tf lines 22 to 26 declare type = any and default = null. When var.assured_workloads is left at its default null or set to {} without a folder key, evaluating var.assured_workloads.folder in fast/stages-aw/2-networking-b-il5-ngfw/main.tf line 32 fails terraform plan with Attempt to get attribute from null value or Unsupported attribute.
  • Please update variable "assured_workloads" in fast/stages-aw/2-networking-b-il5-ngfw/variables.tf to match the typed object schema in 2-networking-a-fedramp/variables.tf and 3-security/variables.tf and regenerate fast/stages-aw/2-networking-b-il5-ngfw/README.md with tools/tfdoc.py.
  • Please also include the ## Deployment & Compliance Impact and ## Checklist sections from .github/pull_request_template.md in the pull request description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Level of Effort - Low Quick, well-defined tasks with no unknowns; takes a few hours up to one day to complete Priority - High Critical issues blocking development or users; urgent bugs or core features for release Scope - Fast Related to Fabric FAST deployment stages in the fast directory Security Something is insecure or can be secured

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants