Commit Graph

46 Commits

Author SHA1 Message Date
Julio Castillo
008a3719ad Support service_agents_config.skip_iam in project-factory and fast stages (#4007)
* Support service_agents_config.skip_iam in project-factory and fast stages

* Fix inventories

* Change service-agent creation/iam order
2026-06-01 10:04:54 +00:00
Josh Myers
abff147a95 feat(project-factory): Support factories_config in data_defaults (#3966) 2026-05-14 13:44:15 +00:00
Ludovico Magnocavallo
9540b8d1ae Allow simple project exclusions in project factory module (#3929)
* docs(cloud-function-v2): remove redundant vpc_connector block in examples

* project factory exclusions for projects

* fix example test

---------

Co-authored-by: Luca Prete <preteluca@gmail.com>
2026-05-04 15:20:57 +02:00
Julio Castillo
2eaa0d5e27 Add support for dynamic tags (#3897)
* Allow creation of dynamic tags

* Extend project factory and related modules to support dynamic values

* Extend folder and organization modules

* project and organization readme

* Simplify dynamic tag support and remove unnecessary restrictions

  • Schemas & Validations: Removed the restriction that forbade combining IAM fields with  allowed_values_regex  on tags. Updated validations in  project  and  organization  modules, and
  simplified all relevant JSON schemas.
  • Module Tag Bindings: Simplified the  tag_value  assignment in  folder ,  project ,  gcs ,  bigquery-dataset , and  kms  modules by removing the defensive  can(regex(...))  check and
  calling  templatestring  directly.
  • Outputs: Removed the  tags_dynamic  output from  project  and  organization  modules, as the same information is now available in  tag_keys .
  • Project Factory: Updated  tag_vars_projects  in  projects.tf  to use the native  namespaced_name  attribute and filtered manually for dynamic tags.

* fix(organization, project): fix linting and tests for dynamic tag support

- Align allowed_values_regex and description extraction in _tags_merged
  locals to use lookup() for consistency with other fields.
- Fix spacing in project context variable (alphabetical ordering).
- Update organization tags test to include the new cost_center tag key
  with allowed_values_regex.
- Update project tags test to include the new cost_center tag key and
  reflect the resolved allowed_values_regex on environment.

* refactor(gcs): refine tag bindings and fix context test

- Add _tag_bindings local to pre-resolve context references, enabling
  templatestring to receive a direct map reference (required by Terraform).
- Use var.context.tag_vars instead of the non-existent local.ctx.tag_vars.
- Fix HCL syntax in context.tfvars (escaped inner quotes).
- Update context test inventory to reflect 3 tag bindings including a
  dynamic value resolved via templatestring.

* refactor: align modules with tag binding context pattern

- Add _tag_bindings local + templatestring dance to cloud-run-v2,
  compute-vm, folder, kms modules (bigquery-dataset already had it)
- Exclude tag_vars from local.ctx in cloud-run-v2, compute-vm, folder,
  kms, project modules (bigquery-dataset already had it)
- Add tag_vars to context variable in cloud-run-v2, compute-vm modules
  (others already had it)
- Update all context tests with dynamic tag binding values using
  var.context.tag_vars

* docs: add module-level tftest.yaml test instructions to GEMINI.md

* docs: regenerate READMEs after tag-regex alignment

- Regenerate variable tables in 7 module READMEs to reflect
  line number shifts from prior tag-regex changes
- Add tag_vars exclusion to gcs ctx local
- Fix whitespace alignment in iam-service-account and
  project-factory tag_vars blocks
- Update tftest resource counts for organization and project
- Remove tags_dynamic from organization/project output tables

* fix(project-factory): update test inventory for tag_bindings module split

- Move tag binding address from folder-2 to folder-2-iam in test
  inventory (tag_bindings moved from creation to IAM modules)
- Update module instance count from 34 to 35
- Regenerate README tables after terraform fmt line shifts
- Apply terraform fmt to variables.tf

* refactor(project-factory): remove unnecessary depends_on from folder-iam modules

Folder IAM modules depend on their own folder creation modules, not
on module.projects. The explicit depends_on was leftover from an
earlier design.

* FAST stages

* Address review comments.

- FAST Stages:
  - Added tag_keys to output-files.tf in 0-org-setup to pass org tags via tfvars.
  - Sorted tag_keys and tag_values in output-files.tf.
  - Updated project-factory, networking, and security stages to use tag_keys.
  - Filtered tag_keys for dynamic tags only.
- Modules:
  - Excluded tag_vars from local.ctx in iam-service-account and organization.
  - Simplified tag_value in iam-service-account.
- Tests:
  - Updated test inventories for 0-org-setup and project-factory.

* Fix tf format

* Fix tfdoc

* docs: add ADR for templatestring vars convention and update status of base path ADR

* More tfdoc

* Update schemas

* Use endswith in context loop

* Address review

* Update FAST readmes

* Update last modules

* Terraform fmt

* Revert alloydb

* Fix whitespace

---------

Co-authored-by: Ludovico Magnocavallo <ludo@qix.it>
2026-04-24 20:45:45 +00:00
Liam Nesteroff
f5ee82ab3a Add DNS Armor support (#3874)
* add dns armor module

* add dns armor to pf

* added missing/optional attributes

* Update project schemas

* Set version file copyright year to 2025

* replace module with single resource

* moved into it's own file

* Added tests and defaulting enabled to false

* Add optional name parameter and updated schemas

* make dns_threat_detector.enabled optional in project schemas

---------

Co-authored-by: Luca Prete <preteluca@gmail.com>
2026-04-24 08:58:48 +02:00
Ludovico Magnocavallo
fb21f6aaf8 Change factories_config type in FAST and project/vpc factory modules, add YAML schema validation (#3728)
* stage 0

* stage 1

* networking

* security

* pf stage

* tfdoc

* align schemas

* inventory

* fix observability

* pf module

* pf module budgets

* align fast stages

* align project subfactories

* tfdoc

* schema validation

* add missing schemas

* Fix observability types

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2026-02-11 15:29:49 +00:00
Ludovico Magnocavallo
bcca9e44ac Support project-level tag key/value contexts in project factory (#3714)
* cross-project tag context

* improve regression test

* add tag contexts to README contexts table
2026-02-09 08:54:29 +00:00
Vannick Trinquier
d499dc6928 Add support for bucket logging configuration in module gcs and project-factory (#3699) 2026-02-06 14:14:46 +07:00
Julio Castillo
d9e1b924a1 Add asset_feeds to resman modules (#3658)
* Add asset_feeds to resman modules

* Add examples and update readmes

* Extend pubsub_topic context to project and folder modules

* Use pubsub_topic context for pubsub_destination

* Update readmes and add project-factory asset_feed example

* Update context tests

* Update schemas
2026-01-20 14:37:35 +00:00
kovagoadam
4e88bec299 Use project numbers in billing budget filter (#3555)
* Fixed project level billing budget filter

* Moved project_numbers local to concat block

* Fixed with try block

* fix project replacement

* tfdoc

* fix test

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2025-12-10 17:35:06 +00:00
Ludovico Magnocavallo
ba77c6170c Allow configuring data access logs from org/folder/project schemas (#3516)
* modules and FAST support

* module tests

* fast stage 0 dataset

* tfdoc
2025-11-10 10:19:21 +00:00
Ludovico Magnocavallo
0a2cc758ac Essential contacts in schemas, and email context substitutions (#3495)
* modules

* fast

* duplicate diff

* fix contacts in FAST stage 0 datasets, update contacts in YAML schemas
2025-11-03 08:53:29 +01:00
Vannick Trinquier
c60ae3652a Adding hardened datasets for preventive and detective Compliance Controls (#3410)
* Adding hardened datasets for preventive and detective Compliance Controls in stage 0 and stage 1 VPC-SC

* Move observability to factory file

* Update documentation

* Update local variable for use

* Update observability factory to use other module

* Add raw diagram file for hardened datasets

* Retrofit change

* Rename log_buckets context variable to be consistent across modules

* Update stage 0 documentation to mention hardened dataset

* Update customer ids list

* Update documentation, path to schema add ID to access level

* Comment organization policy gcp.resourceLocation by default

* Prevent duplicate key error by merging principal roles

* Adding ngfw roles files in hardened datasets

* Update script to validate files differences to support folder and datasets

* Format duplicate-diff python script

* Remove .config.yaml from duplicates

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2025-10-21 10:34:25 +00:00
Ludovico Magnocavallo
2f9234547c fix pf merge 2025-10-18 14:30:46 +00:00
Ludovico Magnocavallo
5e05044306 Merge remote-tracking branch 'origin/master' into fast-dev 2025-10-18 14:22:57 +00:00
Ludovico Magnocavallo
4113da128b Support resource-level factories config in project factory module and FAST stages (#3440)
* support resource-level factories in project factory module

* align folder and project schemas across modules and fast

* schema docs
2025-10-18 10:41:19 +00:00
Ludovico Magnocavallo
d3c80ce18b Rationalize location defaults across project factory module and FAST stages (#3392)
* group default/overrides locations in a single object in pf module

* org setup

* project factory stage

* fix defaults

* pf defaults

* security stage defaults
2025-10-08 07:12:15 +00:00
Ludovico Magnocavallo
4db29a48eb allow forcing jit service agents generation for universe (#3378) 2025-10-05 10:17:57 +02:00
kovagoadam
505ee02fef Add support for billing export in 0-org-setup (#3347)
* Add support for billing export in 0-org-setup

* Merge branch 'master' into add-billing-export-support

* Refactored billing export with adding support for bigquery_datasets in project_factory

* Renamed bigquery_dataset to datasets

* Fixed defaults.schema.md

* Fixed default.schema.md again

* Cleanup md's

* Fixed boilerplate

* Fixed JSON schema

* reword README, rename project file

* Moved dataset_id to the key of the map

---------

Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2025-10-01 10:12:45 +00:00
Ludovico Magnocavallo
90ee0ccf12 Expose project factory stage defaults via a YAML file (#3354)
* initial implementation

* README

* tfdoc
2025-09-24 09:59:11 +00:00
Ludovico Magnocavallo
78966f66c3 Add support for project templates to project factory module (#3317)
* add support for project templates to project factory module

* align project factory features in FAST org setup stage
2025-09-11 09:56:01 +02:00
Ludovico Magnocavallo
bc6950e205 Rename FAST stages preparing for eventual deprecation (#3298)
* renames

* links

* readme

* docs

* update pf modules tests for renames

* condition_vars context in modules

* data platform dataset

* fix links in stage 3 docs

* schema changes

* schema docs

* tfdoc

* update duplicates check

* fast legacy tests

* legacy schema

* fix tests
2025-09-04 08:24:11 +02:00
Ludovico Magnocavallo
36648b6b63 FAST light implementation (#3255)
* data wip

* wip data

* update org schema, add note on expansion

* all schemas, workload notes

* Update WORKLOG.md

* Update WORKLOG.md

* Update WORKLOG.md

* Update WORKLOG.md

* wip

* data wip

* wip

* wip

* wip

* wip

* org module IAM context (using lookup)

* new-style context expansion in project IAM

* remove spurious file

* project module contexts

* finalize context replacement format for project module

* revert org module changes

* fix tag id interpolation in project

* fix tag id interpolation in project

* organization module context

* organization context test

* context expansion for folder tag bindings

* test context expansion for tag bindings

* service account module context

* simplify context local

* context for iam service account

* nuke blueprints

* remove links to blueprints

* vpc sc context in project module

* Add context to GCS module

* Add inline deps to plan_summary script

* Make context a top-level variable for folder, organization, sa

* Add add context top-level to VPC-SC

* move context out of factories_config variable

* tfdoc

* fix merge

* fix merge

* fix examples

* net-vpc module context

* add parent ids to folder context

* rename folder parent context

* fix folder parent check

* new project factory stub

* wip

* wip

* refactor defaults

* project iam

* bueckts and service accounts

* start adding context replacements

* better test data

* automation resources for folders and projects

* automation

* add support for project id interpolation

* first tested apply

* improve IAM description in gcs module

* add context to billing account module

* add notification channels to billing account module context

* add billing budgets to new pf

* schemas and defaults

* bootstrap wip

* bootstrap wip

* bootstrap wip

* pf outputs

* pf fixes

* fix pf sample data

* bootstrap lite fixes

* add locations to organization module contexts

* bootstrap lite fixes

* org fixes, billing accounts

* fix default project parent

* bootstrap lite wip

* add locations to gcs module context

* add context support to logging bucket module

* add context to pubsub module

* split out iam variables in gcs module

* fix logging bucket context test

* bootstrap log sink destinations

* streamline logging-bucket module variables

* fix logging bucket context test

* align logging bucket module interface in fast bootstrap

* add support for project-level log buckets to project factory

* support full context expansion in organization module log sinks

* log buckets in fast-lite bootstrap

* make og sink type optional in organization module

* log sinks in fast-lite bootstrap

* set tag values in factory context

* bootstrap lite data

* output files schema

* billing account schema

* output files

* output providers

* gcs output files

* boilerplate

* tflint

* check documentation

* check docs

* fix project module parent variable validation

* fix log bucket examples

* allow null parent in project module

* silence folder test errors

* fix billing account sink example

* fix project example

* fix billing account module

* fix folder tests

* fix FAST

* fix fast

* tfvars outputs

* wif

* cicd service accounts

* cicd

* allow defaults in context, minimal org policies

* support gcs managed folders in project factory and bootstrap lite

* support prefix in provider output files

* rename bootstrap stage

* gitignore

* gitignore

* security folder, billing IAM

* wip tfvars

* fix typo

* security IAM

* control tag iam/context via variables in organization module

* split tag creation from tag IAM to avoid circular refs

* port organization module tag changes to project module

* implement new-style context expansion in vpc-sc module

* fix fast vpc-sc tests

* boilerplate

* vpc sc stage

* schemas

* fast-lite compatibility for vpc sc stage

* make log project number optional in vpc-sc stage

* networking

* networking

* networking

* networking

* rename and move new stage under fast

* clone pf tests

* use context replacement for internal notification channels in billing account module

* support service agents in project module iam context replacements

* support service agents in project module iam context replacements

* add support for kms keys to project module context

* experimental pf example test and fixes

* fix schemas

* fix tests

* tfdoc

* tfdoc

* pf config

* experimental pf

* remove redundant dot from gcs managed folder IAM keys

* bootstrap experimental test

* project factory exp stage test

* skip tflint for bootstrap experimental test

* tflint

* fix gcs test

* documentation work

* documentation work

* Update README.md

* tfdoc

* tfdoc

* readme

* tfdoc

* readme

* readme

* readme

* readme

* support universe in pf exp projects

* missing universe service agents

* org policies import, non-admin billing IAM

* todo

* fix test

* custom constraints

* fast classic dataset

* fix test data

* context replacements in billing module log sinks

* fix typo

* add support for billing log sinks

* update docs

* readme

* cicd fix and test

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2025-09-02 08:38:57 +02:00
Ludovico Magnocavallo
2a1a630e9d allow setting defaults/overrides for buckets force destroy in project factory (#3233) 2025-07-11 16:47:25 +00:00
Liam Nesteroff
f07e4f64e9 Standardise reuse variable from project module and implement for net-vpc (#3205)
* exposing the network_id from the net-vpc module for use with tag bindings

* convert vpc_create to vpc_reuse

* Changed the reuse vars to standardised attributes

* fixed readme tests and schemas

* modified apigee blueprint to use vpc_reuse with network_id passthrough

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2025-07-03 09:12:05 +10:00
Ludovico Magnocavallo
fe0a8128dc Allow custom roles in context, add support for shared VPC IAM to project and project factory (#3163)
* add support for custom roles and hos tproject iam to project modules

* align vpc factory
2025-06-15 10:01:22 +02:00
Ludovico Magnocavallo
7d008be2cb Allow configuring project key format in project factory (#3154)
* Configurable project key in project-factory module

* Configurable project key in project-factory module

* add tests
2025-06-11 13:18:03 +02:00
Ludovico Magnocavallo
3c38bc643e add KMS keys interpolation to project factory (#3145) 2025-06-10 10:24:25 +02:00
Ludovico Magnocavallo
cb7bed50e3 New FAST data platform (#3066)
* copy from broken dp dev branch

* remove extra excalidraw file

* fix networking yaml

* tfdoc

* tfdoc

* nuke old data platform

* fix tests

* tests

* tflint

* high level diagram

* make location optional in composer schema

* add composer outputs

* docs

* remove schema docs

* tfdoc

* update service agent encryption composer def for composer 3

* encryption keys

* typo

* typo

* fix security IAM

* inventory

* tflint

* Fix roles and diagram.

* Fix tflint

* Fix test DP.

* Fix test

* Diagrams excalidraw gz

---------

Co-authored-by: lcaggio <lorenzo.caggioni@gmail.com>
2025-05-03 21:21:38 +00:00
Ludo
4c7ff3381e Merge branch 'master' into fast-dev 2025-05-02 14:39:28 +02:00
Tyler Sommer
e547d4d29c Add deletion_policy to project-factory module (#3060)
* Add deletion_policy to project-factory module

* Use project deletion_policy in object normalization

* Replicate changes in net-vpc-factory

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2025-04-30 16:10:11 +00:00
Luca Prete
89d1b5aa8b Add ability to reuse existing projects in project factory (#3051) 2025-04-21 08:57:53 +00:00
Ludo
5612040209 Merge remote-tracking branch 'origin/master' into fast-dev 2025-04-07 08:47:00 +02:00
Wiktor Niesiobędzki
46f731fee0 Use null values for data_overrides 2025-04-06 20:17:22 +02:00
Ludovico Magnocavallo
69188fa9d9 Implement support for VPC-SC perimeter membership from project factory (#3007)
* support project factory-level vpc-sc perimeter interpolation

* fix ro role

* add support for IAM on service accounts

* fix typo
2025-04-04 11:45:22 +00:00
Julio Castillo
c59470a4fb Update logging_data_access type (#2816)
* Update logging_data_access variables to use types

* Fix dependencies

* fix schema

* Add missing comma

* Fix try
2025-01-14 16:00:35 +00:00
Joshua Wright
325a997d79 Add Alerts, Logging, Channels Factories (#2758)
* WIP: Logging Alerts Factory

* Implement Logging Alerts on Remaining Modules

* Documentation & FMT

* Convert To Multiple Factories

* Correct Project

* Update Documentation

* Update modules/project/alerts-factory.tf

Co-authored-by: Julio Castillo <jccb@google.com>

* Update fast/stages/0-bootstrap/data/logging-metrics/compliance.yaml

Co-authored-by: Julio Castillo <jccb@google.com>

* Update Tests, Resources

* tests

* Fix Tests

* Fix formatting

* Reformat metric filters

* Formatting, reordering, and small fixes

* Bring back alerts and metrics documentation

* Revert change bootstrap outputs.tf

* Fix project notification channel vars and factories

* Fix vars and factory for logging alerts

* Complete alert variable and factory

* Reorder fields

* Update readme

* Reorder variables

* Add schemas, update README, and fix some types

* Remove default alerts email from project and project-factory

* Move observability factory to a single file

* Add outputs to project module

* Add factories_config to PF data_defaults and data_overrides

* Reorder PF field processing

* Revert fast/ to master.

We'll do observability stuff in a separate PR

* Remove observability from FAST

* Remove new FAST tests

* Remove unused local

* Fix tests

---------

Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2025-01-05 19:49:20 +00:00
Ludovico Magnocavallo
5af0f90929 Allow setting GCS location default/override in project factory (#2715)
* allow setting GCS location default/override in project factory

* tflint
2024-11-18 17:45:52 +01:00
Joshua Wright
d4cff3eafa Add Project Factory Logging Data Option (#2625)
* Add Logging Data Defaults to Data Defaults and Data Overrides

* Run TFDoc & FMT

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2024-10-17 10:54:42 +00:00
Ludovico Magnocavallo
ad5de9b7ea Refactor FAST project factory and supporting documentation (#2505)
* untested

* teams pattern

* rework doc

* README

* boierplate

* tflint

* Fix tflint for project factory

* Correct path to pf

* resman changes

* fix factory variable default

* fix links

* project factory module substitutions

* tflint

* stage test

* tfdoc

* rename schema, address review comments

* README typos and wording

* tfdoc

* review comments

* remove test from yaml

* revert output workflow changes

* fix sa reference errors

* tfdoc

* pf tag roles

* schema validation

* pf tag roles

* avoid null values in pf context

---------

Co-authored-by: Wiktor Niesiobędzki <wiktorn@google.com>
2024-08-20 16:45:42 +00:00
Julio Castillo
c0bf32e797 Refactor service agent management (#2423)
* Service agents script

* Service agents update

* WIP

* Update script and terraform

* Fix tests

* Fix linter

* Update docs

* Bring back pf example inventory

* Fix tests

* Fix more tests

* Fix tests

* Use dataclasses for build_service_agents.py

* Remove unneeded field() from build_service_agents

* Re-enable CMEK depends_on in project outputs

* Update tools/requirements.txt

* Enable storage in GCS example projects

* Fix tests

* Add CMEK Service Agents dependencies for services

* Fix typos and data platform cmek

* More typos
2024-07-23 22:05:38 +02:00
Ludovico Magnocavallo
309792c559 Refactor vpc-sc support in project module, add support for dry run (#2229) 2024-04-22 09:28:01 +02:00
Julio Castillo
28f02688ee Add folder factory to project-factory module (#2152)
* WIP Folder Factory

* parent keys and general fixes

* changes

* update README and example test, add support for hierarchy projects

---------

Co-authored-by: Ludo <ludomagno@google.com>
2024-03-14 15:03:42 +03:00
Ludovico Magnocavallo
39139e2fa1 add support for service account IAM variables to pf (#2130) 2024-03-05 13:13:02 +01:00
Ludovico Magnocavallo
dbabfb9ae0 Add support for billing budgets to project factory (#2112)
* align factory variable name in project factory module

* tested

* align fast stage
2024-02-27 18:13:49 +00:00
Ludovico Magnocavallo
6941313c7d Factories refactor (#1843)
* factories refactor doc

* Adds file schema and filesystem organization

* Update 20231106-factories.md

* move factories out of blueprints and create new factories  README

* align factory in billing-account module

* align factory in dataplex-datascan module

* align factory in billing-account module

* align factory in net-firewall-policy module

* align factory in dns-response-policy module

* align factory in net-vpc-firewall module

* align factory in net-vpc module

* align factory variable names in FAST

* remove decentralized firewall blueprint

* bump terraform version

* bump module versions

* update top-level READMEs

* move project factory to modules

* fix variable names and tests

* tfdoc

* remove changelog link

* add project factory to top-level README

* fix cludrun eventarc diff

* fix README

* fix cludrun eventarc diff

---------

Co-authored-by: Simone Ruffilli <sruffilli@google.com>
2024-02-26 10:16:52 +00:00