⭐ Repository → 📁 Compliance Engine → 📁 CloudAware → 📁 Azure → 📁 Virtual Machine → 🛡️ Virtual Machine is located in a less cost-effective region🟢
🧠 Azure Virtual Machine is located in a less cost-effective region - prod.logic.yaml🟢
- Contextual name: 🧠 prod.logic.yaml🟢
- ID:
/ce/ca/azure/virtual-machine/virtual-machine-cost-effective-region/prod.logic.yaml
- Tags:
Uses
Test Results 🟢
Generated at: 2025-10-01T12:48:46.449184138Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
🟢 | 001 | ✔️ 99 | ✔️ isDisappeared(CA10__disappearanceTime__c) | ✔️ null |
🟢 | 002 | ✔️ 199 | ✔️ extract('CA10__powerState__c') != 'VM running' | ✔️ null |
🟢 | 003 | ✔️ 1299 | ✔️ extract('CA10__locationName__c') == 'westeurope' | ✔️ null |
🟢 | 004 | ✔️ 2699 | ✔️ extract('CA10__locationName__c') == 'japaneast' | ✔️ null |
🟢 | 005 | ✔️ 2900 | ✔️ otherwise | ✔️ null |
Generation Bundle
File | MD5 | |
---|---|---|
Open | /ce/ca/azure/virtual-machine/virtual-machine-cost-effective-region/policy.yaml | 94B50007C37D02EC48C718BF4FCAB623 |
Open | /ce/ca/azure/virtual-machine/virtual-machine-cost-effective-region/prod.logic.yaml | D59AC2B15CB904752949E2D37C4C8E56 |
Open | /ce/ca/azure/virtual-machine/virtual-machine-cost-effective-region/test-data.json | 96A6CF89D5AAF983984AE9E9388CEBA0 |
Open | /types/CA10__CaAzureVirtualMachine__c/object.extracts.yaml | 49B8C1FA94F9336B7DAA92DB8C7244AF |
Available Commands
repo-manager policies generate FULL /ce/ca/azure/virtual-machine/virtual-machine-cost-effective-region/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/azure/virtual-machine/virtual-machine-cost-effective-region/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/azure/virtual-machine/virtual-machine-cost-effective-region/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/azure/virtual-machine/virtual-machine-cost-effective-region/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/azure/virtual-machine/virtual-machine-cost-effective-region/prod.logic.yaml
Content
---
inputType: "CA10__CaAzureVirtualMachine__c"
importExtracts:
- file: "/types/CA10__CaAzureVirtualMachine__c/object.extracts.yaml"
testData:
- file: 'test-data.json'
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The VM is not running."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__powerState__c"
right:
TEXT: "VM running"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in westus which is more expensive than westus3 or westus2."
remediationMessage: "Consider migrating the VM to westus3 or westus2."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "westus"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in westcentralus which is more expensive than westus3 or westus2."
remediationMessage: "Consider migrating the VM to westus3 or westus2."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "westcentralus"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in southcentralus which is more expensive than northcentralus, westus3 or westus2."
remediationMessage: "Consider migrating the VM to northcentralus, westus3 or westus2."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "southcentralus"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in centralus which is more expensive than northcentralus, westus3 or westus2."
remediationMessage: "Consider migrating the VM to northcentralus, westus3 or westus2."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "centralus"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in canadaeast which is more expensive than eastus or eastus2."
remediationMessage: "Consider migrating the VM to eastus or eastus2."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "canadaeast"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in canadacentral which is more expensive than eastus or eastus2."
remediationMessage: "Consider migrating the VM to eastus or eastus2."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "canadacentral"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in ukwest which is more expensive than eu-west-1, eu-north-1, or eu-south-2."
remediationMessage: "Consider migrating the VM to eu-west-1, eu-north-1, or eu-south-2."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "ukwest"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in uksouth which is more expensive than eu-west-1, eu-north-1, or eu-south-2."
remediationMessage: "Consider migrating the VM to eu-west-1, eu-north-1, or eu-south-2."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "uksouth"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in francecentral which is more expensive than eu-west-1, eu-north-1, or eu-south-2."
remediationMessage: "Consider migrating the VM to eu-west-1, eu-north-1, or eu-south-2."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "francecentral"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in francesouth which is more expensive than eu-west-1, eu-north-1, or eu-south-2."
remediationMessage: "Consider migrating the VM to eu-west-1, eu-north-1, or eu-south-2."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "francesouth"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in westeurope which is more expensive than swedencentral or northeurope."
remediationMessage: "Consider migrating the VM to swedencentral or northeurope."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "westeurope"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in germanywestcentral which is more expensive than swedencentral or northeurope."
remediationMessage: "Consider migrating the VM to swedencentral or northeurope."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "germanywestcentral"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in germanynorth which is more expensive than swedencentral or northeurope."
remediationMessage: "Consider migrating the VM to swedencentral or northeurope."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "germanynorth"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in switzerlandnorth which is more expensive than swedencentral or northeurope."
remediationMessage: "Consider migrating the VM to swedencentral or northeurope."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "switzerlandnorth"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in switzerlandwest which is more expensive than swedencentral or northeurope."
remediationMessage: "Consider migrating the VM to swedencentral or northeurope."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "switzerlandwest"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in italynorth which is more expensive than swedencentral or northeurope."
remediationMessage: "Consider migrating the VM to swedencentral or northeurope."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "italynorth"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in polandcentral which is more expensive than swedencentral or northeurope."
remediationMessage: "Consider migrating the VM to swedencentral or northeurope."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "polandcentral"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in norwayeast which is more expensive than swedencentral or northeurope."
remediationMessage: "Consider migrating the VM to swedencentral or northeurope."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "norwayeast"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in norwaywest which is more expensive than swedencentral or northeurope."
remediationMessage: "Consider migrating the VM to swedencentral or northeurope."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "norwaywest"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in swedensouth which is more expensive than swedencentral or northeurope."
remediationMessage: "Consider migrating the VM to swedencentral or northeurope."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "swedensouth"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in spaincentral which is more expensive than swedencentral or northeurope."
remediationMessage: "Consider migrating the VM to swedencentral or northeurope."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "spaincentral"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in southindia which is more expensive than centralindia."
remediationMessage: "Consider migrating the VM to centralindia."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "southindia"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in westindia which is more expensive than centralindia."
remediationMessage: "Consider migrating the VM to centralindia."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "westindia"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in australiasoutheast which is more expensive than australiacentral, australiacentral2 or australiaeast."
remediationMessage: "Consider migrating the VM to australiacentral, australiacentral2 or australiaeast."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "australiasoutheast"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in japaneast which is more expensive than koreasouth."
remediationMessage: "Consider migrating the VM to koreasouth."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "japaneast"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in japanwest which is more expensive than koreasouth."
remediationMessage: "Consider migrating the VM to koreasouth."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "japanwest"
- status: "INCOMPLIANT"
currentStateMessage: "The VM is running in koreacentral which is more expensive than koreasouth."
remediationMessage: "Consider migrating the VM to koreasouth."
check:
IS_EQUAL:
left:
EXTRACT: CA10__locationName__c
right:
TEXT: "koreacentral"
otherwise:
status: "COMPLIANT"
currentStateMessage: "The VM is located in a cost-effective region."