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>
This commit is contained in:
Prabha Arya
2022-12-12 16:14:44 +00:00
committed by GitHub
parent 7d61c697c3
commit 031b9f3476
4 changed files with 31 additions and 10 deletions

View File

@@ -175,3 +175,10 @@ resource "google_sql_user" "users" {
host = each.value.host
password = each.value.password
}
resource "google_sql_ssl_cert" "postgres_client_certificates" {
for_each = var.postgres_client_certificates != null ? toset(var.postgres_client_certificates) : toset([])
provider = google-beta
instance = google_sql_database_instance.primary.name
common_name = each.key
}