{
  "properties": {
    "displayName": "PCI v3.2.1:2018",
    "policyType": "BuiltIn",
    "description": "This initiative includes audit and virtual machine extension deployment policies that address a subset of PCI v3.2.1:2018 controls. Additional policies will be added in upcoming releases. For more information, visit https://aka.ms/pciv321-init.",
    "metadata": {
      "version": "3.0.2",
      "category": "Regulatory Compliance"
    },
    "parameters": {
      "IncludeArcMachines": {
        "type": "string",
        "metadata": {
            "displayName": "Include Arc connected servers for Guest Configuration policies",
            "description": "Optionally choose to audit settings inside Arc connected servers using Guest Configuration policies. By selecting this option, you agree to be charged monthly per Arc connected machine."
        },
        "allowedValues": [
            "true",
            "false"
        ],
        "defaultValue": "false"
      },
      "listOfResourceTypesWithDiagnosticLogsEnabled": {
        "type": "Array",
        "metadata": {
          "displayName": "List of resource types that should have resource logs enabled"
        },
        "defaultValue": [
          "Microsoft.AnalysisServices/servers",
          "Microsoft.ApiManagement/service",
          "Microsoft.Network/applicationGateways",
          "Microsoft.Automation/automationAccounts",
          "Microsoft.ContainerInstance/containerGroups",
          "Microsoft.ContainerRegistry/registries",
          "Microsoft.ContainerService/managedClusters",
          "Microsoft.Batch/batchAccounts",
          "Microsoft.Cdn/profiles/endpoints",
          "Microsoft.CognitiveServices/accounts",
          "Microsoft.DocumentDB/databaseAccounts",
          "Microsoft.DataFactory/factories",
          "Microsoft.DataLakeAnalytics/accounts",
          "Microsoft.DataLakeStore/accounts",
          "Microsoft.EventGrid/eventSubscriptions",
          "Microsoft.EventGrid/topics",
          "Microsoft.EventHub/namespaces",
          "Microsoft.Network/expressRouteCircuits",
          "Microsoft.Network/azureFirewalls",
          "Microsoft.HDInsight/clusters",
          "Microsoft.Devices/IotHubs",
          "Microsoft.KeyVault/vaults",
          "Microsoft.Network/loadBalancers",
          "Microsoft.Logic/integrationAccounts",
          "Microsoft.Logic/workflows",
          "Microsoft.DBforMySQL/servers",
          "Microsoft.Network/networkInterfaces",
          "Microsoft.Network/networkSecurityGroups",
          "Microsoft.DBforPostgreSQL/servers",
          "Microsoft.PowerBIDedicated/capacities",
          "Microsoft.Network/publicIPAddresses",
          "Microsoft.RecoveryServices/vaults",
          "Microsoft.Cache/redis",
          "Microsoft.Relay/namespaces",
          "Microsoft.Search/searchServices",
          "Microsoft.ServiceBus/namespaces",
          "Microsoft.SignalRService/SignalR",
          "Microsoft.Sql/servers/databases",
          "Microsoft.Sql/servers/elasticPools",
          "Microsoft.StreamAnalytics/streamingjobs",
          "Microsoft.TimeSeriesInsights/environments",
          "Microsoft.Network/trafficManagerProfiles",
          "Microsoft.Compute/virtualMachines",
          "Microsoft.Compute/virtualMachineScaleSets",
          "Microsoft.Network/virtualNetworks",
          "Microsoft.Network/virtualNetworkGateways"
        ],
        "allowedValues": [
          "Microsoft.AnalysisServices/servers",
          "Microsoft.ApiManagement/service",
          "Microsoft.Network/applicationGateways",
          "Microsoft.Automation/automationAccounts",
          "Microsoft.ContainerInstance/containerGroups",
          "Microsoft.ContainerRegistry/registries",
          "Microsoft.ContainerService/managedClusters",
          "Microsoft.Batch/batchAccounts",
          "Microsoft.Cdn/profiles/endpoints",
          "Microsoft.CognitiveServices/accounts",
          "Microsoft.DocumentDB/databaseAccounts",
          "Microsoft.DataFactory/factories",
          "Microsoft.DataLakeAnalytics/accounts",
          "Microsoft.DataLakeStore/accounts",
          "Microsoft.EventGrid/eventSubscriptions",
          "Microsoft.EventGrid/topics",
          "Microsoft.EventHub/namespaces",
          "Microsoft.Network/expressRouteCircuits",
          "Microsoft.Network/azureFirewalls",
          "Microsoft.HDInsight/clusters",
          "Microsoft.Devices/IotHubs",
          "Microsoft.KeyVault/vaults",
          "Microsoft.Network/loadBalancers",
          "Microsoft.Logic/integrationAccounts",
          "Microsoft.Logic/workflows",
          "Microsoft.DBforMySQL/servers",
          "Microsoft.Network/networkInterfaces",
          "Microsoft.Network/networkSecurityGroups",
          "Microsoft.DBforPostgreSQL/servers",
          "Microsoft.PowerBIDedicated/capacities",
          "Microsoft.Network/publicIPAddresses",
          "Microsoft.RecoveryServices/vaults",
          "Microsoft.Cache/redis",
          "Microsoft.Relay/namespaces",
          "Microsoft.Search/searchServices",
          "Microsoft.ServiceBus/namespaces",
          "Microsoft.SignalRService/SignalR",
          "Microsoft.Sql/servers/databases",
          "Microsoft.Sql/servers/elasticPools",
          "Microsoft.StreamAnalytics/streamingjobs",
          "Microsoft.TimeSeriesInsights/environments",
          "Microsoft.Network/trafficManagerProfiles",
          "Microsoft.Compute/virtualMachines",
          "Microsoft.Compute/virtualMachineScaleSets",
          "Microsoft.Network/virtualNetworks",
          "Microsoft.Network/virtualNetworkGateways"
        ]
      }
    },
    "policyDefinitions": [
      {
        "policyDefinitionReferenceId": "previewAuditAccountsWithOwnerPermissionsWhoAreNotMfaEnabledOnASubscription",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/aa633080-8b72-40c4-a2d7-d00c03e80bed",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewAuditAccountsWithWritePermissionsWhoAreNotMfaEnabledOnASubscription",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9297c21d-2ed6-4474-b48f-163f75654ce3",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewAuditDeprecatedAccountsOnASubscription",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/6b1cbf55-e8b6-442f-ba4c-7246b6381474",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewAuditDeprecatedAccountsWithOwnerPermissionsOnASubscription",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/ebb62a0c-3560-49e1-89ed-27e074e9f8ad",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewAuditExternalAccountsWithOwnerPermissionsOnASubscription",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/f8456c1c-aa66-4dfb-861a-25d127b775c9",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewAuditExternalAccountsWithReadPermissionsOnASubscription",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/5f76cf89-fbf2-47fd-a3f4-b891fa780b60",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewAuditExternalAccountsWithWritePermissionsOnASubscription",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/5c607a2e-c700-4744-8254-d77e7c9eb5e4",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "Prerequisite_AddSystemIdentityWhenNone",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/3cf2ab00-13f1-4d0c-8971-2ac904541a7e",
        "parameters": {
        }  
      },
      {
        "policyDefinitionReferenceId": "Prerequisite_AddSystemIdentityWhenUser",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/497dff13-db2a-4c0f-8603-28fa3b331ab6",
        "parameters": {
        }
      },
      {
        "policyDefinitionReferenceId": "Prerequisite_DeployExtensionWindows",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/385f5831-96d4-41db-9a3c-cd3af78aaae6",
        "parameters": {
        }
      },
      {
        "policyDefinitionReferenceId": "previewAuditWindowsVmMaximumPasswordAge70Days",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/4ceb8dc2-559c-478b-a15b-733fbf1e3738",
        "parameters": {
          "IncludeArcMachines": {
            "value": "[parameters('IncludeArcMachines')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "previewAuditWindowsVmPasswordsMustBeAtLeast14Characters",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/a2d0e922-65d0-40c4-8f87-ea6da2d307a2",
        "parameters": {
          "IncludeArcMachines": {
            "value": "[parameters('IncludeArcMachines')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "previewAuditWindowsVmShouldNotAllowPrevious24Passwords",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/5b054a0d-39e2-4d53-bea3-9734cad2c69b",
        "parameters": {
          "IncludeArcMachines": {
            "value": "[parameters('IncludeArcMachines')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "previewAuditHttpsOnlyAccessForAnApiApp",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/b7ddfbdc-1260-477d-91fd-98bd9be789a6",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewAuditHttpsOnlyAccessForAFunctionApp",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/6d555dd1-86f2-4f1c-8ed7-5abae7c6cbab",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewAuditHttpsOnlyAccessForAWebApplication",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/a4af4a39-4135-47fb-b175-47fbdf85311d",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewAuditMaximumNumberOfOwnersForASubscription",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/4f11b553-d42e-4e3a-89be-32ca364cad4c",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewAuditMinimumNumberOfOwnersForSubscription",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/09024ccc-0c5f-475e-9457-b7c0d9ed487b",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewMonitorMissingEndpointProtectionInAzureSecurityCenter",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af6cd1bd-1635-48cb-bde7-5b15693900b9",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewMonitorMissingSystemUpdatesInAzureSecurityCenter",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/86b3d65f-7626-441e-b690-81a8b71cff60",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewMonitorOSVulnerabilitiesInAzureSecurityCenter",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e1e5fd5d-3e4c-4ce1-8661-7d1873ae6b15",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewMonitorSQLVulnerabilityAssessmentResultsInAzureSecurityCenter",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/feedbf84-6b99-488c-acc2-71c829aa5ffc",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewMonitorUnauditedSQLDatabaseInAzureSecurityCenter",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/a6fb4358-5bf4-4ad7-ba82-2cd2f41ce5e9",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewMonitorUnencryptedSQLDatabaseInAzureSecurityCenter",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/17k78e20-9358-41c9-923c-fb736d382a12",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewMonitorUnencryptedVmDisksInAzureSecurityCenter",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0961003e-5a0a-4549-abde-af6a37f2724d",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "accessThroughInternetFacingEndpointShouldBeRestricted",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "previewMonitorVmVulnerabilitiesInAzureSecurityCenter",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/501541f7-f7e7-4cd6-868c-4190fdad3ac9",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "auditDiagnosticSetting",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/7f89b1eb-583c-429a-8828-af049802c1d9",
        "parameters": {
          "listOfResourceTypes": {
            "value": "[parameters('listOfResourceTypesWithDiagnosticLogsEnabled')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "auditEnablementOfEncryptionOfAutomationAccountVariables",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/3657f5a0-770e-44a3-b44e-9431ba1e9735",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "auditEnablingOfOnlySecureConnectionsToYourRedisCache",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/22bee202-a82f-4305-9a2a-6d7f44d4dedb",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "auditProvisioningOfAnAzureActiveDirectoryAdministratorForSQLServer",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1f314764-cb73-4fc9-b863-8eca98ac36e9",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "auditSecureTransferToStorageAccounts",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/404c3081-a854-4457-ae30-26a93ef643f9",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "auditSQLServerLevelAuditingSettings",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/a6fb4358-5bf4-4ad7-ba82-2cd2f41ce5e9",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "auditTheSettingOfClusterprotectionlevelPropertyToEncryptandsignInServiceFabric",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/617c02be-7f02-4efd-8836-3180d47b6c68",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "auditUseOfClassicStorageAccounts",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/37e0d2fe-28a5-43d6-a273-67d37d1f5606",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "auditUseOfClassicVirtualMachines",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1d84d5fb-01f6-4d12-ba4f-4a26081d403d",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "auditTransparentDataEncryptionStatus",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/17k78e20-9358-41c9-923c-fb736d382a12",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "auditUnrestrictedNetworkAccessToStorageAccounts",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/34c877ad-507e-4c82-993e-3452a6e0ad3c",
        "parameters": {}
      },
      {
        "policyDefinitionReferenceId": "auditUsageOfCustomRBACRules",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/a451c1ef-c6ca-483d-87ed-f49761e3ffb5",
        "parameters": {}
      }
    ]
  },
  "id": "/providers/Microsoft.Authorization/policySetDefinitions/496eeda9-8f2f-4d5e-8dfd-204f0a92ed41",
  "name": "496eeda9-8f2f-4d5e-8dfd-204f0a92ed41"
}