Skip to content

feat: ensure merged lab config is materialized for infra actions#140

Merged
l50 merged 1 commit intomainfrom
fix/materialize-overlay-config-for-terragrunt
Apr 22, 2026
Merged

feat: ensure merged lab config is materialized for infra actions#140
l50 merged 1 commit intomainfrom
fix/materialize-overlay-config-for-terragrunt

Conversation

@l50
Copy link
Copy Markdown
Contributor

@l50 l50 commented Apr 22, 2026

Key Changes:

  • Added automatic materialization of merged lab config JSON for infra commands
  • Refactored log file path construction into a dedicated helper function
  • Updated .gitignore to exclude generated merged lab config files

Added:

  • Automatic materialization of merged lab config JSON before infra actions,
    ensuring that terragrunt always receives the correct config, even when overlays
    are used
  • materializeLabConfig function to handle merging and placement of lab config
    files as required by terragrunt
  • infraLogPath helper function for consistent and centralized log file path
    generation logic

Changed:

  • Refactored log file path calculation in infra commands to use the new
    infraLogPath function, reducing duplication and improving maintainability
  • Updated infra action flow to call materializeLabConfig before executing any
    infra action to prevent missing or outdated config errors
  • Updated .gitignore to exclude all generated merged lab config files
    (ad/GOAD/data/*-config.json) from version control to prevent accidental
    commits of build artifacts

Removed:

  • Inlined log file path logic from infra command handler, replaced by
    infraLogPath for better clarity and reuse

…ration

Materialize merged overlay configs to the path terragrunt HCL expects
(ad/GOAD/data/{env}-config.json) before running any infra action. This
fixes terragrunt failing with 'no file exists' when only an overlay
file is present.

Extract infraLogPath helper to reduce cyclomatic complexity of
runInfraAction.

Add gitignore pattern for generated merged lab configs.
@l50 l50 merged commit 0dd73d6 into main Apr 22, 2026
8 checks passed
@l50 l50 deleted the fix/materialize-overlay-config-for-terragrunt branch April 22, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant