인스턴스를 대상 유지보수 버전으로 업그레이드

이 샘플은 인스턴스를 대상 유지보수 버전 POSTGRES_14_4.R20220710.01_07로 업그레이드합니다.

더 살펴보기

이 코드 샘플이 포함된 자세한 문서는 다음을 참조하세요.

코드 샘플

Terraform

Terraform 구성을 적용하거나 삭제하는 방법은 기본 Terraform 명령어를 참조하세요. 자세한 내용은 Terraform 제공업체 참고 문서를 확인하세요.

resource "google_sql_database_instance" "postgres_ssm_instance_name" {
  name                = "postgres-ssm-instance-name"
  region              = "asia-northeast1"
  database_version    = "POSTGRES_14"
  maintenance_version = "POSTGRES_14_4.R20220710.01_07"
  settings {
    tier = "db-f1-micro"
  }
  # set `deletion_protection` to true, will ensure that one cannot accidentally delete this instance by
  # use of Terraform whereas `deletion_protection_enabled` flag protects this instance at the GCP level.
  deletion_protection = false
}

다음 단계

다른 Google Cloud 제품의 코드 샘플을 검색하고 필터링하려면 Google Cloud 샘플 브라우저를 참고하세요.