【发布时间】:2021-05-24 00:29:30
【问题描述】:
在 GCP 云中,我尝试通过 terraform 创建 PostgreSQL。我的组织政策不允许为公共 IP 创建。我必须使用私有 ip 或 VPC。我已经创建了 VPC,并想用它来创建 postgresql。
这是我尝试过的代码。我不知道在哪里给 VPC。
resource "google_sql_database_instance" "master" {
database_version = "POSTGRES_9_6"
region = "europe-west1"
settings {
tier = "db-f1-micro"
availability_type = "ZONAL"
}
}
【问题讨论】:
-
有很多关于这个案例使用的教程。请试一试,如果您有任何具体问题,请在此处发布medium.com/swlh/…
标签: postgresql google-cloud-platform terraform terraform-provider-gcp