52 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
Vannick Trinquier
d499dc6928 Add support for bucket logging configuration in module gcs and project-factory (#3699) 2026-02-06 14:14:46 +07:00
Ludovico Magnocavallo
525b7be739 module KMS autokey context namespace fixes (#3521) 2025-11-11 08:46:21 +00:00
Ludovico Magnocavallo
7e32058010 [WIP] Add support for KMS autokey (#3515)
* wip

* folder module

* project factory schema

* remove spurious project template

* gcs and compute-vm modules

* variable order
2025-11-09 10:46:28 +01:00
Ludovico Magnocavallo
08ccec3922 Make project id optional in GCS module (#3369)
* make project id optional in GCS module

* tfdoc
2025-10-02 16:23:23 +00: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
Julio Castillo
d3f0dc984e Upgrade provider to version 7.0.1 (#3291)
* Upgrade provider to version 7.0.1

* Update READMEs

* Bring back depends_on for services and jobs
2025-09-01 17:29:20 +02:00
Julio Castillo
b8efcc5d89 Add IP filtering support to modules/gcs (#3216)
* Add IP filtering to GCS

* Bump provider version
2025-07-04 18:57:32 +00:00
Julio Castillo
8a2320311d Add bucket_create to modules/gcs (#2827)
* Add `bucket_create` to `modules/gcs`

* Create local with bucket name

* Update variable description

* Fix bucket output

* Fix tests

* Fix tests

* Bump OpenTofu to 1.9.0 (needed for multi-var validations)
2025-01-21 23:48:36 +01:00
Julio Castillo
c60d152f4a Add hierarchical namespace support to GCS module (#2712)
* Add hierarchical namespace support to GCS module

* remove empty iap block from inventories

* Fix tests

* Add new hns inventory

---------

Co-authored-by: Ludo <ludomagno@google.com>
2024-11-18 11:41:49 +00:00
kejti23
caddfef424 add enable_object_retention argument (#2657)
* add enable_object_retention argument

* add enable_object_retention argument - solve linting error

* add enable_object_retention argument - fix variable ending
2024-11-05 17:27:29 +01:00
Wiktor Niesiobędzki
4cda94c185 Better fix for ffa2602 2024-11-04 10:34:54 +01:00
Ludo
ffa2602e5e add support for cmek in gcs module notification topic 2024-11-04 09:03:24 +01:00
Julio Castillo
f57635d044 Add managed folders suports to gcs module (#2530)
* Add RPO, make versioning dynamic

* Add manaed folders

* Change autoclass and cors defaults to null

* Update README

* Add iam_by_principals

* Add managed folders var description

* Remove need for managed folders to end in /

* Add inventory to example

* Update readme

* Fix FAST tests
2024-08-28 07:30:52 +00:00
Ludovico Magnocavallo
99ab796c72 Allow disabling topic creation in GCS module notification (#2436)
* allow disabling topic creation in GCS module notification

* use proper topic name
2024-07-22 10:51:25 +00:00
Ludovico Magnocavallo
c80af8de66 Extend support for tag bindings to more modules (#2307)
* fix kms tag bindings

* bigquery dataset

* fix bigquery

* cloud run

* normalize variable type

* rename gcs heading

* kms example test

* fix bigquery

* fix cloud run

* cloud run v2
2024-05-25 10:42:45 +02:00
Ludovico Magnocavallo
dc686c3a84 Remove default location from gcs module (#2303)
* gcs module

* blueprints/apigee/bigquery-analytics

* tfdoc

* pubsub README md syntax
2024-05-24 07:02:33 +00:00
Ludovico Magnocavallo
3138eb9025 add support for tags to GCS module (#2213) 2024-04-11 13:19:05 +00:00
Simone Ruffilli
7833203d87 Add support for GCS soft-delete retention period (#2212)
* Add support for GCS soft-delete retention period
2024-04-11 07:31:00 +00:00
devuonocar
103388bcc9 Update default value 2023-10-31 10:47:28 +01:00
devuonocar
96c1342d55 Add public_access_prevention 2023-10-30 18:23:33 +01:00
jeroenmonteban
f464557525 Add autoclass to GCS (#1757)
* Add autoclass to GCS

* Fix linting

* Make autoclass block dynamic

* Fix syntax

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2023-10-16 07:45:10 +00:00
devuonocar
4f91523a08 Add missing fields to Cloud Storage bucket (#1745)
* Add new featrures

* Terraform fmt

* Fix README.md

* Delete not allowed validation

* Fix README.md

* Fix README.md

* update var

* update var

* Update var
2023-10-10 22:40:30 +02:00
Miren Esnaola
c10eb72a8f Changes in IAM to GCS module 2023-10-04 08:13:45 +02:00
Erin Horning
4885b8a7f9 objects non-nullable 2023-08-22 09:40:50 -06:00
Erin Horning
2f3d29395f remove validation 2023-08-22 09:09:37 -06:00
Erin Horning
6f1f6f5085 add additional parameters 2023-08-21 16:35:47 -06:00
Erin Horning
10faf82b8d linting 2023-08-11 11:20:06 -06:00
Erin Horning
df1fded669 add support for object upload to gcs module 2023-08-10 21:43:53 -06:00
Ludovico Magnocavallo
082c63dfc5 refactor GCS module and tests (#1066) 2022-12-22 12:27:09 +01:00
Natalia Strelkova
d96f95c2b6 cannot instead of can not 2022-11-11 11:56:47 +00:00
Natalia Strelkova
d5d1d9eb34 terraform formatting fixed 2022-11-10 15:11:38 +00:00
Natalia Strelkova
68c3b13d6a prefix variable consistency across modules 2022-11-10 15:05:53 +00:00
Simone Ruffilli
abb6b50a46 Add periods at the end of each description field where missing (#478) 2022-01-31 10:45:34 +01:00
Simone Ruffilli
ee25965c89 Copyright bump (#410) 2022-01-01 15:52:31 +01:00
Caio Tavares
f74599a317 Added GCS notification support (#335)
* Added GCS notification support

* fixed notification output indices

* merged vars and added more conditional validation

* Terraform linting

* Added sa_email serviceAccount variable

* Fixed bool check and use try in notification var

* Fixed typo source path example block

* Fixed assert number tftest gcs example
2021-10-21 10:27:35 -04:00
Caio Tavares
7dad4496b4 Feature/added gcs website (#325)
* Added GCS website block support

* Terraform linting

* Moved variable to last and re-generated README
2021-10-14 20:11:26 +02:00
Julio Castillo
1d13e3e624 Add more validations to linter
- Ensure all variables and outputs are sorted
- Ensure all variables and outputs have a description
- Add data-solutions/data-platform-foundations to linter

Fix all modules to follow these new conventions.
2021-10-08 18:26:04 +02:00
Ludovico Magnocavallo
202892b344 Add support for lifecycle_rule in gcs module (#288) (#289)
* Add support for lifecycle_rule in gcs module (#288)

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>

* fix docs

* rename unrelated interconnect module tests

* fix doc example test

Co-authored-by: iury <1934268+IuryAlves@users.noreply.github.com>
2021-07-30 12:07:17 +02:00
Chinmay Dorlikar
9c0b37f100 Added CORS dynamic block for gcs : feature/cors for gcs (#232)
* Added a dynamic CORS block for gcs module. Changed main.tf and variables.tf

* Updated the README for the CORS block

* Ran tfdoc for /modules/gcs/README.md

Co-authored-by: Chinmay Dorlikar <chinmay.dorlikar@quantiphi.com>
2021-04-23 17:58:58 +02:00
Julio Castillo
1e11c670f5 Update copyright to 2021 2021-02-15 09:38:10 +01:00
Ludovico Magnocavallo
9d0db19c5e rename iam variables in gcs module 2020-11-04 16:57:06 +01:00
Julio Castillo
7bd31ccf52 Added some basic variable validation 2020-11-03 08:12:11 +01:00
Julio Castillo
61d402fece Update gcs module to terraform 0.13 2020-10-29 23:26:03 +01:00
vanessabodard-voi
435d64d81a Change bucket_policy_only into uniform_bucket_level_access in GCS module (#135)
* Change bucket_policy_only into bucket_policy_only

* Update changelog
2020-09-15 19:33:40 +02:00
Ludovico Magnocavallo
120e1be1d9 extend gcs module tests to cover new variables 2020-09-03 19:19:41 +02:00
Ludovico Magnocavallo
9e32b32b3d reformat GCS module and update README 2020-09-03 19:08:29 +02:00
vanessabodard-voi
e8c227fdd6 Add bucket logging (#134)
* Add logging

* Improve syntax

* Add example

* Improve type for retention policy
2020-09-03 19:06:35 +02:00
vanessabodard-voi
daf3dc41e7 Add retention policy (#133) 2020-09-01 17:48:02 +02:00