โญ Repository โ ๐ Compliance Engine โ ๐ CloudAware โ ๐ Google โ ๐ GCE
๐ก๏ธ 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 with categories
- ๐ข Policy with type
- ๐ข Production policy
- Policy Type:
BEST_PRACTICE
- Policy Categories:
COST
Logicโ
- ๐ง prod.logic.yaml๐ข
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
INCOMPLIANT
if 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 | 23 | no data |