Commit Graph

27 Commits

Author SHA1 Message Date
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
Ludovico Magnocavallo
67b1543e90 Support additional attributes for buckets/datasets in project factory module (#3755)
* extend attributes for project factory secondary resources

* remove extra files

* complete

* tf fmt

* tfdoc

* schemas

* fix tests

* tfdoc
2026-02-20 11:57:59 +00:00
Vannick Trinquier
171a2c6690 Add support for CMEK in logging bucket, big query dataset and gke notifications (#3558) 2025-12-04 10:01:32 +00:00
Taneli Leppä
7c6211a494 bigquery-dataset: fix issues (#3425)
* bigquery-dataset: add missing return_type to routines, fix view schema
encode, add dependency between routines and views

* Fix test.

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2025-10-16 13:12:23 +00:00
Ludovico Magnocavallo
7b70177459 add context to bigquery module (#3388) 2025-10-07 07:57:42 +00:00
Nishant Raghav
81c7213f92 feat(bigquery-dataset): add optional schema support for views (#3377)
* feat: add optional schema to BigQuery views for descriptions

* feat: add schema support for view definitions in BigQuery dataset module

* fix: encode schema as JSON for BigQuery views

* feat: add population schema and update query for population view in BigQuery dataset

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2025-10-06 05:40:39 +00:00
apichick
8e0dac84f9 Bigquery dataset routines (#2570)
* Added routines to bigquery-dataset module

* Fixes after review
2024-09-19 09:13:32 +00:00
luigi-bitonti
b5cd2d8088 Updated bigquery module (#1861) 2023-11-30 14:33:50 +01:00
devuonocar
7503bceaed Add materialized views for bigquery (#1726)
* add field and partition filter to time_partitioning for bq table

* add materialized view

* set optional fields for table

* Fix README.md

* Update README.md

* Fix README.md

* Replace explicit dependencies with implicit ones

* Fix indexes

* Update table_id(s) values

* Try to fix tests

* Update tests

* Restore explicit dependencies

* Update README.md

* Update README.md

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2023-10-04 12:25:56 +00:00
devuonocar
4d3b0508cc Add storage billing model (#1723)
* Add storage billing model

* Fix README.md
2023-10-02 19:37:40 +02:00
Ludovico Magnocavallo
9c75aa469c More module descriptions (#1572)
* bigquery dataset

* data catalog policy tag

* net-address

* fix data catalog callers

* bigquery dataset views

* fix data catalog callers

* logging bucket

* net vpn ha
2023-08-06 09:25:45 +00:00
Thinh Ha
10e15356ea Add bigquery authorized resources (#1480)
* add bq authorized views, datasets, and routines

* fmt

* add backwards compatible test case

* minor docs clarification

* add docs table and fix lint tests

* fix docs

* fix tests

* fix more lint issues

* fix lint issue

* fix tests

* fix lint

* fix tests

* alphabetical order

* add detailed example to docs and corresponding test

* clarify docs for variables

* remove unnecessary depends_on
2023-06-30 18:44:57 +02:00
Ludovico Magnocavallo
865ef463bb Support new fields in bigquery module, bump provider versions, unpin local provider (#1306)
* add support for new attributes to bigquery module

* bump provider versions
2023-04-05 14:22:52 +00:00
lcaggio
7bbeac805e Add 'max_time_travel_hours ' on BQ module 2023-02-14 08:43:15 +01:00
Ludovico Magnocavallo
70d8d1f890 refactor and test apply/destroy on existing project 2022-01-14 16:53:15 +01:00
Simone Ruffilli
ee25965c89 Copyright bump (#410) 2022-01-01 15:52:31 +01:00
Julio Castillo
1a35ba3478 Allow custom and predefined roles in bq dataset access rules 2021-11-08 11:34:37 +01:00
Ludovico Magnocavallo
923ba819d1 bigquery-dataset 2021-10-19 21:09:16 +02:00
Julio Castillo
faa3a1cfe9 Add deletion_protection to bigquery module 2021-06-01 18:36:53 +02:00
Julio Castillo
37935cee3a Add project parameter to bigquery iam bindings. 2021-03-30 17:02:20 +02:00
Julio Castillo
1e11c670f5 Update copyright to 2021 2021-02-15 09:38:10 +01:00
Ludovico Magnocavallo
cffc823f48 refactor access in bq module, add iam (#172) 2020-11-21 09:45:56 +01:00
Chinmay Dorlikar
9bd1d5bb79 Updated the main.tf for bigquery-datasets (#146)
Added the "depends_on" attribute for views to be created only after all the tables are created to avoid failure.
2020-09-27 15:16:09 +02:00
Luca Prete
f2c80e17f1 [#138] Update copyright headers to 2020 (#139)
Co-authored-by: Luca Prete <lucaprete@google.com>
2020-09-23 11:07:03 +02:00
chinmaydorlikar
e6867b3486 Added google-beta provider for dataset-access resource and formatted the file (#118)
Co-authored-by: Chinmay Dorlikar <chinmay_dorlikar_ex@kdrp.com>
2020-07-28 18:28:59 +02:00
Ludovico Magnocavallo
e3a1a8da4b change access variables in bigquery-dataset to support dyamic values 2020-05-03 15:10:36 +02:00
Ludovico Magnocavallo
c7bffbbac1 New bigquery-dataset module (#66)
* new bigquery-dataset module

* update README

* update top-level READMEs

* update CHANGELOG
2020-05-02 17:33:48 +02:00