terraform-google-modules / terraform-google-sql-db

Creates a Cloud SQL database instance
https://registry.terraform.io/modules/terraform-google-modules/sql-db/google
Apache License 2.0
265 stars 427 forks source link

feat!: Allow passing ssl_mode for MySQL Module #575

Closed davidcollom closed 8 months ago

davidcollom commented 8 months ago

There is currently no way of passing the ssl_mode value from the module to the cloudsql_instance resource.

This PR aims to address this issue.

imrannayer commented 8 months ago

@davidcollom thx for the PR. Can you plz set min provider version to 5.7 as this feature was part of 5.6 and a fix for this was part of 5.7. Can you plz add it to safer_mysql module? Also if this is this something needed for postgres, can u plz add it to postgres modules?

davidcollom commented 8 months ago

Hey @imrannayer thanks for your quick response.

As for postgresql I'm not sure, as I don't use this.

As for the safer_mysql module... Would you expect TRUSTED_CLIENT_CERTIFICATE_REQUIRED to be enforced? Or default? As this imo would be the "safest default value"..or would/should we fall back to the providers default?

davidcollom commented 8 months ago

@imrannayer I've updated the safer_mysql module, and checked the postgresql module, which already includes this feature, which was added here: https://github.com/terraform-google-modules/terraform-google-sql-db/commit/9c59232a37725aef57162e836090c64495e6acd9

g-awmalik commented 8 months ago

/gcbrun

g-awmalik commented 8 months ago

@imrannayer - are you good with the changes?

imrannayer commented 8 months ago

LGTM

davidcollom commented 8 months ago

Hey @imrannayer @g-awmalik what's needed to get this merged in? All the CI has passed but pending code reviews.