Ensure there is an automatic storage increase limit configured for your Cloud SQL database instances

Set a limit for automatic storage increase in your Cloud SQL database instance configurations to prevent any unexpected charges.

Risk Level: Low
Cloud Entity: GCP CloudSql
CloudGuard Rule ID: D9.GCP.AS.10
Covered by Spectral: No
Category: Database


CloudSql should have settings.storageAutoResizeLimit>0


From TF
Set 'disk_autoresize_limit' to an integer value:

resource 'google_sql_database_instance' 'EXAMPLE_CLOUDSQL_INSTANCE' {
		disk_autoresize_limit = INTEGER_VALUE_OF_GB

From Command Line
Set a storage auto increase limit for your CloudSQL instance:

gcloud beta sql instances patch EXAMPLE_CLOUDSQL_INSTANCE --storage-auto-increase-limit=INTEGER_VALUE_OF_GB


  1. https://cloud.google.com/sql/docs/mysql/instance-settings?&_ga=2.184574315.-394078672.1690983076#automatic-storage-increase-2ndgen
  2. https://registry.terraform.io/modules/GoogleCloudPlatform/sql-db/google/latest/submodules/mysql

GCP CloudSql

Cloud SQL is a fully managed database service that makes it easy to set up, maintain, manage, and administer your relational PostgreSQL, MySQL, and SQL Server databases in the cloud.

Compliance Frameworks

  • CloudGuard GCP All Rules Ruleset