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
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ jobs:
}

$projectSettings = Get-Content -Path 'settings.json' | ConvertFrom-Json
if (-not [String]::IsNullOrEmpty($projectSettings.enableDefaultTelemetry)) {
if (-not [String]::IsNullOrEmpty($projectSettings.enableDefaultTelemetry) -and (Get-Content -Path $functionInput.templateFilePath -Raw) -like '*param enableDefaultTelemetry*') {
$functionInput['additionalParameters'] += @{
enableDefaultTelemetry = $projectSettings.enableDefaultTelemetry
}
Expand Down Expand Up @@ -291,7 +291,7 @@ jobs:
}

$projectSettings = Get-Content -Path 'settings.json' | ConvertFrom-Json
if (-not [String]::IsNullOrEmpty($projectSettings.enableDefaultTelemetry)) {
if (-not [String]::IsNullOrEmpty($projectSettings.enableDefaultTelemetry) -and (Get-Content -Path $functionInput.templateFilePath -Raw) -like '*param enableDefaultTelemetry*') {
$functionInput['additionalParameters'] += @{
enableDefaultTelemetry = $projectSettings.enableDefaultTelemetry
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ runs:
}

$projectSettings = Get-Content -Path 'settings.json' | ConvertFrom-Json
if (-not [String]::IsNullOrEmpty($projectSettings.enableDefaultTelemetry)) {
if (-not [String]::IsNullOrEmpty($projectSettings.enableDefaultTelemetry) -and (Get-Content -Path $functionInput.templateFilePath -Raw) -like '*param enableDefaultTelemetry*') {
$functionInput['additionalParameters'] += @{
enableDefaultTelemetry = $projectSettings.enableDefaultTelemetry
}
Expand Down Expand Up @@ -191,7 +191,7 @@ runs:
}

$projectSettings = Get-Content -Path 'settings.json' | ConvertFrom-Json
if (-not [String]::IsNullOrEmpty($projectSettings.enableDefaultTelemetry)) {
if (-not [String]::IsNullOrEmpty($projectSettings.enableDefaultTelemetry) -and (Get-Content -Path $functionInput.templateFilePath -Raw) -like '*param enableDefaultTelemetry*') {
$functionInput['additionalParameters'] += @{
enableDefaultTelemetry = $projectSettings.enableDefaultTelemetry
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ var identity_var = identity == 'SystemAssigned' ? {

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
location: location
properties: {
mode: 'Incremental'
template: {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ var identity_var = identity == 'SystemAssigned' ? {

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
location: location
properties: {
mode: 'Incremental'
template: {
Expand Down
2 changes: 2 additions & 0 deletions arm/Microsoft.Authorization/policyDefinitions/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ module policyDefinition_mg 'managementGroup/deploy.bicep' = if (empty(subscripti
metadata: !empty(metadata) ? metadata : {}
parameters: !empty(parameters) ? parameters : {}
policyRule: policyRule
location: location
}
}

Expand All @@ -81,6 +82,7 @@ module policyDefinition_sub 'subscription/deploy.bicep' = if (!empty(subscriptio
metadata: !empty(metadata) ? metadata : {}
parameters: !empty(parameters) ? parameters : {}
policyRule: policyRule
location: location
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ 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. 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)}'
location: location
properties: {
mode: 'Incremental'
template: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,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). |
| `location` | string | `[deployment().location]` | | Optional. Location for all resources. |
| `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
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ param policyRule object
@sys.description('Optional. The subscription ID of the subscription')
param subscriptionId string = subscription().subscriptionId

@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)}'
location: location
properties: {
mode: 'Incremental'
template: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,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). |
| `location` | string | `[deployment().location]` | | Optional. Location for all resources. |
| `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
3 changes: 3 additions & 0 deletions arm/Microsoft.Authorization/policyExemptions/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
location: location
properties: {
mode: 'Incremental'
template: {
Expand All @@ -70,6 +71,7 @@ module policyExemption_mg 'managementGroup/deploy.bicep' = if (empty(subscriptio
policyDefinitionReferenceIds: !empty(policyDefinitionReferenceIds) ? policyDefinitionReferenceIds : []
expiresOn: !empty(expiresOn) ? expiresOn : ''
managementGroupId: managementGroupId
location: location
}
}

Expand All @@ -86,6 +88,7 @@ module policyExemption_sub 'subscription/deploy.bicep' = if (!empty(subscription
policyDefinitionReferenceIds: !empty(policyDefinitionReferenceIds) ? policyDefinitionReferenceIds : []
expiresOn: !empty(expiresOn) ? expiresOn : ''
subscriptionId: subscriptionId
location: location
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ 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. 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)}'
location: location
properties: {
mode: 'Incremental'
template: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ With this module you can create policy exemptions on a management group level.
| `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. |
| `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. |
| `metadata` | object | `{object}` | | Optional. The policy exemption 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 exemption. Maximum length is 64 characters for management group scope. |
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ 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. 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)}'
location: location
properties: {
mode: 'Incremental'
template: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ With this module you can create policy exemptions on a subscription level.
| `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. |
| `metadata` | object | `{object}` | | Optional. The policy exemption 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 exemption. Maximum length is 64 characters for subscription scope. |
| `policyAssignmentId` | string | | | Required. The resource ID of the policy assignment that is being exempted. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
location: location
properties: {
mode: 'Incremental'
template: {
Expand All @@ -59,6 +60,7 @@ module policySetDefinition_mg 'managementGroup/deploy.bicep' = if (empty(subscri
policyDefinitions: policyDefinitions
policyDefinitionGroups: !empty(policyDefinitionGroups) ? policyDefinitionGroups : []
managementGroupId: managementGroupId
location: location
}
}

Expand All @@ -74,6 +76,7 @@ module policySetDefinition_sub 'subscription/deploy.bicep' = if (!empty(subscrip
policyDefinitions: policyDefinitions
policyDefinitionGroups: !empty(policyDefinitionGroups) ? policyDefinitionGroups : []
subscriptionId: subscriptionId
location: location
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ 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. 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)}'
location: location
properties: {
mode: 'Incremental'
template: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,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). |
| `location` | string | `[deployment().location]` | | Optional. Location for all resources. |
| `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
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ 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. 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)}'
location: location
properties: {
mode: 'Incremental'
template: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ With this module you can create policy set definitions on a subscription level.
| `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). |
| `location` | string | `[deployment().location]` | | Optional. Location for all resources. |
| `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 64 characters for subscription scope. |
| `parameters` | object | `{object}` | | Optional. The Set Definition (Initiative) parameters that can be used in policy definition references. |
Expand Down
3 changes: 3 additions & 0 deletions arm/Microsoft.Authorization/roleAssignments/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
location: location
properties: {
mode: 'Incremental'
template: {
Expand All @@ -71,6 +72,7 @@ module roleAssignment_mg 'managementGroup/deploy.bicep' = if (empty(subscription
delegatedManagedIdentityResourceId: !empty(delegatedManagedIdentityResourceId) ? delegatedManagedIdentityResourceId : ''
conditionVersion: conditionVersion
condition: !empty(condition) ? condition : ''
location: location
}
}

Expand All @@ -86,6 +88,7 @@ module roleAssignment_sub 'subscription/deploy.bicep' = if (!empty(subscriptionI
delegatedManagedIdentityResourceId: !empty(delegatedManagedIdentityResourceId) ? delegatedManagedIdentityResourceId : ''
conditionVersion: conditionVersion
condition: !empty(condition) ? condition : ''
location: location
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ param principalType string = ''
@sys.description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
param enableDefaultTelemetry bool = true

@sys.description('Optional. Location for all resources.')
param location string = deployment().location

var builtInRoleNames_var = {
'AcrPush': '/providers/Microsoft.Authorization/roleDefinitions/8311e382-0749-4cb8-b61a-304f252e45ec'
'API Management Service Contributor': '/providers/Microsoft.Authorization/roleDefinitions/312a565d-c81f-4fd8-895a-4e21e48d571c'
Expand Down Expand Up @@ -326,6 +329,7 @@ var roleDefinitionId_var = (contains(builtInRoleNames_var, roleDefinitionIdOrNam

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
location: location
properties: {
mode: 'Incremental'
template: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ With this module you can perform role assignments on a management group level
| `delegatedManagedIdentityResourceId` | string | | | Optional. ID of the delegated managed identity resource |
| `description` | string | | | Optional. Description of role assignment |
| `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. Group ID of the Management Group to assign the RBAC role to. If not provided, will use the current scope for deployment. |
| `principalId` | string | | | Required. The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity) |
| `principalType` | string | | `[ServicePrincipal, Group, User, ForeignGroup, Device, ]` | Optional. The principal type of the assigned principal ID. |
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ param delegatedManagedIdentityResourceId string = ''
@sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to')
param condition string = ''

@sys.description('Optional. Location for all resources.')
param location string = deployment().location

@sys.description('Optional. Version of the condition. Currently accepted value is "2.0"')
@allowed([
'2.0'
Expand Down Expand Up @@ -324,6 +327,7 @@ var builtInRoleNames_var = {

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
location: location
properties: {
mode: 'Incremental'
template: {
Expand Down
Loading