Cloud SQL instance backup is disabled Affecting Cloud SQL service in Google


Severity

0.0
medium
0
10
Severity Framework
Snyk CCSS
Rule category
Data/ Backup

Is your environment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
Frameworks
CIS-ControlsCIS-GoogleCSA-CCMGDPRHIPAAISO-27001SOC-2
  • Snyk IDSNYK-CC-00364
  • creditSnyk Research Team

Description

SQL database instances should be configured to be automatically backed up. Backups enable a Cloud SQL instance to recover lost data or to recover from a problem with that instance.

How to fix?

Set settings.backup_configuration.enabled attribute to true.

Example Configuration

resource "google_sql_database_instance" "allowed" {
  name             = "master-instance"
  database_version = "POSTGRES_11"
  region           = "us-central1"

  settings {

    tier = "db-f1-micro"
    backup_configuration {
      enabled = true
    }
  }
}