Skip to content

enhancement: Add Azure Policy deployment script #53

Description

@Daren9m

Description

Policy JSON definitions exist in policies/ (require-tags.json, deny-unused-resource-types.json) but there is no PowerShell script to deploy them to Azure. The cleanup strategy Phase 3 (Governance) requires deploying policies in Audit mode.

Proposed Script

policies/Deploy-AzurePolicies.ps1 with:

  • -Mode parameter: Audit (default) or Deny
  • -Scope parameter: subscription or management group
  • -WhatIf support
  • Deploys both policy definitions and assignments
  • Logs deployment results

Acceptance Criteria

  • Script deploys policies in Audit mode by default
  • -WhatIf shows what would be deployed without making changes
  • Can switch to Deny mode with explicit parameter
  • Pester tests with mocked Az calls

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions