Commit Graph

58 Commits

Author SHA1 Message Date
Simone Ruffilli
a0987e189d Add Multi-Region support to cloud-run-v2 module (#4022)
* Add Multi-Region support to cloud-run-v2 module

* Support context expansion for multi_region_settings regions

* Fix multi_region_regions formatting line length
2026-06-11 15:07:30 +00:00
Ludovico Magnocavallo
91fe329aca Fix E2E test failures for Cloud Run v2, KMS, Compute VM, and update GEMINI.md (#3953)
* Update Cloud Run v2 GPU examples in README

Remove launch_stage = "BETA" from examples as it now defaults to GA in the provider. This fixes E2E test failures where the API returns GA. Reference: https://github.com/hashicorp/terraform-provider-google/pull/17029

TAG=agy

* Fix KMS and Compute VM E2E test failures

Update README examples to avoid conflicts and unsupported modes, and update corresponding inventories.

TAG=agy

* Add instruction to run a single specific example test in GEMINI.md

TAG=agy
2026-05-10 11:53:30 +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
Julio Castillo
bc5b203a8f Add toggle to tfdoc to remove type hints (#3842)
* Add toggle to tfdoc to remove type hints

* Update all readmes

* Fix python formatting
2026-04-08 11:08:18 +00:00
Wiktor Niesiobędzki
74516529cb Fix permadiff on E2E test 2026-02-16 13:45:38 +01:00
Wiktor Niesiobędzki
d5bc59a238 Fix E2E tests.
* Disable tests for VPC connector and Cloud Functions, CFs are not
  supporrted in the default region
* fix permissions to secrets for Cloud Run
* add permissions admin permissions to any SA within project to
  `var.bucket`
* add permissions to access the secret to any SA within project to
  secrets created by fixture
* disable custom roles in E2E tests, as `var.organization_id` is not the
  same org, within which projects are created in E2E
2025-11-04 10:23:55 +01:00
Wiktor Niesiobędzki
2e42c1b548 service_account_config for Cloud Run v2
Additional changes:
* align vpc-connector interface to Cloud Functions
* split managed and unmanaged resources into separate files, this makes
  easier to introduce further changes
* add support for contexts
* move `vpc_connector` variable to variables.tf for Cloud Functions
* remove `create` from `vpc_connector` in Cloud Functions as it was
  sharing the meaning with `vpc_connector_create`
2025-10-27 08:03:53 +01:00
Wiktor Niesiobędzki
d9029e47a0 VPC Connector alignment to Cloud Run v2 + contexts 2025-10-23 15:50:17 +02:00
Ludovico Magnocavallo
63a22cd9a2 Refactor secret manager module (#3315)
* wip

* wip

* wip

* wip

* tested, missing versions

* working

* fix secops stage

* readme

* tests

* tflint
2025-09-10 11:47:35 +00:00
Ludovico Magnocavallo
1f59fd6bc7 Merge remote-tracking branch 'origin/master' into fast-dev 2025-09-03 14:33:52 +02:00
Wiktor Niesiobędzki
b20d62815a Fix Cloud Run validation for refactored fields (#3295)
Co-authored-by: Julio Castillo <jccb@google.com>
2025-09-03 13:13:15 +02:00
Wiktor Niesiobędzki
c5312d59dc Fix E2E tests after provider upgrade to 7 2025-09-03 12:57:26 +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
Wiktor Niesiobędzki
a106688b0e Fix references to service_account 2025-08-13 22:11:07 +02:00
Wiktor Niesiobędzki
75fa484730 Remove support for creating SA for event arc triggers 2025-08-13 22:11:07 +02:00
Wiktor Niesiobędzki
ff85f05669 E2E: Align triggers location to the bucket 2025-08-13 22:11:07 +02:00
Wiktor Niesiobędzki
80ed6e29aa Disable E2E for Cloud Run job, as there are some issues with the quota 2025-08-13 15:21:27 +02:00
Wiktor Niesiobędzki
e498f3407e Add support for GPUs in Cloud Run 2025-08-13 15:21:27 +02:00
Wiktor Niesiobędzki
b5cc01c598 Add Cloud Run Worker Pools
Refactor jobs and services parameters into separte variables
Remove prefix (not needed, namespace is local to the project)
2025-08-12 19:59:50 +02:00
Muhammad Elsaeed
9bd4363269 feat: add GCS bucket trigger support for Cloud Run services (#3257)
* feat: add GCS bucket trigger support for Cloud Run services 🌟

* feat: add examples for Cloud Run service with Eventarc storage triggers

* fix: update bucket name in Eventarc storage trigger example and clean up service account configuration

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2025-08-01 16:41:49 +00:00
Maciej Sikora
1dd4873a02 fixes validation 2025-06-18 12:28:54 +02:00
Maciej Sikora
a83c8a69de fixes test 2025-06-18 12:28:54 +02:00
Maciej Sikora
0ead6ba894 format readme example 2025-06-18 12:28:54 +02:00
Maciej Sikora
461c0b8e44 adds iap configuration test 2025-06-18 12:28:54 +02:00
Maciej Sikora
fd8f659a3a docs && fmt 2025-06-18 12:28:54 +02:00
Maciej Sikora
c0bac5acc0 feat: adds support for direct cloud run iap 2025-06-18 12:28:54 +02:00
Maciej Sikora
ae5c12a2a3 adds revision label (#3117)
* adds revision label

* adds revision label
2025-05-28 18:32:06 +02:00
Charles Salmon
ee468514b0 [cloud-run-v2] Add ability to deploy OpenTelemetry Collector sidecar (#3071)
* [cloud-run-v2] Add ability to deploy OpenTelemetry Collector sidecar

- Adds `depends_on` flag to container definition
- Adds `port` to HTTP liveness & startup probes

* fix: add port to unmanaged resource's startup & liveness probes

* fix: add copyright boilerplate

* Fix README

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2025-05-08 09:05:58 +00:00
Luca Prete
763b917b78 [cloud-run-v2] Add ability to control code deployments outside Terraform 2025-04-29 10:32:57 +02:00
Simone Ruffilli
3c91acd181 Replace all instances of stackdriver.googleapis.com with log+mon (#3022)
Replace all instances of stackdriver.googleapis.com with logging.googleapis.com  and monitoring.googleapis.com.
Fixes #2932
2025-04-11 12:04:50 +00:00
Tim Hiatt
762841da79 Fr/timhiatt/invoker iam disable (#2994)
* Staging the New Variable change and the flag endablement for 'invoker_iam_disabled' in the 'google_cloud_run_v2_service' resouece associated with the 'cloud-run-v2' module.

* Updating tfdocs to include the new variables for the 'invoker_iam_disabled' flag in the 'google_cloud_run_v2_service' resource in module 'cloud-run-v2'

* Updating the testing in the readme for the cloud-run-v2 module.

* Fixing an issue with links in README.md Docs

* Fixing README.md linting.
2025-04-01 11:41:08 +02:00
Ludovico Magnocavallo
c8e4179f2b Add custom routes for directpath to net-vpc module (#2966)
* add custom routes for directpath to net-vpc module

* blueprint tests

* blueprint tests

* blueprint tests

* fast tests

* tfdoc

* module examples
2025-03-19 10:22:47 +00:00
Wiktor Niesiobędzki
62f789c249 Add execution/invocation commands to outputs 2025-02-21 17:53:42 +01:00
Wiktor Niesiobędzki
58f22ce647 Add prefix to KMS ring, to allow easy recreate 2025-02-10 00:56:19 +01:00
Wiktor Niesiobędzki
8a9a5b5237 Disable E2E test for direct VPC Egress
Resources in subnet are in use for ~1-2h after removal of Cloud Run
instance (see: https://cloud.google.com/run/docs/configuring/vpc-direct-vpc#delete-subnet)

b/332419038
2025-02-05 09:56:04 +01:00
Wiktor Niesiobędzki
9f7505d061 Allow providing network for Direct VPC access 2024-11-18 10:25:19 +01:00
Wiktor Niesiobędzki
6b0745deed Add gcs mount_options, move direct vpc out of BETA 2024-11-16 12:52:50 +01:00
Wiktor Niesiobędzki
9e6b114b8c Fix E2E tests 2024-11-16 11:02:16 +01:00
Wiktor Niesiobędzki
e0d6f0eadb Fix examples 2024-11-15 09:58:01 +01:00
Wiktor Niesiobędzki
fe52a9102b Fix gcs mounts for cloud-run-v2, closes #2684 2024-11-14 13:33:20 +01:00
Wiktor Niesiobędzki
b85711e81b Additional examples
- Cloud Run - mounting Cloud SQL
- Cloud SQL - creating users for IAM service account
2024-11-10 07:02:29 +01:00
Ludovico Magnocavallo
601f137c9b Fix ipv6 output in net-vpc module, add support for extra volumes in cloud run v2 module (#2638)
* fix #2637

* fix #2635
2024-10-24 08:36:20 +02:00
Ludovico Magnocavallo
bbe84a5ca8 add extra job revision attributes (#2608) 2024-10-07 11:45:59 +02:00
Wiktor Niesiobędzki
679218cde3 Fix e2e testsss for cloud run 2024-09-10 12:04:39 +02:00
Simone Ruffilli
7f8a02a405 Add support for google provider 6.x (#2536)
* Add support for google provider 6.x

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Wiktor Niesiobędzki <wiktorn@google.com>
Co-authored-by: Julio Castillo <jccb@google.com>
2024-09-05 10:35:58 +00:00
Wiktor Niesiobędzki
44a4268afc Fix E2E tests 2024-09-04 12:16:50 +02:00
apichick
110318a51d Cloud run v2 custom audiences (#2476)
* Added forward_proxy_uri to apigee environments in apigee-x-foundations blueprint

* Added custom audiences to Cloud Run v2 module
2024-08-07 08:54:36 +02:00
apichick
0b66f61909 Cloud run v2 output uri (#2475)
* Added forward_proxy_uri to apigee environments in apigee-x-foundations blueprint

* Added service URI as output to Cloud Run service
2024-08-06 20:09:19 +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