🛡️ Google GCE Instance is located in a less cost-effective region🟢
- Contextual name: 🛡️ GCE Instance is located in a less cost-effective region🟢
- ID:
/ce/ca/google/compute-engine/instance-cost-effective-region - Tags:
- Policy Type:
BEST_PRACTICE - Policy Categories:
COST
Logic
Description
Description
This policy identifies Google GCE 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 GCE Instance as
INCOMPLIANTif it is running in one of the following regions identified as less cost-efficient:
Region Recommended Alternative ... see more
Remediation
Remediation
Prerequisites
- Ensure you have sufficient quotas in the destination region (disk, snapshot, VM quotas).
- Verify that persistent disks attached to the VM are not currently mounted elsewhere.
- Consider local SSDs or ephemeral storage: data on local SSDs will not survive termination, so replicate or back up any needed data.
- If the VM has GPUs, ensure equivalent GPU types are available in the target region/zone.
- If moving across regions, you may need to choose a new subnetwork in the target region (cross-region VMs cannot keep existing subnetworks).
- Recognize that internal/external IPs may change. Intra-region moves preserve external IPs; cross-region moves require new external IPs.
Migrate a Google GCE Instance
1. Identify Disks Associated with the Instance
gcloud compute instances describe {{instance-name}} \
--zone {{old-zone}} \
--format="list(name,status,disks)"2. Disable Auto-Delete on Disks
Prevent the disks from being deleted when the VM is removed:
gcloud compute instances set-disk-auto-delete {{instance-name}} \
... [see more](remediation.md)
policy.yaml
Linked Framework Sections
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| 💼 Cloudaware Framework → 💼 Resource Optimization | 24 | no data |