Skip to content

Cloud SQL database instances do not have backup configuration enabled

Description

Cloud SQL is a fully managed relational database service for MySQL, PostgreSQL and SQL Server. It offers data encryption at rest and in transit, Private connectivity with VPC and user-controlled network access with firewall protection. Backups provide a way to restore a Cloud SQL instance to recover lost data or recover from a problem with your instance.

We recommend you enable automated backups for instances that contain data of high importance.

resource "google_sql_database_instance" "main" {
  name             = "main-instance"
  database_version = "POSTGRES_14"
  region           = "us-central1"
  settings {
    backup_configuration {
        enabled = True
    }
  }
}