Terraform resource: google sql database instance

From wikieduonline
Revision as of 12:16, 7 November 2024 by Welcome (talk | contribs) (→‎Related)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Official example[edit]

resource "google_sql_database_instance" "main" {
 name             = "main-instance"
 database_version = "POSTGRES_15"
 region           = "us-central1"

 settings {
   # Second-generation instance tiers are based on the machine
   # type. See argument reference below.
   tier = "db-f1-micro"
 }
}


Relevants Outputs[edit]

# Output Connection Details

output "connection_name" {
  value = google_sql_database_instance.your-postgres-instance.connection_name
}

output "private_ip_address" {
  value = google_sql_database_instance.your-postgres-instance.private_ip_address
}

Related[edit]

See also[edit]

Advertising: