Skip to main content

Repository → 📁 Compliance Engine → 📁 CloudAware → 📁 Google → 📁 Cloud SQL

🛡️ Google Cloud SQL Instance is located in a less cost-effective region🟢

Logic

Description

Open File

Description

This policy identifies Google Cloud SQL Instances that are provisioned in Google regions known to have higher pricing compared to nearby alternatives.

Rationale

Cloud service costs vary across regions due to differences in infrastructure expenses, energy pricing, and regional market conditions. For workloads without strict geographic or latency requirements, deploying instances in more cost-efficient regions within the same continent can deliver significant cost savings without adversely affecting performance.

Impact

Migrating workloads to different regions requires careful planning to avoid service disruptions and to ensure latency, compliance, and data sovereignty requirements continue to be met.

Audit

This policy flagged an Google Cloud SQL Instance as INCOMPLIANT if it is running in one of the following regions identified as less cost-efficient:

RegionRecommended Alternative

... see more

Remediation

Open File

Remediation

Migrate a Google Cloud SQL Instance to Another Region

The following procedure outlines how to migrate a Cloud SQL instance from one region to another by creating a cross-region replica and promoting it to a standalone instance.

1. Verify Primary Instance Status

Check whether the instance is already a replica and confirm that backups are enabled:

gcloud sql instances describe {{primary-instance-name}}
  • If databaseReplicationEnabled: true, the instance is a replica — you cannot create a replica of a replica.
2. Create a Cross-Region Replica
gcloud sql instances create {{replica-instance-name}} \
--master-instance-name={{primary-instance-name}} \
--region={{target-region}}
3. Prepare for Promotion

Before promoting the replica:

  • Stop all writes to the primary.
  • Verify the replica is replicating and wait for replication lag to reach 0 (Seconds_Behind_Master = 0).
4. Promote the Replica
gcloud sql instances promote-replica {{replica-instance-name}}

The replica is now an independent Cloud SQL instance in the target region.

... see more

policy.yaml

Open File

Linked Framework Sections

SectionSub SectionsInternal RulesPoliciesFlagsCompliance
💼 Cloudaware Framework → 💼 Resource Optimization23no data