Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions arm/Microsoft.Authorization/policyAssignments/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@ param notScopes array = []
@sys.description('Optional. Location for all resources.')
param location string = deployment().location

@sys.description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
}
}
}

module policyAssignment_mg 'managementGroup/deploy.bicep' = if (empty(subscriptionId) && empty(resourceGroupName)) {
name: '${uniqueString(deployment().name, location)}-PolicyAssignment-MG-Module'
scope: managementGroup(managementGroupId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,25 @@ var nonComplianceMessage_var = {
message: !empty(nonComplianceMessage) ? nonComplianceMessage : null
}

@sys.description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
param enableDefaultTelemetry bool = true

var identity_var = identity == 'SystemAssigned' ? {
type: identity
} : null

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
}
}
}

resource policyAssignment 'Microsoft.Authorization/policyAssignments@2021-06-01' = {
name: name
location: location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ With this module you can perform policy assignments on a management group level.
| :-- | :-- | :-- | :-- | :-- |
| `description` | string | | | Optional. This message will be part of response in case of policy violation. |
| `displayName` | string | | | Optional. The display name of the policy assignment. Maximum length is 128 characters. |
| `enableDefaultTelemetry` | bool | `True` | | Optional. Enable telemetry via the Customer Usage Attribution ID (GUID). |
| `enforcementMode` | string | `Default` | `[Default, DoNotEnforce]` | Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce |
| `identity` | string | `SystemAssigned` | `[SystemAssigned, None]` | Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions. |
| `location` | string | `[deployment().location]` | | Optional. Location for all resources. |
Expand Down
1 change: 1 addition & 0 deletions arm/Microsoft.Authorization/policyAssignments/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ With this module you can perform policy assignments across the management group,
| :-- | :-- | :-- | :-- | :-- |
| `description` | string | | | Optional. This message will be part of response in case of policy violation. |
| `displayName` | string | | | Optional. The display name of the policy assignment. Maximum length is 128 characters. |
| `enableDefaultTelemetry` | bool | `True` | | Optional. Enable telemetry via the Customer Usage Attribution ID (GUID). |
| `enforcementMode` | string | `Default` | `[Default, DoNotEnforce]` | Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce |
| `identity` | string | `SystemAssigned` | `[SystemAssigned, None]` | Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions. |
| `location` | string | `[deployment().location]` | | Optional. Location for all resources. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,25 @@ var nonComplianceMessage_var = {
@sys.description('Optional. The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment. If not provided, will use the current scope for deployment.')
param subscriptionId string = subscription().subscriptionId

@sys.description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
param enableDefaultTelemetry bool = true

var identity_var = identity == 'SystemAssigned' ? {
type: identity
} : null

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
}
}
}

resource policyAssignment 'Microsoft.Authorization/policyAssignments@2021-06-01' = {
name: name
location: location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ With this module you can perform policy assignments on a subscription level.
| :-- | :-- | :-- | :-- | :-- |
| `description` | string | | | Optional. This message will be part of response in case of policy violation. |
| `displayName` | string | | | Optional. The display name of the policy assignment. Maximum length is 128 characters. |
| `enableDefaultTelemetry` | bool | `True` | | Optional. Enable telemetry via the Customer Usage Attribution ID (GUID). |
| `enforcementMode` | string | `Default` | `[Default, DoNotEnforce]` | Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce |
| `identity` | string | `SystemAssigned` | `[SystemAssigned, None]` | Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions. |
| `location` | string | `[deployment().location]` | | Optional. Location for all resources. |
Expand Down
15 changes: 15 additions & 0 deletions arm/Microsoft.Authorization/policyDefinitions/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ param subscriptionId string = ''
@sys.description('Optional. Location for all resources.')
param location string = deployment().location

@sys.description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
}
}
}

module policyDefinition_mg 'managementGroup/deploy.bicep' = if (empty(subscriptionId)) {
name: '${uniqueString(deployment().name, location)}-PolicyDefinition-MG-Module'
scope: managementGroup(managementGroupId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ param policyRule object
@sys.description('Optional. The group ID of the Management Group. If not provided, will use the current scope for deployment.')
param managementGroupId string = managementGroup().name

@sys.description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
}
}
}

resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01' = {
name: name
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ With this module you can create policy definitions on a management group level.
| :-- | :-- | :-- | :-- | :-- |
| `description` | string | | | Optional. The policy definition description. |
| `displayName` | string | | | Optional. The display name of the policy definition. Maximum length is 128 characters. |
| `enableDefaultTelemetry` | bool | `True` | | Optional. Enable telemetry via the Customer Usage Attribution ID (GUID). |
| `managementGroupId` | string | `[managementGroup().name]` | | Optional. The group ID of the Management Group. If not provided, will use the current scope for deployment. |
| `metadata` | object | `{object}` | | Optional. The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
| `mode` | string | `All` | `[All, Indexed, Microsoft.KeyVault.Data, Microsoft.ContainerService.Data, Microsoft.Kubernetes.Data]` | Optional. The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data. |
Expand Down
1 change: 1 addition & 0 deletions arm/Microsoft.Authorization/policyDefinitions/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ With this module you can create policy definitions across the management group o
| :-- | :-- | :-- | :-- | :-- |
| `description` | string | | | Optional. The policy definition description. |
| `displayName` | string | | | Optional. The display name of the policy definition. Maximum length is 128 characters. |
| `enableDefaultTelemetry` | bool | `True` | | Optional. Enable telemetry via the Customer Usage Attribution ID (GUID). |
| `location` | string | `[deployment().location]` | | Optional. Location for all resources. |
| `managementGroupId` | string | `[managementGroup().name]` | | Optional. The group ID of the Management Group (Scope). If not provided, will use the current scope for deployment. |
| `metadata` | object | `{object}` | | Optional. The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ param policyRule object
@sys.description('Optional. The subscription ID of the subscription')
param subscriptionId string = subscription().subscriptionId

@sys.description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
}
}
}

resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01' = {
name: name
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ With this module you can create policy definitions on a subscription level.
| :-- | :-- | :-- | :-- | :-- |
| `description` | string | | | Optional. The policy definition description. |
| `displayName` | string | | | Optional. The display name of the policy definition. Maximum length is 128 characters. |
| `enableDefaultTelemetry` | bool | `True` | | Optional. Enable telemetry via the Customer Usage Attribution ID (GUID). |
| `metadata` | object | `{object}` | | Optional. The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
| `mode` | string | `All` | `[All, Indexed, Microsoft.KeyVault.Data, Microsoft.ContainerService.Data, Microsoft.Kubernetes.Data]` | Optional. The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data. |
| `name` | string | | | Required. Specifies the name of the policy definition. Maximum length is 64 characters. |
Expand Down
15 changes: 15 additions & 0 deletions arm/Microsoft.Authorization/policyExemptions/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ param resourceGroupName string = ''
@sys.description('Optional. Location for all resources.')
param location string = deployment().location

@sys.description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
}
}
}

module policyExemption_mg 'managementGroup/deploy.bicep' = if (empty(subscriptionId) && empty(resourceGroupName)) {
name: '${uniqueString(deployment().name, location)}-PolicyExemption-MG-Module'
scope: managementGroup(managementGroupId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ param expiresOn string = ''
@sys.description('Optional. The group ID of the management group to be exempted from the policy assignment. If not provided, will use the current scope for deployment.')
param managementGroupId string = managementGroup().name

@sys.description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
}
}
}

resource policyExemption 'Microsoft.Authorization/policyExemptions@2020-07-01-preview' = {
name: name
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ With this module you can create policy exemptions on a management group level.
| :-- | :-- | :-- | :-- | :-- |
| `description` | string | | | Optional. The description of the policy exemption. |
| `displayName` | string | | | Optional. The display name of the policy assignment. Maximum length is 128 characters. |
| `enableDefaultTelemetry` | bool | `True` | | Optional. Enable telemetry via the Customer Usage Attribution ID (GUID). |
| `exemptionCategory` | string | `Mitigated` | `[Mitigated, Waiver]` | Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated |
| `expiresOn` | string | | | Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z |
| `managementGroupId` | string | `[managementGroup().name]` | | Optional. The group ID of the management group to be exempted from the policy assignment. If not provided, will use the current scope for deployment. |
Expand Down
1 change: 1 addition & 0 deletions arm/Microsoft.Authorization/policyExemptions/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ With this module you can create policy exemptions across the management group, s
| :-- | :-- | :-- | :-- | :-- |
| `description` | string | | | Optional. The description of the policy exemption. |
| `displayName` | string | | | Optional. The display name of the policy exemption. Maximum length is 128 characters. |
| `enableDefaultTelemetry` | bool | `True` | | Optional. Enable telemetry via the Customer Usage Attribution ID (GUID). |
| `exemptionCategory` | string | `Mitigated` | `[Mitigated, Waiver]` | Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated |
| `expiresOn` | string | | | Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z |
| `location` | string | `[deployment().location]` | | Optional. Location for all resources. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ param expiresOn string = ''
@sys.description('Optional. The subscription ID of the subscription to be exempted from the policy assignment. If not provided, will use the current scope for deployment.')
param subscriptionId string = subscription().subscriptionId

@sys.description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
}
}
}

resource policyExemption 'Microsoft.Authorization/policyExemptions@2020-07-01-preview' = {
name: name
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ With this module you can create policy exemptions on a subscription level.
| :-- | :-- | :-- | :-- | :-- |
| `description` | string | | | Optional. The description of the policy exemption. |
| `displayName` | string | | | Optional. The display name of the policy exemption. Maximum length is 128 characters. |
| `enableDefaultTelemetry` | bool | `True` | | Optional. Enable telemetry via the Customer Usage Attribution ID (GUID). |
| `exemptionCategory` | string | `Mitigated` | `[Mitigated, Waiver]` | Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated |
| `expiresOn` | string | | | Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z |
| `metadata` | object | `{object}` | | Optional. The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
Expand Down
15 changes: 15 additions & 0 deletions arm/Microsoft.Authorization/policySetDefinitions/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ param parameters object = {}
@sys.description('Optional. Location for all resources.')
param location string = deployment().location

@sys.description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
}
}
}

module policySetDefinition_mg 'managementGroup/deploy.bicep' = if (empty(subscriptionId)) {
name: '${uniqueString(deployment().name, location)}-PolicySetDefinition-MG-Module'
scope: managementGroup(managementGroupId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ param policyDefinitionGroups array = []
@sys.description('Optional. The Set Definition (Initiative) parameters that can be used in policy definition references.')
param parameters object = {}

@sys.description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
}
}
}

resource policySetDefinition 'Microsoft.Authorization/policySetDefinitions@2021-06-01' = {
name: name
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ With this module you can create policy set definitions on a management group lev
| :-- | :-- | :-- | :-- | :-- |
| `description` | string | | | Optional. The description name of the Set Definition (Initiative) |
| `displayName` | string | | | Optional. The display name of the Set Definition (Initiative). Maximum length is 128 characters. |
| `enableDefaultTelemetry` | bool | `True` | | Optional. Enable telemetry via the Customer Usage Attribution ID (GUID). |
| `managementGroupId` | string | `[managementGroup().name]` | | Optional. The group ID of the Management Group. If not provided, will use the current scope for deployment. |
| `metadata` | object | `{object}` | | Optional. The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
| `name` | string | | | Required. Specifies the name of the policy Set Definition (Initiative). Maximum length is 24 characters for management group scope. |
Expand Down
Loading