---
inputType: "CA10Z1__CaAzureSqlManagedInstance__c"
importExtracts:
  - file: "/types/CA10Z1__CaAzureSqlManagedInstance__c/object.extracts.yaml"
testData:
  - file: 'test-data.json'
conditions:
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in westus which is more expensive than westus3 or westus2."
    remediationMessage: "Consider migrating the Instance to westus3 or westus2."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "westus"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in westcentralus which is more expensive than westus3 or westus2."
    remediationMessage: "Consider migrating the Instance to westus3 or westus2."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "westcentralus"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in southcentralus which is more expensive than northcentralus, westus3 or westus2."
    remediationMessage: "Consider migrating the Instance to northcentralus, westus3 or westus2."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "southcentralus"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in centralus which is more expensive than northcentralus, westus3 or westus2."
    remediationMessage: "Consider migrating the Instance to northcentralus, westus3 or westus2."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "centralus"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in canadaeast which is more expensive than eastus or eastus2."
    remediationMessage: "Consider migrating the Instance to eastus or eastus2."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "canadaeast"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in canadacentral which is more expensive than eastus or eastus2."
    remediationMessage: "Consider migrating the Instance to eastus or eastus2."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "canadacentral"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in ukwest which is more expensive than eu-west-1, eu-north-1, or eu-south-2."
    remediationMessage: "Consider migrating the Instance to eu-west-1, eu-north-1, or eu-south-2."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "ukwest"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in uksouth which is more expensive than eu-west-1, eu-north-1, or eu-south-2."
    remediationMessage: "Consider migrating the Instance to eu-west-1, eu-north-1, or eu-south-2."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "uksouth"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in francecentral which is more expensive than eu-west-1, eu-north-1, or eu-south-2."
    remediationMessage: "Consider migrating the Instance to eu-west-1, eu-north-1, or eu-south-2."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "francecentral"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in francesouth which is more expensive than eu-west-1, eu-north-1, or eu-south-2."
    remediationMessage: "Consider migrating the Instance to eu-west-1, eu-north-1, or eu-south-2."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "francesouth"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in westeurope which is more expensive than northeurope."
    remediationMessage: "Consider migrating the Instance to northeurope."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "westeurope"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in germanywestcentral which is more expensive than northeurope."
    remediationMessage: "Consider migrating the Instance to northeurope."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "germanywestcentral"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in germanynorth which is more expensive than northeurope."
    remediationMessage: "Consider migrating the Instance to northeurope."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "germanynorth"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in switzerlandnorth which is more expensive than northeurope."
    remediationMessage: "Consider migrating the Instance to northeurope."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "switzerlandnorth"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in switzerlandwest which is more expensive than northeurope."
    remediationMessage: "Consider migrating the Instance to northeurope."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "switzerlandwest"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in italynorth which is more expensive than northeurope."
    remediationMessage: "Consider migrating the Instance to northeurope."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "italynorth"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in polandcentral which is more expensive than northeurope."
    remediationMessage: "Consider migrating the Instance to northeurope."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "polandcentral"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in norwayeast which is more expensive than northeurope."
    remediationMessage: "Consider migrating the Instance to northeurope."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "norwayeast"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in norwaywest which is more expensive than northeurope."
    remediationMessage: "Consider migrating the Instance to northeurope."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "norwaywest"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in swedensouth which is more expensive than northeurope."
    remediationMessage: "Consider migrating the Instance to northeurope."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "swedensouth"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in spaincentral which is more expensive than northeurope."
    remediationMessage: "Consider migrating the Instance to northeurope."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "spaincentral"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in southindia which is more expensive than centralindia or westindia."
    remediationMessage: "Consider migrating the Instance to centralindia or westindia."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "southindia"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Instance is running in japanwest which is more expensive than koreasouth, japaneast or koreacentral."
    remediationMessage: "Consider migrating the Instance to koreasouth, japaneast or koreacentral."
    check:
      IS_EQUAL:
        left:
          EXTRACT: CA10Z1__locationName__c
        right:
          TEXT: "japanwest"
otherwise:
  status: "COMPLIANT"
  currentStateMessage: "The Instance is located in a cost-effective region."


