Bylaw

Gallery › Sovereignty › Azure built-in policies

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

Converted Initiative Version 1.0.0-preview Preview

Assess whether the Azure resource types used by a workload are supported on connected Azure Local to help determine continuity readiness if Azure Public access is disrupted. Use Audit to report unsupported resource types, Deny to prevent their creation, or Disabled to turn off the assessment.

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

Azure Policy JSONBusinessContinuityAzureLocal.json · 45 lines
{
  "properties": {
    "displayName": "[Preview]: Assess workload readiness for continuity on Azure Local",
    "policyType": "BuiltIn",
    "description": "Assess whether the Azure resource types used by a workload are supported on connected Azure Local to help determine continuity readiness if Azure Public access is disrupted. Use Audit to report unsupported resource types, Deny to prevent their creation, or Disabled to turn off the assessment.",
    "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 connected Azure Local. Use Audit to report unsupported resource types, Deny to prevent their creation, or Disabled to turn off the assessment."
        }
      }
    },
    "policyDefinitions": [
      {
        "policyDefinitionReferenceId": "azureLocal",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9d35b50d-a1a5-4d67-a7ab-5115442bbfbb",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          }
        }
      }
    ],
    "versions": [
      "1.0.0-PREVIEW"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policySetDefinitions/24da7f6e-ca7a-4ede-bef4-25f158872a36",
  "name": "24da7f6e-ca7a-4ede-bef4-25f158872a36"
}
Bylaw24da7f6e-ca7a-4ede-bef4-25f158872a36.bylaw.ps1 · 28 lines
# Converted from BusinessContinuityAzureLocal.json by ConvertTo-Bylaw.
Initiative '24da7f6e-ca7a-4ede-bef4-25f158872a36' {

    Properties @{
        DisplayName   = '[Preview]: Assess workload readiness for continuity on Azure Local'
        Description   = 'Assess whether the Azure resource types used by a workload are supported on connected Azure Local to help determine continuity readiness if Azure Public access is disrupted. Use Audit to report unsupported resource types, Deny to prevent their creation, or Disabled to turn off the assessment.'
        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 connected Azure Local. Use Audit to report unsupported resource types, Deny to prevent their creation, or Disabled to turn off the assessment.'
    }

    PolicyDefinition @{
        Id          = '9d35b50d-a1a5-4d67-a7ab-5115442bbfbb'
        ReferenceId = 'azureLocal'
        Version     = '1.*.*-preview'
        Parameters  = @{
            effect = (Param Effect)
        }
    }
}

Members (1)

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