From 3a9149540dc7c96306db224df3c955c494be9265 Mon Sep 17 00:00:00 2001 From: Luigi Bitonti Date: Thu, 23 Nov 2023 14:16:32 +0100 Subject: [PATCH] Added PSC example. --- modules/cloudsql-instance/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/cloudsql-instance/README.md b/modules/cloudsql-instance/README.md index dce195b59a..130a780f51 100644 --- a/modules/cloudsql-instance/README.md +++ b/modules/cloudsql-instance/README.md @@ -168,6 +168,27 @@ module "db" { # tftest modules=3 resources=10 ``` +### Instance with PSC enabled + +```hcl +module "db" { + source = "./fabric/modules/cloudsql-instance" + project_id = var.project_id + network_config = { + connectivity = { + psc_allowed_consumer_projects = ["my-project-id"] + } + } + prefix = "myprefix" + name = "db" + region = "europe-west1" + availability_type = "REGIONAL" + database_version = "POSTGRES_13" + tier = "db-g1-small" +} +# tftest modules=1 resources=1 +``` + ### Enable public IP Use `ipv_enabled` to create instances with a public IP.