59 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
Brandon Tucker
c75fbaf66e Allow week5 maintenance update track (#3971)
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2026-05-18 07:17:09 +00:00
Brandon Tucker
76c6d4f404 [Cloud SQL] Add and pass-through vars.users.database_roles (#3968)
* Fix weekly_schedule config section for secondary instance

* Add and pass-through vars.users.database_roles

* Merge from upstream

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2026-05-14 21:25:00 +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
Suryansh Singhal
35615dd967 updated the retention days variable to allow null, thats defualt by definition as null represent 0 (#3919) 2026-04-28 14:22:08 +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
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ó
bb7d10635d Fix cloudsql-instance: update retain_backups_on_delete to optional and default to null instead of false 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
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
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
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
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
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
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
Brent Walker
cc7f749c2e Add defaults for backup_configuration
Mark not nullable
2023-02-10 05:34:58 -05:00
Brent Walker
560af8b02b Use optional for backup configuration map
Addition of new parameters will be backwards compatible
Better reflects the underlying resource requirements
2023-02-10 05:34:58 -05:00
Brent Walker
d00f3ee0cb Add support for point_in_time_recovery in backup settings 2023-02-10 05:34:58 -05:00
Ankur Saxena
b487b2c938 Feature - CloudSQL pre-allocation private IP range and GKE Cluster ignore_change lifecycle hook. (#1056)
* Update to include allocate_ip_range

* Updates to GKE Cluster module

* Add boot_disk_kms_key to ignore changes

* Update ignore lifecycle block

* Update docs

* Remove default_pool_boot_disk

* Refactor as per suggestions in PR

* Update readme

* Update variable sort

* Changes to address review comments

Co-authored-by: Ankur Saxena <ankur.saxena@nwmworld.com>
2022-12-20 07:08:00 +00:00
Prabha Arya
031b9f3476 Add ssl certs to cloudsql instance (#1049)
* add ssl certs to cloudsql instance

* rename variable

* fix typo

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2022-12-12 17:14:44 +01:00
Julio Castillo
612d7283e8 Enforce nonempty descriptions ending in a colon 2022-11-24 18:56:01 +01:00
Julio Castillo
2e700db8a7 Fix variable/output sort check 2022-11-21 13:17:55 +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
cmalpe
2e51bdd8c4 added root password support for MS SQL Server 2022-09-29 10:57:19 +00:00
Alef Reis
97104c0098 Add support to a public access to cloudsql-instance (#754)
* feat: add support to a public access to cloudsql-instance

* doc: update cloudsql-instance doc changing the ipv4_enabled parameter description

* test: fix assertion test to ipv4_enabled
2022-08-09 13:42:42 +02:00
Julio Castillo
1f254880b9 Add sqladmin to project jit_si and fix some documentation 2022-04-13 00:22:54 +02:00
Lorenzo Caggioni
c7c77541fb Add KMS on CloudSQL module 2022-04-12 19:01:34 +02:00