Bylaw

Gallery › Sovereignty › Azure built-in policies

[Preview]: Assess workload readiness for continuity on Azure Local disconnected operations

Converted Initiative Version 1.0.0-preview Preview

Assess whether the Azure resource types used by a workload are supported in Azure Local disconnected operations, so that the workload can continue to operate if it must move off public Azure into a disconnected environment. Set the effect to Audit to report resource types that are not supported, to Deny to prevent those resource types from being created so that the migration path stays open, or to Disabled to turn the assessment off.

ConvertTo-Bylaw converted this initiative, and proved that the file compiles back to the same definition.

Azure Policy JSONBusinessContinuityAzureLocalDisconnected.json · 56 lines
{
  "properties": {
    "displayName": "[Preview]: Assess workload readiness for continuity on Azure Local disconnected operations",
    "policyType": "BuiltIn",
    "description": "Assess whether the Azure resource types used by a workload are supported in Azure Local disconnected operations, so that the workload can continue to operate if it must move off public Azure into a disconnected environment. Set the effect to Audit to report resource types that are not supported, to Deny to prevent those resource types from being created so that the migration path stays open, or to Disabled to turn the assessment off.",
    "metadata": {
      "version": "1.0.0-preview",
      "category": "Sovereignty",
      "preview": true
    },
    "version": "1.0.0-preview",
    "parameters": {
      "effect": {
        "type": "String",
        "defaultValue": "Audit",
        "allowedValues": [
          "Audit",
          "Deny",
          "Disabled"
        ],
        "metadata": {
          "displayName": "Effect",
          "description": "Controls the assessment of the workload against Azure Local disconnected operations. Set to Audit to report resource types that are not supported, to Deny to prevent those resource types from being created so that the migration path to disconnected operations stays open, or to Disabled to turn the assessment off."
        }
      },
      "includeMatchedServices": {
        "type": "Boolean",
        "defaultValue": false,
        "metadata": {
          "displayName": "Include Azure public services that are matchable to services supported in Azure Local disconnected operations",
          "description": "Set to true to also treat Azure public services that are matchable to a disconnected operations equivalent as supported. Set to false to consider only services that are strictly supported in Azure Local disconnected operations."
        }
      }
    },
    "policyDefinitions": [
      {
        "policyDefinitionReferenceId": "azureLocalDisconnectedOperations",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/dabf7c7f-5354-42de-a92a-8367f538dd71",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          },
          "includeMatchedServices": {
            "value": "[parameters('includeMatchedServices')]"
          }
        }
      }
    ],
    "versions": [
      "1.0.0-PREVIEW"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policySetDefinitions/cde006e8-1f6a-487f-94dd-1b40bb200cfa",
  "name": "cde006e8-1f6a-487f-94dd-1b40bb200cfa"
}
Bylawcde006e8-1f6a-487f-94dd-1b40bb200cfa.bylaw.ps1 · 35 lines
# Converted from BusinessContinuityAzureLocalDisconnected.json by ConvertTo-Bylaw.
Initiative 'cde006e8-1f6a-487f-94dd-1b40bb200cfa' {

    Properties @{
        DisplayName   = '[Preview]: Assess workload readiness for continuity on Azure Local disconnected operations'
        Description   = 'Assess whether the Azure resource types used by a workload are supported in Azure Local disconnected operations, so that the workload can continue to operate if it must move off public Azure into a disconnected environment. Set the effect to Audit to report resource types that are not supported, to Deny to prevent those resource types from being created so that the migration path stays open, or to Disabled to turn the assessment off.'
        Version       = '1.0.0-preview'
        Category      = 'Sovereignty'
        Preview       = $true
        PolicyVersion = '1.0.0-preview'
    }

    Parameter Effect @{
        AllowedValues = @('Audit', 'Deny', 'Disabled')
        Default       = 'Audit'
        DisplayName   = 'Effect'
        Description   = 'Controls the assessment of the workload against Azure Local disconnected operations. Set to Audit to report resource types that are not supported, to Deny to prevent those resource types from being created so that the migration path to disconnected operations stays open, or to Disabled to turn the assessment off.'
    }
    Parameter IncludeMatchedServices @{
        Type        = 'Boolean'
        Default     = $false
        DisplayName = 'Include Azure public services that are matchable to services supported in Azure Local disconnected operations'
        Description = 'Set to true to also treat Azure public services that are matchable to a disconnected operations equivalent as supported. Set to false to consider only services that are strictly supported in Azure Local disconnected operations.'
    }

    PolicyDefinition @{
        Id          = 'dabf7c7f-5354-42de-a92a-8367f538dd71'
        ReferenceId = 'azureLocalDisconnectedOperations'
        Version     = '1.*.*-preview'
        Parameters  = [ordered]@{
            effect                 = (Param Effect)
            includeMatchedServices = (Param IncludeMatchedServices)
        }
    }
}

Members (1)

Source: built-in-policies/policySetDefinitions/Sovereignty/BusinessContinuityAzureLocalDisconnected.json in Azure/azure-policy, under the MIT licence.