File tree Expand file tree Collapse file tree
v2/spanner-common/terraform/samples/infra-setup Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ locals {
3535 default_version = " 8_0"
3636 default_port = 3306
3737 # MySQL binds users to connection origins; "%" allows external access.
38- user_host = " %"
38+ user_host = " %"
3939 }
4040 POSTGRES = {
4141 default_version = " 14"
4242 default_port = 5432
4343 # PostgreSQL does not support host-bound users in the GCP API; must be null.
44- user_host = null
44+ user_host = null
4545 }
4646 }
4747
@@ -127,7 +127,7 @@ resource "null_resource" "private_vpc_connection" {
127127 }
128128
129129 provisioner "local-exec" {
130- when = destroy
130+ when = destroy
131131 environment = {
132132 NETWORK_NAME = self.triggers.network_name
133133 PROJECT_ID = self.triggers.project_id
@@ -245,8 +245,8 @@ resource "google_storage_bucket_object" "schema_file" {
245245
246246# Grant IAM permissions to all Cloud SQL service accounts to read schema from the GCS bucket in a single API call to prevent ETag lock collision delays
247247resource "google_storage_bucket_iam_binding" "sql_gcs_reader" {
248- bucket = google_storage_bucket. schema_bucket . name
249- role = " roles/storage.objectViewer"
248+ bucket = google_storage_bucket. schema_bucket . name
249+ role = " roles/storage.objectViewer"
250250 members = [
251251 for inst in google_sql_database_instance . instances :
252252 " serviceAccount:${ inst . service_account_email_address } "
@@ -307,7 +307,7 @@ resource "google_spanner_instance" "spanner_instance" {
307307
308308 # Automated teardown of Spanner backups to prevent destroy failures
309309 provisioner "local-exec" {
310- when = destroy
310+ when = destroy
311311 environment = {
312312 INSTANCE_NAME = self.name
313313 PROJECT_ID = self.project
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ local_schema_file_path = "./schema.sql" # Local SQL schema imported into every s
2222# ------------------------------------------------------------------------------
2323# SOURCE DATABASE (Cloud SQL)
2424# ------------------------------------------------------------------------------
25- database_provider = " MYSQL" # MYSQL or POSTGRES
25+ database_provider = " MYSQL" # MYSQL or POSTGRES
2626# database_version = "8_0" # Set specific version (e.g., "14" for Postgres) or leave commented for module default
2727physical_shards_count = 1 # Number of physical Cloud SQL instances
2828logical_shards_count = 2 # Logical databases per physical instance
@@ -57,7 +57,7 @@ connection_properties = "jdbcCompliantTruncation=true"
5757# ------------------------------------------------------------------------------
5858# spanner_config = "regional-<REGION>" # e.g. "regional-us-central1"; defaults to regional-${var.region}
5959spanner_display_name = " SMT Spanner Instance"
60- spanner_processing_units = 100 # Positive multiple of 100 (100 = 0.1 node)
60+ spanner_processing_units = 100 # Positive multiple of 100 (100 = 0.1 node)
6161spanner_database_dialect = " GOOGLE_STANDARD_SQL" # GOOGLE_STANDARD_SQL or POSTGRESQL
6262# spanner_instance_name = "my-spanner" # Optional. Unset -> derived from instance_prefix
6363# spanner_database_name = "my-db" # Optional. Unset -> derived from migration_prefix
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ migration_prefix = "<MIGRATION_PREFIX>"
1515local_schema_file_path = " ./schema.sql"
1616
1717# Cloud SQL Database Setup
18- database_provider = " MYSQL"
18+ database_provider = " MYSQL"
1919# database_version = "8_0"
2020physical_shards_count = 1
2121logical_shards_count = 2
You can’t perform that action at this time.
0 commit comments