Created
March 19, 2021 00:09
-
-
Save jesseloudon/d82fbd3130d2edc7572383abbadc9ddf to your computer and use it in GitHub Desktop.
AzureSpringClean2021 DINE policy example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
targetScope = 'subscription' | |
// PARAMETERS | |
param bicepExampleInitiativeId string | |
param assignmentIdentityLocation string | |
param assignmentEnforcementMode string | |
// RESOURCES | |
resource bicepExampleAssignment 'Microsoft.Authorization/policyAssignments@2020-09-01' = { | |
name: 'bicepExampleAssignment' | |
location: assignmentIdentityLocation | |
identity: { | |
type: 'SystemAssigned' | |
} | |
properties: { | |
displayName: 'Bicep Example Assignment' | |
description: 'Bicep Example Assignment' | |
enforcementMode: assignmentEnforcementMode | |
metadata: { | |
source: 'Bicep' | |
version: '0.1.0' | |
} | |
policyDefinitionId: bicepExampleInitiativeId | |
nonComplianceMessages: [ | |
{ | |
message: 'Resource is not compliant with a DeployIfNotExists policy' | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment