How prem-g01/terraform-gcp-framework-2 works
This is a YAML-driven Google Cloud infrastructure platform. An engineer edits an environment deployment file, runs the validation and render CLI, then Terraform consumes the normalized artifact through a thin environment stack and the platform root to provision reusable resource modules. The graph also preserves the documented bootstrap, resource-module, and optional live-cost capabilities. Validation relationships are supported by the CLI source index and excerpts; Terraform orchestration links rely on the README. Unsampled module-level wiring is not expanded.
Main entry points: cli.py Validation CLI · main.tf Platform root · global Global policies · environments Environment config
Components 26
Configuration
- Environment config
config/environments - Global policies
config/global - Deployment schema
config/schema/deployment.schema.json
Validation engine
- Validation CLI
engine/cli.py - Config loader
engine/config_loader.py - Schema checks
engine/schema_validator.py - Dependency checks
engine/dependency_engine.py - Security checks
engine/security_engine.py - Naming checks
engine/naming_engine.py - Region checks
engine/region_engine.py - Static cost checks
engine/cost_engine.py - Hardcode scanner
engine/hardcode_scanner.py - Live cost lookup
engine/live_cost.py - Validation findings
engine/errors.py
Terraform deployment
- Normalized artifact
- Environment stack
environments - Platform root
platform/main.tf
Resource modules
- Networking modules
modules/networking - Compute modules
modules/compute - Data modules
modules/database - Security and IAM
modules/security - Service modules
modules
Platform operations
- Bootstrap stack
bootstrap - Upload processor
functions/process-upload/main.py
Other components
- Engineer
- Google Cloud
Connections 33
- Engineer → Environment config: edits
README.md - Environment config → Validation CLI: validates
README.md - Validation CLI → Config loader: loads config
engine/cli.py - Config loader → Global policies: loads policies
engine/config_loader.py - Validation CLI → Deployment schema: checks schema
README.md - Validation CLI → Schema checks: runs checks
engine/cli.py - Validation CLI → Dependency checks: runs checks
engine/cli.py - Validation CLI → Security checks: runs checks
engine/cli.py - Validation CLI → Naming checks: runs checks
engine/cli.py - Validation CLI → Region checks: runs checks
engine/cli.py - Validation CLI → Static cost checks: runs checks
engine/cli.py - Validation CLI → Hardcode scanner: runs scan
engine/cli.py - Validation CLI → Validation findings: collects findings
engine/errors.py - Global policies → Dependency checks: sets dependencies
engine/dependency_engine.py - Global policies → Security checks: sets policy
engine/security_engine.py - Global policies → Naming checks: sets rules
engine/naming_engine.py - Global policies → Region checks: sets regions
engine/region_engine.py - Validation CLI → Normalized artifact: renders config
README.md - Normalized artifact → Platform root: configures resources
README.md - Environment stack → Platform root: invokes
README.md - Platform root → Networking modules: uses modules
README.md - Platform root → Compute modules: uses modules
README.md - Platform root → Data modules: uses modules
README.md - Platform root → Security and IAM: uses modules
README.md - Platform root → Service modules: uses modules
README.md - Networking modules → Google Cloud: provisions
README.md - Compute modules → Google Cloud: provisions
README.md - Data modules → Google Cloud: provisions
README.md - Security and IAM → Google Cloud: provisions
README.md - Service modules → Google Cloud: provisions
README.md - Validation CLI → Live cost lookup: opts into
engine/cli.py - Live cost lookup → Google Cloud: queries billing
engine/live_cost.py - Bootstrap stack → Google Cloud: creates prerequisites
README.md