output "verify" { description = "Checks. The first full evaluation takes a few hours." value = <<-EOT az policy state summarize --management-group ${element(split("/", var.management_group_id), 3)} --filter "policyAssignmentName eq 'security-benchmark'" With auto_repair_public_blob_access on: az storage account update -n -g --allow-blob-public-access true az storage account show -n --query allowBlobPublicAccess # false: the policy rewrote the request as it arrived %{if var.auto_repair_public_blob_access}After the first evaluation, repair accounts that already allow it: az policy remediation create --name repair-public-blob --management-group ${element(split("/", var.management_group_id), 3)} --policy-assignment ${azurerm_management_group_policy_assignment.repair_public_blob[0].id}%{endif} EOT }