Commit Graph

82 Commits

Author SHA1 Message Date
Pawan Roshan Gupta
e753344bd2 Support per-replica tier override in modules/cloudsql-instance (#4014)
* Support per-replica tier override in modules/cloudsql-instance

Replicas previously ignored any caller-provided tier and silently
inherited the primary's tier. Add an optional `tier` field to the
`replicas` map and use `coalesce(each.value.tier, var.tier)` in the
replica resource so per-replica overrides take effect while
preserving the inherit-from-primary default.

* Update README

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2026-06-09 08:02:34 +00:00
Brandon Tucker
3ee1cc7ab3 Enable remaining PSC config options in modules/cloudsql-instance (#3982)
* Enable remaining PSC config options

* Windows slashes

* Updates from review; slim down locals; obsolete psc_allowed_consumer_projects

* Windows slashes

* tfvars; examples

* Copy-paste bug

* Proper list check

* Updates from Automated PR Review

* Slahes

* null psc fix; regenerate custom test inventory

* fmt

* Correct fixtures; remove deletion_policy from instance resources

* Fix test

* Remove deletio policy

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2026-05-30 17:38:55 +00:00
Ludovico Magnocavallo
98554a9d20 feat(cloudsql): add support for enhanced query insights (#3948)
Adds support for enhanced query insights on cloud sql instances by adding enhanced_query_insights_enabled to the insights_config block. This allows enabling deeper visibility into query performance.

Closes #3890

TAG=agy
CONV=41331d43-c782-48a4-b0e7-bc8ad14866e9
2026-05-08 09:08:16 +02:00
jta-ofr
2cb67b3532 Add data_api_access attribute to cloudsql-instance module (#3866)
* add data-api-access to clousql instance module

* fix readme

* updates to follow guidelines

* update test module

* add validation for data_api_access variable

* regenerate readme.md

* allow data_api_access to be nullable

* set default to null

* update readme

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2026-04-16 09:24:02 +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
7c3b08b1d1 Fix Cloud SQL E2E test 2026-03-12 11:10:25 +01:00
Ludovico Magnocavallo
a6c284a273 Add context support to artifact-registry, net-lb-app-int, cloudsql modules (#3784)
* artifact-registry

* net-lb-app-int

* copyright

* cloudsql

* fix linting
2026-03-11 12:35:09 +01:00
Daniel Chan
27b43b7c75 fix(cloudsql): always render backup_configuration block to allow disabling backups (#3780)
* fix(cloudsql): always render backup_configuration block to allow disabling backups

* refactor(cloudsql): use nullable backup_configuration variable for explicit don't-manage semantics

* fix(cloudsql): force point_in_time_recovery_enabled=false when backups disabled

* fix(cloudsql): guard binary_log_enabled and point_in_time_recovery_enabled when backups disabled

* formatting

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2026-03-05 10:12:10 +00:00
Suryansh Singhal
ce83fa5397 cloudsql maintenance window day made optional (#3693)
* - Mark maintenance_window.day as optional\n- Update validation logic to allow null values\n- Keep existing range checks when day is provided

* - Mark maintenance_window.day as optional\n- Update validation logic to allow null values\n- Keep existing range checks when day is provided

* updated the Readme

* refactor maintenance config day validation for cloud sql instance

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2026-02-02 10:28:53 +00:00
Kósa Márkó
27eb8d1923 Docs cloudsql-instance: Update backup_configuration to set retain_backups_on_delete default to null 2025-12-08 15:22:32 +01:00
Kósa Márkó
46d71f3f8a feat(cloudsql-instance): add retain_backups_on_delete and final_backup_config support
- Add retain_backups_on_delete setting to allow backups to be retained when instance is deleted
- Add final_backup_config with enabled flag and retention_days configuration
- Both settings default to disabled/null for backward compatibility
- Prevents accidental loss of backups through Terraform operations
2025-12-08 15:22:32 +01:00
Matthew Venne
acf2634831 Allow PSC and PSA connections on Cloud SQL (#3539)
* removed variable validation enforcing only psa OR psc connection methods.  using both is a valid and supported pattern.

* Fix README

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2025-11-18 23:46:48 +01:00
Ram J A
5fb76628f6 Adding support for managed connection pooling in CloudSQL (#3365)
* added support for managed connection pooling for postgres in cloudsql

* updated readme.md and fixed formatting in variables.tf

* changed variable declaration to handle defaults and resource to remove redandent null check

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2025-10-03 09:32:08 +00:00
eeila
3b2c95b80a Add support for cloudsql regional replicas (#3239)
* [feat] - adding support for cloudsql regional replicas

* Remove validation already done by the provider.

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2025-07-17 14:27:07 +02:00
Wiktor Niesiobędzki
aecc4d53b9 Create random passwords only when needed, use write-only attribute for passwords 2025-06-05 16:28:58 +02:00
Luca Prete
4db015f99f [cloudsql-instance] Add cloudsql_iam_authentication flag to fix example in readme (#3069)
Co-authored-by: Luca Prete <lucaprete@google.com>
2025-05-05 08:50:31 +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
fc256165a4 Pass edition and other parameters to replicas 2025-03-17 11:46:01 +01:00
Wiktor Niesiobędzki
12979e8f50 Introduce test isolation and fix missing GCS service account 2025-03-01 14:45:16 +01:00
Simone Ruffilli
942ef8fe3d Add ssl_mode support to cloudsql-instance replicas (#2910)
* Add ssl_mode support for cloudsql-instance replicas

* Rename var.ssl.ssl_mode to var.ssl.mode
2025-02-19 10:31:35 +01:00
Simon Roberts
642ebfe9e9 Increase the default complexity of Cloud SQL DB passwords (#2886)
* Increase the default complexity of DB passwords in order to meet password_validation_policy.default_complexity

* Use password_validation_policy.min_length if provided

* Explicitly generate a root_password if not provided

* Use object (password, random_password) for root_password config

* Make root_password non-nullable, and add validation against specifying both a password and `random_password`.
Fix test for stronger password generation.

* Add example for root_password and password_validation_policy

* Rerun tfdoc.py

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2025-02-18 10:46:29 +00:00
Wiktor Niesiobędzki
58f22ce647 Add prefix to KMS ring, to allow easy recreate 2025-02-10 00:56:19 +01:00
Ludovico Magnocavallo
f3b14f5e69 Add support for password validation policy to cloudsql module (#2740)
* add support for password validation policy to cloudsql module

* fix defaults
2024-12-09 09:44:15 +00:00
fulyagonultas
be0f2e58b2 enable_private_path_for_google_cloud_services added to CloudSQL (#2726)
* enable_private_path_for_google_cloud_services added to CloudSQL

* name of the variable changed

* new feature added to the replica as well

* Update simple.yaml enable_private_path_for_google_cloud_services: false
2024-11-22 13:08:33 +00:00
Wiktor Niesiobędzki
472c5866c5 Fix not setting user defined password 2024-11-20 10:54:59 +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
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
Wiktor Niesiobędzki
251339de6e Fix failing tests for CloudSQL 2024-08-08 20:16:52 +02: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
Wiktor Niesiobędzki
6a3c7fe444 CloudSQL PSC Endpoints support (#2242)
* Add PSC endpoints consumers to net-address
* Cloud SQL E2E tests
2024-05-12 12:00:39 +02:00
Ludovico Magnocavallo
9414779cc2 Allow multiple PSA service providers in net-vpc module (#2218)
* allowing multiple PSA service providers in net-vpc module

* tfdoc

* tfdoc

* Add tfvars/yaml tests

* fix module and tests

* re-enable inventory

* merge fix

* Add multiple PSA test case

* fix cloudsql example

---------

Co-authored-by: Wiktor Niesiobędzki <wiktorn@google.com>
2024-04-16 15:02:36 +00:00
Ludovico Magnocavallo
e08ff19cd9 add support for data cache to cloud sql module (#2209) 2024-04-10 08:24:00 +02:00
Julio Castillo
dfed7cc5bd Rename modules/cloudsql-instance deletion protection variables (#2135)
* Rename Cloud SQL deletion protection variables

* Fix tests
2024-03-06 10:44:54 +00:00
Amela Spica
8e86f0e108 Time zone support for CloudSQL SQL Server (#2107)
* time zone for SQL Server

* removed nl

* fix line
2024-02-25 20:49:13 +01:00
Amela Spica
1a8400e60e Fixes and additional support for ssl_mode for CloudSQL module (#2002)
* added ssl mode, ignore password change and maintenance fix

* validation - ssl mode can be null

* removed ignore password

* readme update

* added moved, shortened ssl_mode desc

* order fix

* fmt

* created ssl variable

* handle exceptions

* removed null from optional

* change ssl from null to empty object

* output ordered alphabetically

* readme update

* default value of require_ssl
2024-01-25 16:29:07 +01:00
Francesco Pavan
d2d62b71e2 Added the possibility to configure maintenance window and deny maintenance period in Cloud SQL module module (#1917)
* added maintenance window configuration to cloud sql

* Formatted code + generated readme

* Fixed readme errors (missing dots at the end of variables' description)

* Fixed typos + regenerated docs

* Added correct readme

* Collapsed "deny_maintenance_period" and "maintenance_window" variables into a single variable called "maintenance_config"

* Added input validation + some minor fixes

* Add trigger configuration for Composer (#1916)

* Added update_track variable validation

* Formatted variables + regenerated readme

---------

Co-authored-by: Wiktor Niesiobędzki <wiktorn@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2023-12-11 16:59:00 +00:00
luigi-bitonti
98accdb3ad Added PSC support to CloudSQL Module (#1874)
* Added Feature

* Added PSC to CloudSQL module

* Added psc to read replica

* Changed variables

* Updated README

* Ran fmt

* Removed old variables

* Fix README

* Fixed blueprints

* Fix README

* Fixed output

* Added more outputs and bug fixes

* Changed variable structure

* Bug fix

* Added PSC example.
2023-11-24 15:47:45 +01:00
Francesco Spinelli
ad98b839bb added missing sql parameters (#1869)
* added missing sql parameters

* fix variables order

---------

Co-authored-by: Francesco Spinelli <francesco.spinelli@nttdata.com>
2023-11-20 22:27:59 +01:00
Francesco Spinelli
1c2f1c7b0d Sql user features (#1856)
* added user type feature

* fix readme

* fix comment

* fix blueprint cloudsql users value + minor fix

* readme fix

* variables fix

* local var fix

* fix for in local var

* fix on readme

* fix intentations var in readme

* fix blueprint user quote

---------

Co-authored-by: Francesco Spinelli <francesco.spinelli@nttdata.com>
2023-11-13 10:27:14 +01:00
Julio Castillo
dfc5023e0b Make deletion protection consistent across all modules (#1735)
* Expose deletion_protection in GKE modules

* Make deletion protection consistent across all modules

* Add deletion_protection option to blueprints

* Fix blueprints tests

* Fix types

* Update READMEs

* Fix dp readme

* Fix cmek blueprint default deletion_protection

* Fix blueprints tests
2023-10-05 17:31:07 +02:00
Jason Steenblik
79b0dc9751 Add deletion_protection_enabled attribute to cloudsql-instance to enable the GCP native deletion protection flag (#1696) 2023-09-20 15:09:38 +02:00
Julio Castillo
9c878dc9cf Fix tests for new KMS IAM interface 2023-09-17 00:21:36 +02:00
Carlo Maria Valla
befbd190a3 Cloud SQL activation policy selectable (#1613)
* Update main.tf

added activation policy

* Update variables.tf

added activation_policy variable defaulted as ALWAYS for non regression

* corrections requested by @juliocc

* Regeneration of README.md on cloudsql-instance mod

* terraform fmt changes

* bug correctionand activation_policy on replicas

* activation_policy description change and README.md

* Bug correction
2023-08-25 12:12:08 +02:00
erabusi
f9509ad6b7 feat: 🎸 (modules/cloudsql-instance): enable require_ssl cert support (#1588) 2023-08-14 11:37:03 +02:00
Mikhail Filipchuk
ec74f351f5 feat(cloudsql-instance): Add query insights config (#1520) 2023-07-21 20:14:34 +02:00
Ludovico Magnocavallo
884cb8b4bf Ensure all modules have an id output (#1410)
* net-vpc

* a-d

* complete modules

* fix error
2023-06-02 16:07:22 +02:00
Julio Castillo
cecbd2072c Fix modules and blueprints tests 2023-05-26 16:38:41 +02:00
Julio Castillo
d22bf2ec6b Update README.md 2023-05-24 11:34:21 +02:00
Julio Castillo
4770cb06fd Migrate cloudsql-instance examples 2023-04-17 09:17:54 +02:00