diff --git a/modules/operational-insights/workspace/README.md b/modules/operational-insights/workspace/README.md index 7a39d99942..48f25812c4 100644 --- a/modules/operational-insights/workspace/README.md +++ b/modules/operational-insights/workspace/README.md @@ -1459,7 +1459,6 @@ LAW custom tables to be deployed. Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `useResourcePermissions` diff --git a/modules/operational-insights/workspace/data-source/README.md b/modules/operational-insights/workspace/data-source/README.md index 80b966ff99..73c7fb8958 100644 --- a/modules/operational-insights/workspace/data-source/README.md +++ b/modules/operational-insights/workspace/data-source/README.md @@ -157,7 +157,6 @@ Severities to configure when kind is LinuxSyslog. Tags to configure in the resource. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/operational-insights/workspace/data-source/main.bicep b/modules/operational-insights/workspace/data-source/main.bicep index 0f2f9ad625..7322f62ece 100644 --- a/modules/operational-insights/workspace/data-source/main.bicep +++ b/modules/operational-insights/workspace/data-source/main.bicep @@ -22,7 +22,7 @@ param name string param kind string = 'AzureActivityLog' @description('Optional. Tags to configure in the resource.') -param tags object = {} +param tags object? @description('Optional. Resource ID of the resource to be linked.') param linkedResourceId string = '' diff --git a/modules/operational-insights/workspace/data-source/main.json b/modules/operational-insights/workspace/data-source/main.json index 93d5aef582..4bc4f80e43 100644 --- a/modules/operational-insights/workspace/data-source/main.json +++ b/modules/operational-insights/workspace/data-source/main.json @@ -1,11 +1,12 @@ { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "7994060758159745935" + "templateHash": "13903182753870680383" }, "name": "Log Analytics Workspace Datasources", "description": "This module deploys a Log Analytics Workspace Data Source.", @@ -43,7 +44,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags to configure in the resource." } @@ -133,8 +134,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -148,7 +149,13 @@ } } }, - { + "workspace": { + "existing": true, + "type": "Microsoft.OperationalInsights/workspaces", + "apiVersion": "2022-10-01", + "name": "[parameters('logAnalyticsWorkspaceName')]" + }, + "dataSource": { "type": "Microsoft.OperationalInsights/workspaces/dataSources", "apiVersion": "2020-08-01", "name": "[format('{0}/{1}', parameters('logAnalyticsWorkspaceName'), parameters('name'))]", @@ -166,9 +173,12 @@ "syslogName": "[if(and(not(empty(parameters('kind'))), equals(parameters('kind'), 'LinuxSyslog')), parameters('syslogName'), null())]", "syslogSeverities": "[if(and(not(empty(parameters('kind'))), or(equals(parameters('kind'), 'LinuxSyslog'), equals(parameters('kind'), 'LinuxPerformanceObject'))), parameters('syslogSeverities'), null())]", "performanceCounters": "[if(and(not(empty(parameters('kind'))), equals(parameters('kind'), 'LinuxPerformanceObject')), parameters('performanceCounters'), null())]" - } + }, + "dependsOn": [ + "workspace" + ] } - ], + }, "outputs": { "resourceId": { "type": "string", diff --git a/modules/operational-insights/workspace/linked-service/README.md b/modules/operational-insights/workspace/linked-service/README.md index a05b704e17..c30872ecce 100644 --- a/modules/operational-insights/workspace/linked-service/README.md +++ b/modules/operational-insights/workspace/linked-service/README.md @@ -69,7 +69,6 @@ The resource ID of the resource that will be linked to the workspace. This shoul Tags to configure in the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `writeAccessResourceId` diff --git a/modules/operational-insights/workspace/linked-service/main.bicep b/modules/operational-insights/workspace/linked-service/main.bicep index b0bc3c505c..88fdc6283a 100644 --- a/modules/operational-insights/workspace/linked-service/main.bicep +++ b/modules/operational-insights/workspace/linked-service/main.bicep @@ -15,7 +15,7 @@ param resourceId string = '' param writeAccessResourceId string = '' @description('Optional. Tags to configure in the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true diff --git a/modules/operational-insights/workspace/linked-service/main.json b/modules/operational-insights/workspace/linked-service/main.json index e0de836475..ca4bdb12b7 100644 --- a/modules/operational-insights/workspace/linked-service/main.json +++ b/modules/operational-insights/workspace/linked-service/main.json @@ -1,11 +1,12 @@ { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "15022791045507209174" + "templateHash": "9970744617970664745" }, "name": "Log Analytics Workspace Linked Services", "description": "This module deploys a Log Analytics Workspace Linked Service.", @@ -40,7 +41,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags to configure in the resource." } @@ -53,8 +54,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -68,7 +69,13 @@ } } }, - { + "workspace": { + "existing": true, + "type": "Microsoft.OperationalInsights/workspaces", + "apiVersion": "2022-10-01", + "name": "[parameters('logAnalyticsWorkspaceName')]" + }, + "linkedService": { "type": "Microsoft.OperationalInsights/workspaces/linkedServices", "apiVersion": "2020-08-01", "name": "[format('{0}/{1}', parameters('logAnalyticsWorkspaceName'), parameters('name'))]", @@ -76,9 +83,12 @@ "properties": { "resourceId": "[parameters('resourceId')]", "writeAccessResourceId": "[if(empty(parameters('writeAccessResourceId')), null(), parameters('writeAccessResourceId'))]" - } + }, + "dependsOn": [ + "workspace" + ] } - ], + }, "outputs": { "name": { "type": "string", diff --git a/modules/operational-insights/workspace/main.bicep b/modules/operational-insights/workspace/main.bicep index 6220a5deb5..437e5c9730 100644 --- a/modules/operational-insights/workspace/main.bicep +++ b/modules/operational-insights/workspace/main.bicep @@ -92,7 +92,7 @@ param lock lockType param roleAssignments roleAssignmentType @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true diff --git a/modules/operational-insights/workspace/main.json b/modules/operational-insights/workspace/main.json index 19df45d446..cce483eb5c 100644 --- a/modules/operational-insights/workspace/main.json +++ b/modules/operational-insights/workspace/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "12796424281221754385" + "templateHash": "1028542190363116097" }, "name": "Log Analytics Workspaces", "description": "This module deploys a Log Analytics Workspace.", @@ -409,7 +409,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } @@ -567,12 +567,13 @@ }, "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "6643427484780531502" + "templateHash": "13014071648331654478" }, "name": "Log Analytics Workspace Storage Insight Configs", "description": "This module deploys a Log Analytics Workspace Storage Insight Config.", @@ -614,7 +615,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags to configure in the resource." } @@ -627,8 +628,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -642,7 +643,19 @@ } } }, - { + "storageAccount": { + "existing": true, + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2022-09-01", + "name": "[last(split(parameters('storageAccountResourceId'), '/'))]" + }, + "workspace": { + "existing": true, + "type": "Microsoft.OperationalInsights/workspaces", + "apiVersion": "2022-10-01", + "name": "[parameters('logAnalyticsWorkspaceName')]" + }, + "storageinsightconfig": { "type": "Microsoft.OperationalInsights/workspaces/storageInsightConfigs", "apiVersion": "2020-08-01", "name": "[format('{0}/{1}', parameters('logAnalyticsWorkspaceName'), parameters('name'))]", @@ -654,9 +667,13 @@ "id": "[parameters('storageAccountResourceId')]", "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', last(split(parameters('storageAccountResourceId'), '/'))), '2022-09-01').keys[0].value]" } - } + }, + "dependsOn": [ + "storageAccount", + "workspace" + ] } - ], + }, "outputs": { "resourceId": { "type": "string", @@ -714,12 +731,13 @@ }, "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "15022791045507209174" + "templateHash": "9970744617970664745" }, "name": "Log Analytics Workspace Linked Services", "description": "This module deploys a Log Analytics Workspace Linked Service.", @@ -754,7 +772,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags to configure in the resource." } @@ -767,8 +785,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -782,7 +800,13 @@ } } }, - { + "workspace": { + "existing": true, + "type": "Microsoft.OperationalInsights/workspaces", + "apiVersion": "2022-10-01", + "name": "[parameters('logAnalyticsWorkspaceName')]" + }, + "linkedService": { "type": "Microsoft.OperationalInsights/workspaces/linkedServices", "apiVersion": "2020-08-01", "name": "[format('{0}/{1}', parameters('logAnalyticsWorkspaceName'), parameters('name'))]", @@ -790,9 +814,12 @@ "properties": { "resourceId": "[parameters('resourceId')]", "writeAccessResourceId": "[if(empty(parameters('writeAccessResourceId')), null(), parameters('writeAccessResourceId'))]" - } + }, + "dependsOn": [ + "workspace" + ] } - ], + }, "outputs": { "name": { "type": "string", @@ -1314,12 +1341,13 @@ }, "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "7994060758159745935" + "templateHash": "13903182753870680383" }, "name": "Log Analytics Workspace Datasources", "description": "This module deploys a Log Analytics Workspace Data Source.", @@ -1357,7 +1385,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags to configure in the resource." } @@ -1447,8 +1475,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -1462,7 +1490,13 @@ } } }, - { + "workspace": { + "existing": true, + "type": "Microsoft.OperationalInsights/workspaces", + "apiVersion": "2022-10-01", + "name": "[parameters('logAnalyticsWorkspaceName')]" + }, + "dataSource": { "type": "Microsoft.OperationalInsights/workspaces/dataSources", "apiVersion": "2020-08-01", "name": "[format('{0}/{1}', parameters('logAnalyticsWorkspaceName'), parameters('name'))]", @@ -1480,9 +1514,12 @@ "syslogName": "[if(and(not(empty(parameters('kind'))), equals(parameters('kind'), 'LinuxSyslog')), parameters('syslogName'), null())]", "syslogSeverities": "[if(and(not(empty(parameters('kind'))), or(equals(parameters('kind'), 'LinuxSyslog'), equals(parameters('kind'), 'LinuxPerformanceObject'))), parameters('syslogSeverities'), null())]", "performanceCounters": "[if(and(not(empty(parameters('kind'))), equals(parameters('kind'), 'LinuxPerformanceObject')), parameters('performanceCounters'), null())]" - } + }, + "dependsOn": [ + "workspace" + ] } - ], + }, "outputs": { "resourceId": { "type": "string", diff --git a/modules/operational-insights/workspace/storage-insight-config/README.md b/modules/operational-insights/workspace/storage-insight-config/README.md index 4d77ca61f1..1e589388ee 100644 --- a/modules/operational-insights/workspace/storage-insight-config/README.md +++ b/modules/operational-insights/workspace/storage-insight-config/README.md @@ -84,7 +84,6 @@ The names of the Azure tables that the workspace should read. Tags to configure in the resource. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/operational-insights/workspace/storage-insight-config/main.bicep b/modules/operational-insights/workspace/storage-insight-config/main.bicep index 7e5d85c362..5e6a2d236f 100644 --- a/modules/operational-insights/workspace/storage-insight-config/main.bicep +++ b/modules/operational-insights/workspace/storage-insight-config/main.bicep @@ -18,7 +18,7 @@ param containers array = [] param tables array = [] @description('Optional. Tags to configure in the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true diff --git a/modules/operational-insights/workspace/storage-insight-config/main.json b/modules/operational-insights/workspace/storage-insight-config/main.json index d5e4378634..d3b44b1f6d 100644 --- a/modules/operational-insights/workspace/storage-insight-config/main.json +++ b/modules/operational-insights/workspace/storage-insight-config/main.json @@ -1,11 +1,12 @@ { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "6643427484780531502" + "templateHash": "13014071648331654478" }, "name": "Log Analytics Workspace Storage Insight Configs", "description": "This module deploys a Log Analytics Workspace Storage Insight Config.", @@ -47,7 +48,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags to configure in the resource." } @@ -60,8 +61,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -75,7 +76,19 @@ } } }, - { + "storageAccount": { + "existing": true, + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2022-09-01", + "name": "[last(split(parameters('storageAccountResourceId'), '/'))]" + }, + "workspace": { + "existing": true, + "type": "Microsoft.OperationalInsights/workspaces", + "apiVersion": "2022-10-01", + "name": "[parameters('logAnalyticsWorkspaceName')]" + }, + "storageinsightconfig": { "type": "Microsoft.OperationalInsights/workspaces/storageInsightConfigs", "apiVersion": "2020-08-01", "name": "[format('{0}/{1}', parameters('logAnalyticsWorkspaceName'), parameters('name'))]", @@ -87,9 +100,13 @@ "id": "[parameters('storageAccountResourceId')]", "key": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', last(split(parameters('storageAccountResourceId'), '/'))), '2022-09-01').keys[0].value]" } - } + }, + "dependsOn": [ + "storageAccount", + "workspace" + ] } - ], + }, "outputs": { "resourceId": { "type": "string", diff --git a/modules/power-bi-dedicated/capacity/README.md b/modules/power-bi-dedicated/capacity/README.md index 20ee5d05cf..b014f55a63 100644 --- a/modules/power-bi-dedicated/capacity/README.md +++ b/modules/power-bi-dedicated/capacity/README.md @@ -367,7 +367,6 @@ SkuCapacity of the resource. Tags of the resource. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/power-bi-dedicated/capacity/main.bicep b/modules/power-bi-dedicated/capacity/main.bicep index 2628ce35b9..d9124fb750 100644 --- a/modules/power-bi-dedicated/capacity/main.bicep +++ b/modules/power-bi-dedicated/capacity/main.bicep @@ -12,7 +12,7 @@ param location string = resourceGroup().location param enableDefaultTelemetry bool = true @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Required. SkuCapacity of the resource.') param skuCapacity int diff --git a/modules/power-bi-dedicated/capacity/main.json b/modules/power-bi-dedicated/capacity/main.json index d99608fce2..70c6e02ca8 100644 --- a/modules/power-bi-dedicated/capacity/main.json +++ b/modules/power-bi-dedicated/capacity/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "14932984418951732668" + "templateHash": "5834334564189406991" }, "name": "Power BI Dedicated Capacities", "description": "This module deploys a Power BI Dedicated Capacity.", @@ -128,7 +128,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/purview/account/README.md b/modules/purview/account/README.md index 152f7ba851..005541e314 100644 --- a/modules/purview/account/README.md +++ b/modules/purview/account/README.md @@ -705,7 +705,6 @@ Configuration details for Purview Managed Storage Account queue private endpoint Tags of the resource. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/purview/account/main.bicep b/modules/purview/account/main.bicep index 8410915c30..ee9cf3a810 100644 --- a/modules/purview/account/main.bicep +++ b/modules/purview/account/main.bicep @@ -11,7 +11,7 @@ param name string param location string = resourceGroup().location @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. The managed identity definition for this resource.') param managedIdentities managedIdentitiesType @@ -149,7 +149,7 @@ module account_privateEndpoints '../../network/private-endpoint/main.bicep' = [f privateDnsZoneGroupName: contains(privateEndpoint, 'privateDnsZoneGroupName') ? privateEndpoint.privateDnsZoneGroupName : 'default' privateDnsZoneResourceIds: contains(privateEndpoint, 'privateDnsZoneResourceIds') ? privateEndpoint.privateDnsZoneResourceIds : [] roleAssignments: contains(privateEndpoint, 'roleAssignments') ? privateEndpoint.roleAssignments : [] - tags: contains(privateEndpoint, 'tags') ? privateEndpoint.tags : {} + tags: privateEndpoint.?tags ?? tags manualPrivateLinkServiceConnections: contains(privateEndpoint, 'manualPrivateLinkServiceConnections') ? privateEndpoint.manualPrivateLinkServiceConnections : [] customDnsConfigs: contains(privateEndpoint, 'customDnsConfigs') ? privateEndpoint.customDnsConfigs : [] ipConfigurations: contains(privateEndpoint, 'ipConfigurations') ? privateEndpoint.ipConfigurations : [] @@ -173,7 +173,7 @@ module portal_privateEndpoints '../../network/private-endpoint/main.bicep' = [fo privateDnsZoneGroupName: contains(privateEndpoint, 'privateDnsZoneGroupName') ? privateEndpoint.privateDnsZoneGroupName : 'default' privateDnsZoneResourceIds: contains(privateEndpoint, 'privateDnsZoneResourceIds') ? privateEndpoint.privateDnsZoneResourceIds : [] roleAssignments: contains(privateEndpoint, 'roleAssignments') ? privateEndpoint.roleAssignments : [] - tags: contains(privateEndpoint, 'tags') ? privateEndpoint.tags : {} + tags: privateEndpoint.?tags ?? tags manualPrivateLinkServiceConnections: contains(privateEndpoint, 'manualPrivateLinkServiceConnections') ? privateEndpoint.manualPrivateLinkServiceConnections : [] customDnsConfigs: contains(privateEndpoint, 'customDnsConfigs') ? privateEndpoint.customDnsConfigs : [] ipConfigurations: contains(privateEndpoint, 'ipConfigurations') ? privateEndpoint.ipConfigurations : [] @@ -197,7 +197,7 @@ module blob_privateEndpoints '../../network/private-endpoint/main.bicep' = [for privateDnsZoneGroupName: contains(privateEndpoint, 'privateDnsZoneGroupName') ? privateEndpoint.privateDnsZoneGroupName : 'default' privateDnsZoneResourceIds: contains(privateEndpoint, 'privateDnsZoneResourceIds') ? privateEndpoint.privateDnsZoneResourceIds : [] roleAssignments: contains(privateEndpoint, 'roleAssignments') ? privateEndpoint.roleAssignments : [] - tags: contains(privateEndpoint, 'tags') ? privateEndpoint.tags : {} + tags: privateEndpoint.?tags ?? tags manualPrivateLinkServiceConnections: contains(privateEndpoint, 'manualPrivateLinkServiceConnections') ? privateEndpoint.manualPrivateLinkServiceConnections : [] customDnsConfigs: contains(privateEndpoint, 'customDnsConfigs') ? privateEndpoint.customDnsConfigs : [] ipConfigurations: contains(privateEndpoint, 'ipConfigurations') ? privateEndpoint.ipConfigurations : [] @@ -221,7 +221,7 @@ module queue_privateEndpoints '../../network/private-endpoint/main.bicep' = [for privateDnsZoneGroupName: contains(privateEndpoint, 'privateDnsZoneGroupName') ? privateEndpoint.privateDnsZoneGroupName : 'default' privateDnsZoneResourceIds: contains(privateEndpoint, 'privateDnsZoneResourceIds') ? privateEndpoint.privateDnsZoneResourceIds : [] roleAssignments: contains(privateEndpoint, 'roleAssignments') ? privateEndpoint.roleAssignments : [] - tags: contains(privateEndpoint, 'tags') ? privateEndpoint.tags : {} + tags: privateEndpoint.?tags ?? tags manualPrivateLinkServiceConnections: contains(privateEndpoint, 'manualPrivateLinkServiceConnections') ? privateEndpoint.manualPrivateLinkServiceConnections : [] customDnsConfigs: contains(privateEndpoint, 'customDnsConfigs') ? privateEndpoint.customDnsConfigs : [] ipConfigurations: contains(privateEndpoint, 'ipConfigurations') ? privateEndpoint.ipConfigurations : [] @@ -245,7 +245,7 @@ module eventHub_privateEndpoints '../../network/private-endpoint/main.bicep' = [ privateDnsZoneGroupName: contains(privateEndpoint, 'privateDnsZoneGroupName') ? privateEndpoint.privateDnsZoneGroupName : 'default' privateDnsZoneResourceIds: contains(privateEndpoint, 'privateDnsZoneResourceIds') ? privateEndpoint.privateDnsZoneResourceIds : [] roleAssignments: contains(privateEndpoint, 'roleAssignments') ? privateEndpoint.roleAssignments : [] - tags: contains(privateEndpoint, 'tags') ? privateEndpoint.tags : {} + tags: privateEndpoint.?tags ?? tags manualPrivateLinkServiceConnections: contains(privateEndpoint, 'manualPrivateLinkServiceConnections') ? privateEndpoint.manualPrivateLinkServiceConnections : [] customDnsConfigs: contains(privateEndpoint, 'customDnsConfigs') ? privateEndpoint.customDnsConfigs : [] ipConfigurations: contains(privateEndpoint, 'ipConfigurations') ? privateEndpoint.ipConfigurations : [] diff --git a/modules/purview/account/main.json b/modules/purview/account/main.json index 47a49e254a..52549f6f1f 100644 --- a/modules/purview/account/main.json +++ b/modules/purview/account/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "18408981482699771035" + "templateHash": "1750298366145145282" }, "name": "Purview Accounts", "description": "This module deploys a Purview Account.", @@ -244,7 +244,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } @@ -475,7 +475,9 @@ "privateDnsZoneGroupName": "[if(contains(parameters('accountPrivateEndpoints')[copyIndex()], 'privateDnsZoneGroupName'), createObject('value', parameters('accountPrivateEndpoints')[copyIndex()].privateDnsZoneGroupName), createObject('value', 'default'))]", "privateDnsZoneResourceIds": "[if(contains(parameters('accountPrivateEndpoints')[copyIndex()], 'privateDnsZoneResourceIds'), createObject('value', parameters('accountPrivateEndpoints')[copyIndex()].privateDnsZoneResourceIds), createObject('value', createArray()))]", "roleAssignments": "[if(contains(parameters('accountPrivateEndpoints')[copyIndex()], 'roleAssignments'), createObject('value', parameters('accountPrivateEndpoints')[copyIndex()].roleAssignments), createObject('value', createArray()))]", - "tags": "[if(contains(parameters('accountPrivateEndpoints')[copyIndex()], 'tags'), createObject('value', parameters('accountPrivateEndpoints')[copyIndex()].tags), createObject('value', createObject()))]", + "tags": { + "value": "[coalesce(tryGet(parameters('accountPrivateEndpoints')[copyIndex()], 'tags'), parameters('tags'))]" + }, "manualPrivateLinkServiceConnections": "[if(contains(parameters('accountPrivateEndpoints')[copyIndex()], 'manualPrivateLinkServiceConnections'), createObject('value', parameters('accountPrivateEndpoints')[copyIndex()].manualPrivateLinkServiceConnections), createObject('value', createArray()))]", "customDnsConfigs": "[if(contains(parameters('accountPrivateEndpoints')[copyIndex()], 'customDnsConfigs'), createObject('value', parameters('accountPrivateEndpoints')[copyIndex()].customDnsConfigs), createObject('value', createArray()))]", "ipConfigurations": "[if(contains(parameters('accountPrivateEndpoints')[copyIndex()], 'ipConfigurations'), createObject('value', parameters('accountPrivateEndpoints')[copyIndex()].ipConfigurations), createObject('value', createArray()))]", @@ -1006,7 +1008,9 @@ "privateDnsZoneGroupName": "[if(contains(parameters('portalPrivateEndpoints')[copyIndex()], 'privateDnsZoneGroupName'), createObject('value', parameters('portalPrivateEndpoints')[copyIndex()].privateDnsZoneGroupName), createObject('value', 'default'))]", "privateDnsZoneResourceIds": "[if(contains(parameters('portalPrivateEndpoints')[copyIndex()], 'privateDnsZoneResourceIds'), createObject('value', parameters('portalPrivateEndpoints')[copyIndex()].privateDnsZoneResourceIds), createObject('value', createArray()))]", "roleAssignments": "[if(contains(parameters('portalPrivateEndpoints')[copyIndex()], 'roleAssignments'), createObject('value', parameters('portalPrivateEndpoints')[copyIndex()].roleAssignments), createObject('value', createArray()))]", - "tags": "[if(contains(parameters('portalPrivateEndpoints')[copyIndex()], 'tags'), createObject('value', parameters('portalPrivateEndpoints')[copyIndex()].tags), createObject('value', createObject()))]", + "tags": { + "value": "[coalesce(tryGet(parameters('portalPrivateEndpoints')[copyIndex()], 'tags'), parameters('tags'))]" + }, "manualPrivateLinkServiceConnections": "[if(contains(parameters('portalPrivateEndpoints')[copyIndex()], 'manualPrivateLinkServiceConnections'), createObject('value', parameters('portalPrivateEndpoints')[copyIndex()].manualPrivateLinkServiceConnections), createObject('value', createArray()))]", "customDnsConfigs": "[if(contains(parameters('portalPrivateEndpoints')[copyIndex()], 'customDnsConfigs'), createObject('value', parameters('portalPrivateEndpoints')[copyIndex()].customDnsConfigs), createObject('value', createArray()))]", "ipConfigurations": "[if(contains(parameters('portalPrivateEndpoints')[copyIndex()], 'ipConfigurations'), createObject('value', parameters('portalPrivateEndpoints')[copyIndex()].ipConfigurations), createObject('value', createArray()))]", @@ -1537,7 +1541,9 @@ "privateDnsZoneGroupName": "[if(contains(parameters('storageBlobPrivateEndpoints')[copyIndex()], 'privateDnsZoneGroupName'), createObject('value', parameters('storageBlobPrivateEndpoints')[copyIndex()].privateDnsZoneGroupName), createObject('value', 'default'))]", "privateDnsZoneResourceIds": "[if(contains(parameters('storageBlobPrivateEndpoints')[copyIndex()], 'privateDnsZoneResourceIds'), createObject('value', parameters('storageBlobPrivateEndpoints')[copyIndex()].privateDnsZoneResourceIds), createObject('value', createArray()))]", "roleAssignments": "[if(contains(parameters('storageBlobPrivateEndpoints')[copyIndex()], 'roleAssignments'), createObject('value', parameters('storageBlobPrivateEndpoints')[copyIndex()].roleAssignments), createObject('value', createArray()))]", - "tags": "[if(contains(parameters('storageBlobPrivateEndpoints')[copyIndex()], 'tags'), createObject('value', parameters('storageBlobPrivateEndpoints')[copyIndex()].tags), createObject('value', createObject()))]", + "tags": { + "value": "[coalesce(tryGet(parameters('storageBlobPrivateEndpoints')[copyIndex()], 'tags'), parameters('tags'))]" + }, "manualPrivateLinkServiceConnections": "[if(contains(parameters('storageBlobPrivateEndpoints')[copyIndex()], 'manualPrivateLinkServiceConnections'), createObject('value', parameters('storageBlobPrivateEndpoints')[copyIndex()].manualPrivateLinkServiceConnections), createObject('value', createArray()))]", "customDnsConfigs": "[if(contains(parameters('storageBlobPrivateEndpoints')[copyIndex()], 'customDnsConfigs'), createObject('value', parameters('storageBlobPrivateEndpoints')[copyIndex()].customDnsConfigs), createObject('value', createArray()))]", "ipConfigurations": "[if(contains(parameters('storageBlobPrivateEndpoints')[copyIndex()], 'ipConfigurations'), createObject('value', parameters('storageBlobPrivateEndpoints')[copyIndex()].ipConfigurations), createObject('value', createArray()))]", @@ -2068,7 +2074,9 @@ "privateDnsZoneGroupName": "[if(contains(parameters('storageQueuePrivateEndpoints')[copyIndex()], 'privateDnsZoneGroupName'), createObject('value', parameters('storageQueuePrivateEndpoints')[copyIndex()].privateDnsZoneGroupName), createObject('value', 'default'))]", "privateDnsZoneResourceIds": "[if(contains(parameters('storageQueuePrivateEndpoints')[copyIndex()], 'privateDnsZoneResourceIds'), createObject('value', parameters('storageQueuePrivateEndpoints')[copyIndex()].privateDnsZoneResourceIds), createObject('value', createArray()))]", "roleAssignments": "[if(contains(parameters('storageQueuePrivateEndpoints')[copyIndex()], 'roleAssignments'), createObject('value', parameters('storageQueuePrivateEndpoints')[copyIndex()].roleAssignments), createObject('value', createArray()))]", - "tags": "[if(contains(parameters('storageQueuePrivateEndpoints')[copyIndex()], 'tags'), createObject('value', parameters('storageQueuePrivateEndpoints')[copyIndex()].tags), createObject('value', createObject()))]", + "tags": { + "value": "[coalesce(tryGet(parameters('storageQueuePrivateEndpoints')[copyIndex()], 'tags'), parameters('tags'))]" + }, "manualPrivateLinkServiceConnections": "[if(contains(parameters('storageQueuePrivateEndpoints')[copyIndex()], 'manualPrivateLinkServiceConnections'), createObject('value', parameters('storageQueuePrivateEndpoints')[copyIndex()].manualPrivateLinkServiceConnections), createObject('value', createArray()))]", "customDnsConfigs": "[if(contains(parameters('storageQueuePrivateEndpoints')[copyIndex()], 'customDnsConfigs'), createObject('value', parameters('storageQueuePrivateEndpoints')[copyIndex()].customDnsConfigs), createObject('value', createArray()))]", "ipConfigurations": "[if(contains(parameters('storageQueuePrivateEndpoints')[copyIndex()], 'ipConfigurations'), createObject('value', parameters('storageQueuePrivateEndpoints')[copyIndex()].ipConfigurations), createObject('value', createArray()))]", @@ -2599,7 +2607,9 @@ "privateDnsZoneGroupName": "[if(contains(parameters('eventHubPrivateEndpoints')[copyIndex()], 'privateDnsZoneGroupName'), createObject('value', parameters('eventHubPrivateEndpoints')[copyIndex()].privateDnsZoneGroupName), createObject('value', 'default'))]", "privateDnsZoneResourceIds": "[if(contains(parameters('eventHubPrivateEndpoints')[copyIndex()], 'privateDnsZoneResourceIds'), createObject('value', parameters('eventHubPrivateEndpoints')[copyIndex()].privateDnsZoneResourceIds), createObject('value', createArray()))]", "roleAssignments": "[if(contains(parameters('eventHubPrivateEndpoints')[copyIndex()], 'roleAssignments'), createObject('value', parameters('eventHubPrivateEndpoints')[copyIndex()].roleAssignments), createObject('value', createArray()))]", - "tags": "[if(contains(parameters('eventHubPrivateEndpoints')[copyIndex()], 'tags'), createObject('value', parameters('eventHubPrivateEndpoints')[copyIndex()].tags), createObject('value', createObject()))]", + "tags": { + "value": "[coalesce(tryGet(parameters('eventHubPrivateEndpoints')[copyIndex()], 'tags'), parameters('tags'))]" + }, "manualPrivateLinkServiceConnections": "[if(contains(parameters('eventHubPrivateEndpoints')[copyIndex()], 'manualPrivateLinkServiceConnections'), createObject('value', parameters('eventHubPrivateEndpoints')[copyIndex()].manualPrivateLinkServiceConnections), createObject('value', createArray()))]", "customDnsConfigs": "[if(contains(parameters('eventHubPrivateEndpoints')[copyIndex()], 'customDnsConfigs'), createObject('value', parameters('eventHubPrivateEndpoints')[copyIndex()].customDnsConfigs), createObject('value', createArray()))]", "ipConfigurations": "[if(contains(parameters('eventHubPrivateEndpoints')[copyIndex()], 'ipConfigurations'), createObject('value', parameters('eventHubPrivateEndpoints')[copyIndex()].ipConfigurations), createObject('value', createArray()))]", diff --git a/modules/recovery-services/vault/README.md b/modules/recovery-services/vault/README.md index 5258daf120..3d02aec005 100644 --- a/modules/recovery-services/vault/README.md +++ b/modules/recovery-services/vault/README.md @@ -1480,7 +1480,6 @@ Security Settings of the vault. Tags of the Recovery Service Vault resource. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/recovery-services/vault/main.bicep b/modules/recovery-services/vault/main.bicep index 623b3ddad7..16168ce0ba 100644 --- a/modules/recovery-services/vault/main.bicep +++ b/modules/recovery-services/vault/main.bicep @@ -48,7 +48,7 @@ param lock lockType param managedIdentities managedIdentitiesType @description('Optional. Tags of the Recovery Service Vault resource.') -param tags object = {} +param tags object? @description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.') param privateEndpoints privateEndpointType diff --git a/modules/recovery-services/vault/main.json b/modules/recovery-services/vault/main.json index db634c5922..a2d52cb3e7 100644 --- a/modules/recovery-services/vault/main.json +++ b/modules/recovery-services/vault/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "18413268993568593224" + "templateHash": "17885378476178029351" }, "name": "Recovery Services Vaults", "description": "This module deploys a Recovery Services Vault.", @@ -482,7 +482,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the Recovery Service Vault resource." } diff --git a/modules/relay/namespace/README.md b/modules/relay/namespace/README.md index 83d2b108d5..8bec8c2e9e 100644 --- a/modules/relay/namespace/README.md +++ b/modules/relay/namespace/README.md @@ -922,7 +922,6 @@ Name of this SKU. Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `wcfRelays` diff --git a/modules/relay/namespace/main.bicep b/modules/relay/namespace/main.bicep index e05491e6b0..301d7d956d 100644 --- a/modules/relay/namespace/main.bicep +++ b/modules/relay/namespace/main.bicep @@ -44,7 +44,7 @@ param privateEndpoints privateEndpointType param networkRuleSets object = {} @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true diff --git a/modules/relay/namespace/main.json b/modules/relay/namespace/main.json index 086bffddff..8fbf5d13f5 100644 --- a/modules/relay/namespace/main.json +++ b/modules/relay/namespace/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "14407783319631235509" + "templateHash": "17919201326260317269" }, "name": "Relay Namespaces", "description": "This module deploys a Relay Namespace", @@ -435,7 +435,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/resource-graph/query/README.md b/modules/resource-graph/query/README.md index cf85d54dc9..d471c82a90 100644 --- a/modules/resource-graph/query/README.md +++ b/modules/resource-graph/query/README.md @@ -329,7 +329,6 @@ Required. The name of the role to assign. If it cannot be found you can specify Tags of the resource. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/resource-graph/query/main.bicep b/modules/resource-graph/query/main.bicep index 74e28c0da7..4cceeecad1 100644 --- a/modules/resource-graph/query/main.bicep +++ b/modules/resource-graph/query/main.bicep @@ -15,7 +15,7 @@ param lock lockType param roleAssignments roleAssignmentType @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true diff --git a/modules/resource-graph/query/main.json b/modules/resource-graph/query/main.json index a23a1f4fb6..a14e8eb9f3 100644 --- a/modules/resource-graph/query/main.json +++ b/modules/resource-graph/query/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "9628193183606818689" + "templateHash": "4571822405516608040" }, "name": "Resource Graph Queries", "description": "This module deploys a Resource Graph Query.", @@ -133,7 +133,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/resources/deployment-script/README.md b/modules/resources/deployment-script/README.md index 2d19703a31..4623399942 100644 --- a/modules/resources/deployment-script/README.md +++ b/modules/resources/deployment-script/README.md @@ -475,7 +475,6 @@ List of supporting files for the external script (defined in primaryScriptUri). Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `timeout` diff --git a/modules/resources/deployment-script/main.bicep b/modules/resources/deployment-script/main.bicep index 4e1f4c7062..9ef0aa5700 100644 --- a/modules/resources/deployment-script/main.bicep +++ b/modules/resources/deployment-script/main.bicep @@ -70,7 +70,7 @@ param baseTime string = utcNow('yyyy-MM-dd-HH-mm-ss') param lock lockType @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true diff --git a/modules/resources/deployment-script/main.json b/modules/resources/deployment-script/main.json index d2af767dcd..920ea4b51e 100644 --- a/modules/resources/deployment-script/main.json +++ b/modules/resources/deployment-script/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "10287022408270224079" + "templateHash": "5648029581364828548" }, "name": "Deployment Scripts", "description": "This module deploys a Deployment Script.", @@ -196,7 +196,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/resources/resource-group/README.md b/modules/resources/resource-group/README.md index 71e3445bf0..ed5414c1bc 100644 --- a/modules/resources/resource-group/README.md +++ b/modules/resources/resource-group/README.md @@ -310,7 +310,6 @@ Required. The name of the role to assign. If it cannot be found you can specify Tags of the storage account resource. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/resources/resource-group/main.bicep b/modules/resources/resource-group/main.bicep index 5818b3143b..0c6c874c06 100644 --- a/modules/resources/resource-group/main.bicep +++ b/modules/resources/resource-group/main.bicep @@ -17,7 +17,7 @@ param lock lockType param roleAssignments roleAssignmentType @description('Optional. Tags of the storage account resource.') -param tags object = {} +param tags object? @description('Optional. The ID of the resource that manages this resource group.') param managedBy string = '' diff --git a/modules/resources/resource-group/main.json b/modules/resources/resource-group/main.json index 58106d57bc..5ef95ffd33 100644 --- a/modules/resources/resource-group/main.json +++ b/modules/resources/resource-group/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "8742176141262908442" + "templateHash": "3152878379095233308" }, "name": "Resource Groups", "description": "This module deploys a Resource Group.", @@ -133,7 +133,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the storage account resource." } diff --git a/modules/resources/tags/README.md b/modules/resources/tags/README.md index 9135bfb176..c65be02ed4 100644 --- a/modules/resources/tags/README.md +++ b/modules/resources/tags/README.md @@ -232,7 +232,6 @@ Subscription ID of the subscription to assign the tags to. If no Resource Group Tags for the resource group. If not provided, removes existing tags. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/resources/tags/main.bicep b/modules/resources/tags/main.bicep index 83234e59f5..3d3abf0ce7 100644 --- a/modules/resources/tags/main.bicep +++ b/modules/resources/tags/main.bicep @@ -5,7 +5,7 @@ metadata owner = 'Azure/module-maintainers' targetScope = 'subscription' @description('Optional. Tags for the resource group. If not provided, removes existing tags.') -param tags object = {} +param tags object? @description('Optional. Instead of overwriting the existing tags, combine them with the new tags.') param onlyUpdate bool = false diff --git a/modules/resources/tags/main.json b/modules/resources/tags/main.json index 85a73c4674..1e82fc6871 100644 --- a/modules/resources/tags/main.json +++ b/modules/resources/tags/main.json @@ -1,11 +1,12 @@ { "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "17959459334247355830" + "templateHash": "17437787787716832327" }, "name": "Resources Tags", "description": "This module deploys a Resource Tag at a Subscription or Resource Group scope.", @@ -14,7 +15,7 @@ "parameters": { "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags for the resource group. If not provided, removes existing tags." } @@ -58,8 +59,8 @@ "variables": { "enableReferencedModulesTelemetry": false }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -74,7 +75,7 @@ } } }, - { + "tags_sub": { "condition": "[and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName')))]", "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", @@ -101,12 +102,13 @@ }, "template": { "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "17975356792950377604" + "templateHash": "6739306478169191405" }, "name": "Resources Tags Subscription Scope", "description": "This module deploys a Resource Tag on a Subscription scope.", @@ -115,7 +117,7 @@ "parameters": { "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags for the resource group. If not provided, removes existing tags." } @@ -142,8 +144,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -158,18 +160,18 @@ } } }, - { + "tag": { "type": "Microsoft.Resources/tags", "apiVersion": "2021-04-01", "name": "default", "properties": { - "tags": "[if(parameters('onlyUpdate'), union(reference(subscriptionResourceId('Microsoft.Resources/deployments', format('{0}-ReadTags', deployment().name)), '2022-09-01').outputs.existingTags.value, parameters('tags')), parameters('tags'))]" + "tags": "[if(parameters('onlyUpdate'), union(reference('readTags').outputs.existingTags.value, coalesce(parameters('tags'), createObject())), parameters('tags'))]" }, "dependsOn": [ - "[subscriptionResourceId('Microsoft.Resources/deployments', format('{0}-ReadTags', deployment().name))]" + "readTags" ] }, - { + "readTags": { "condition": "[parameters('onlyUpdate')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", @@ -187,7 +189,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "18269006446765776342" + "templateHash": "9833962804635676625" } }, "parameters": { @@ -206,13 +208,13 @@ "metadata": { "description": "Tags currently applied to the subscription level." }, - "value": "[if(contains(reference(subscriptionResourceId('Microsoft.Resources/tags', parameters('name')), '2021-04-01'), 'tags'), reference(subscriptionResourceId('Microsoft.Resources/tags', parameters('name')), '2021-04-01').tags, createObject())]" + "value": "[coalesce(tryGet(reference(subscriptionResourceId('Microsoft.Resources/tags', parameters('name')), '2021-04-01'), 'tags'), reference(subscriptionResourceId('Microsoft.Resources/tags', parameters('name')), '2021-04-01', 'full'))]" } } } } } - ], + }, "outputs": { "name": { "type": "string", @@ -226,7 +228,7 @@ "metadata": { "description": "The applied tags." }, - "value": "[if(parameters('onlyUpdate'), union(reference(subscriptionResourceId('Microsoft.Resources/deployments', format('{0}-ReadTags', deployment().name)), '2022-09-01').outputs.existingTags.value, parameters('tags')), parameters('tags'))]" + "value": "[coalesce(if(parameters('onlyUpdate'), union(reference('readTags').outputs.existingTags.value, coalesce(parameters('tags'), createObject())), parameters('tags')), createObject())]" }, "resourceId": { "type": "string", @@ -239,7 +241,7 @@ } } }, - { + "tags_rg": { "condition": "[and(not(empty(parameters('resourceGroupName'))), not(empty(parameters('subscriptionId'))))]", "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", @@ -263,12 +265,13 @@ }, "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "8701740381622545052" + "templateHash": "15660323099140717252" }, "name": "Resources Tags Resource Group", "description": "This module deploys a Resource Tag on a Resource Group scope.", @@ -277,7 +280,7 @@ "parameters": { "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags for the resource group. If not provided, removes existing tags." } @@ -297,8 +300,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -312,18 +315,18 @@ } } }, - { + "tag": { "type": "Microsoft.Resources/tags", "apiVersion": "2021-04-01", "name": "default", "properties": { - "tags": "[if(parameters('onlyUpdate'), union(reference(resourceId('Microsoft.Resources/deployments', format('{0}-ReadTags', deployment().name)), '2022-09-01').outputs.existingTags.value, parameters('tags')), parameters('tags'))]" + "tags": "[if(parameters('onlyUpdate'), union(reference('readTags').outputs.existingTags.value, coalesce(parameters('tags'), createObject())), parameters('tags'))]" }, "dependsOn": [ - "[resourceId('Microsoft.Resources/deployments', format('{0}-ReadTags', deployment().name))]" + "readTags" ] }, - { + "readTags": { "condition": "[parameters('onlyUpdate')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", @@ -340,7 +343,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "8737749583083645128" + "templateHash": "4088100020210156530" } }, "parameters": { @@ -359,13 +362,13 @@ "metadata": { "description": "Tags currently applied to the subscription level." }, - "value": "[if(contains(reference(resourceId('Microsoft.Resources/tags', parameters('name')), '2019-10-01'), 'tags'), reference(resourceId('Microsoft.Resources/tags', parameters('name')), '2019-10-01').tags, createObject())]" + "value": "[coalesce(tryGet(reference(resourceId('Microsoft.Resources/tags', parameters('name')), '2019-10-01'), 'tags'), createObject())]" } } } } } - ], + }, "outputs": { "name": { "type": "string", @@ -393,34 +396,34 @@ "metadata": { "description": "The applied tags." }, - "value": "[if(parameters('onlyUpdate'), union(reference(resourceId('Microsoft.Resources/deployments', format('{0}-ReadTags', deployment().name)), '2022-09-01').outputs.existingTags.value, parameters('tags')), parameters('tags'))]" + "value": "[reference('tag').tags]" } } } } } - ], + }, "outputs": { "name": { "type": "string", "metadata": { "description": "The name of the tags resource." }, - "value": "[if(and(not(empty(parameters('resourceGroupName'))), not(empty(parameters('subscriptionId')))), reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-Tags-RG', deployment().name)), '2022-09-01').outputs.name.value, reference(subscriptionResourceId('Microsoft.Resources/deployments', format('{0}-Tags-Sub', deployment().name)), '2022-09-01').outputs.name.value)]" + "value": "[if(and(not(empty(parameters('resourceGroupName'))), not(empty(parameters('subscriptionId')))), reference('tags_rg').outputs.name.value, reference('tags_sub').outputs.name.value)]" }, "tags": { "type": "object", "metadata": { "description": "The applied tags." }, - "value": "[if(and(not(empty(parameters('resourceGroupName'))), not(empty(parameters('subscriptionId')))), reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-Tags-RG', deployment().name)), '2022-09-01').outputs.tags.value, reference(subscriptionResourceId('Microsoft.Resources/deployments', format('{0}-Tags-Sub', deployment().name)), '2022-09-01').outputs.tags.value)]" + "value": "[if(and(not(empty(parameters('resourceGroupName'))), not(empty(parameters('subscriptionId')))), reference('tags_rg').outputs.tags.value, reference('tags_sub').outputs.tags.value)]" }, "resourceId": { "type": "string", "metadata": { "description": "The resource ID of the applied tags." }, - "value": "[if(and(not(empty(parameters('resourceGroupName'))), not(empty(parameters('subscriptionId')))), reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-Tags-RG', deployment().name)), '2022-09-01').outputs.resourceId.value, reference(subscriptionResourceId('Microsoft.Resources/deployments', format('{0}-Tags-Sub', deployment().name)), '2022-09-01').outputs.resourceId.value)]" + "value": "[if(and(not(empty(parameters('resourceGroupName'))), not(empty(parameters('subscriptionId')))), reference('tags_rg').outputs.resourceId.value, reference('tags_sub').outputs.resourceId.value)]" } } } \ No newline at end of file diff --git a/modules/resources/tags/resource-group/.bicep/readTags.bicep b/modules/resources/tags/resource-group/.bicep/readTags.bicep index f189f85bac..e397d43574 100644 --- a/modules/resources/tags/resource-group/.bicep/readTags.bicep +++ b/modules/resources/tags/resource-group/.bicep/readTags.bicep @@ -6,4 +6,4 @@ resource tags 'Microsoft.Resources/tags@2019-10-01' existing = { } @description('Tags currently applied to the subscription level.') -output existingTags object = contains(tags.properties, 'tags') ? tags.properties.tags : {} +output existingTags object = tags.properties.?tags ?? {} diff --git a/modules/resources/tags/resource-group/README.md b/modules/resources/tags/resource-group/README.md index 678fc74561..a89c83c006 100644 --- a/modules/resources/tags/resource-group/README.md +++ b/modules/resources/tags/resource-group/README.md @@ -44,7 +44,6 @@ Instead of overwriting the existing tags, combine them with the new tags. Tags for the resource group. If not provided, removes existing tags. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/resources/tags/resource-group/main.bicep b/modules/resources/tags/resource-group/main.bicep index 16b6c9d1b5..aaf9058459 100644 --- a/modules/resources/tags/resource-group/main.bicep +++ b/modules/resources/tags/resource-group/main.bicep @@ -3,7 +3,7 @@ metadata description = 'This module deploys a Resource Tag on a Resource Group s metadata owner = 'Azure/module-maintainers' @description('Optional. Tags for the resource group. If not provided, removes existing tags.') -param tags object = {} +param tags object? @description('Optional. Instead of overwriting the existing tags, combine them with the new tags.') param onlyUpdate bool = false @@ -27,7 +27,7 @@ module readTags '.bicep/readTags.bicep' = if (onlyUpdate) { name: '${deployment().name}-ReadTags' } -var newTags = (onlyUpdate) ? union(readTags.outputs.existingTags, tags) : tags +var newTags = onlyUpdate ? union(readTags.outputs.existingTags, (tags ?? {})) : tags resource tag 'Microsoft.Resources/tags@2021-04-01' = { name: 'default' @@ -46,4 +46,4 @@ output resourceId string = tag.id output resourceGroupName string = resourceGroup().name @description('The applied tags.') -output tags object = newTags +output tags object = tag.properties.tags diff --git a/modules/resources/tags/resource-group/main.json b/modules/resources/tags/resource-group/main.json index 8e1a7b8b39..2cae75d417 100644 --- a/modules/resources/tags/resource-group/main.json +++ b/modules/resources/tags/resource-group/main.json @@ -1,11 +1,12 @@ { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "8701740381622545052" + "templateHash": "15660323099140717252" }, "name": "Resources Tags Resource Group", "description": "This module deploys a Resource Tag on a Resource Group scope.", @@ -14,7 +15,7 @@ "parameters": { "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags for the resource group. If not provided, removes existing tags." } @@ -34,8 +35,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -49,18 +50,18 @@ } } }, - { + "tag": { "type": "Microsoft.Resources/tags", "apiVersion": "2021-04-01", "name": "default", "properties": { - "tags": "[if(parameters('onlyUpdate'), union(reference(resourceId('Microsoft.Resources/deployments', format('{0}-ReadTags', deployment().name)), '2022-09-01').outputs.existingTags.value, parameters('tags')), parameters('tags'))]" + "tags": "[if(parameters('onlyUpdate'), union(reference('readTags').outputs.existingTags.value, coalesce(parameters('tags'), createObject())), parameters('tags'))]" }, "dependsOn": [ - "[resourceId('Microsoft.Resources/deployments', format('{0}-ReadTags', deployment().name))]" + "readTags" ] }, - { + "readTags": { "condition": "[parameters('onlyUpdate')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", @@ -77,7 +78,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "8737749583083645128" + "templateHash": "4088100020210156530" } }, "parameters": { @@ -96,13 +97,13 @@ "metadata": { "description": "Tags currently applied to the subscription level." }, - "value": "[if(contains(reference(resourceId('Microsoft.Resources/tags', parameters('name')), '2019-10-01'), 'tags'), reference(resourceId('Microsoft.Resources/tags', parameters('name')), '2019-10-01').tags, createObject())]" + "value": "[coalesce(tryGet(reference(resourceId('Microsoft.Resources/tags', parameters('name')), '2019-10-01'), 'tags'), createObject())]" } } } } } - ], + }, "outputs": { "name": { "type": "string", @@ -130,7 +131,7 @@ "metadata": { "description": "The applied tags." }, - "value": "[if(parameters('onlyUpdate'), union(reference(resourceId('Microsoft.Resources/deployments', format('{0}-ReadTags', deployment().name)), '2022-09-01').outputs.existingTags.value, parameters('tags')), parameters('tags'))]" + "value": "[reference('tag').tags]" } } } \ No newline at end of file diff --git a/modules/resources/tags/subscription/.bicep/readTags.bicep b/modules/resources/tags/subscription/.bicep/readTags.bicep index ab581cdea1..06dcc91dac 100644 --- a/modules/resources/tags/subscription/.bicep/readTags.bicep +++ b/modules/resources/tags/subscription/.bicep/readTags.bicep @@ -8,4 +8,4 @@ resource tags 'Microsoft.Resources/tags@2021-04-01' existing = { } @description('Tags currently applied to the subscription level.') -output existingTags object = contains(tags.properties, 'tags') ? tags.properties.tags : {} +output existingTags object = tags.properties.?tags ?? tags diff --git a/modules/resources/tags/subscription/README.md b/modules/resources/tags/subscription/README.md index 48c7d355a0..352c754d72 100644 --- a/modules/resources/tags/subscription/README.md +++ b/modules/resources/tags/subscription/README.md @@ -52,7 +52,6 @@ Instead of overwriting the existing tags, combine them with the new tags. Tags for the resource group. If not provided, removes existing tags. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/resources/tags/subscription/main.bicep b/modules/resources/tags/subscription/main.bicep index 1b4a51b471..a7eb069208 100644 --- a/modules/resources/tags/subscription/main.bicep +++ b/modules/resources/tags/subscription/main.bicep @@ -5,7 +5,7 @@ metadata owner = 'Azure/module-maintainers' targetScope = 'subscription' @description('Optional. Tags for the resource group. If not provided, removes existing tags.') -param tags object = {} +param tags object? @description('Optional. Instead of overwriting the existing tags, combine them with the new tags.') param onlyUpdate bool = false @@ -33,7 +33,7 @@ module readTags '.bicep/readTags.bicep' = if (onlyUpdate) { name: '${deployment().name}-ReadTags' } -var newTags = (onlyUpdate) ? union(readTags.outputs.existingTags, tags) : tags +var newTags = (onlyUpdate) ? union(readTags.outputs.existingTags, (tags ?? {})) : tags resource tag 'Microsoft.Resources/tags@2021-04-01' = { name: 'default' @@ -46,7 +46,7 @@ resource tag 'Microsoft.Resources/tags@2021-04-01' = { output name string = tag.name @description('The applied tags.') -output tags object = newTags +output tags object = newTags ?? {} @description('The resource ID of the applied tags.') output resourceId string = tag.id diff --git a/modules/resources/tags/subscription/main.json b/modules/resources/tags/subscription/main.json index 467d62828b..6640264a96 100644 --- a/modules/resources/tags/subscription/main.json +++ b/modules/resources/tags/subscription/main.json @@ -1,11 +1,12 @@ { "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "17975356792950377604" + "templateHash": "6739306478169191405" }, "name": "Resources Tags Subscription Scope", "description": "This module deploys a Resource Tag on a Subscription scope.", @@ -14,7 +15,7 @@ "parameters": { "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags for the resource group. If not provided, removes existing tags." } @@ -41,8 +42,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -57,18 +58,18 @@ } } }, - { + "tag": { "type": "Microsoft.Resources/tags", "apiVersion": "2021-04-01", "name": "default", "properties": { - "tags": "[if(parameters('onlyUpdate'), union(reference(subscriptionResourceId('Microsoft.Resources/deployments', format('{0}-ReadTags', deployment().name)), '2022-09-01').outputs.existingTags.value, parameters('tags')), parameters('tags'))]" + "tags": "[if(parameters('onlyUpdate'), union(reference('readTags').outputs.existingTags.value, coalesce(parameters('tags'), createObject())), parameters('tags'))]" }, "dependsOn": [ - "[subscriptionResourceId('Microsoft.Resources/deployments', format('{0}-ReadTags', deployment().name))]" + "readTags" ] }, - { + "readTags": { "condition": "[parameters('onlyUpdate')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", @@ -86,7 +87,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "18269006446765776342" + "templateHash": "9833962804635676625" } }, "parameters": { @@ -105,13 +106,13 @@ "metadata": { "description": "Tags currently applied to the subscription level." }, - "value": "[if(contains(reference(subscriptionResourceId('Microsoft.Resources/tags', parameters('name')), '2021-04-01'), 'tags'), reference(subscriptionResourceId('Microsoft.Resources/tags', parameters('name')), '2021-04-01').tags, createObject())]" + "value": "[coalesce(tryGet(reference(subscriptionResourceId('Microsoft.Resources/tags', parameters('name')), '2021-04-01'), 'tags'), reference(subscriptionResourceId('Microsoft.Resources/tags', parameters('name')), '2021-04-01', 'full'))]" } } } } } - ], + }, "outputs": { "name": { "type": "string", @@ -125,7 +126,7 @@ "metadata": { "description": "The applied tags." }, - "value": "[if(parameters('onlyUpdate'), union(reference(subscriptionResourceId('Microsoft.Resources/deployments', format('{0}-ReadTags', deployment().name)), '2022-09-01').outputs.existingTags.value, parameters('tags')), parameters('tags'))]" + "value": "[coalesce(if(parameters('onlyUpdate'), union(reference('readTags').outputs.existingTags.value, coalesce(parameters('tags'), createObject())), parameters('tags')), createObject())]" }, "resourceId": { "type": "string", diff --git a/modules/search/search-service/README.md b/modules/search/search-service/README.md index e116efe345..ca85fa4f71 100644 --- a/modules/search/search-service/README.md +++ b/modules/search/search-service/README.md @@ -922,7 +922,6 @@ Defines the SKU of an Azure Cognitive Search Service, which determines price tie Tags to help categorize the resource in the Azure portal. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/search/search-service/main.bicep b/modules/search/search-service/main.bicep index 5597e7b853..004714ae74 100644 --- a/modules/search/search-service/main.bicep +++ b/modules/search/search-service/main.bicep @@ -87,7 +87,7 @@ param managedIdentities managedIdentitiesType param diagnosticSettings diagnosticSettingType @description('Optional. Tags to help categorize the resource in the Azure portal.') -param tags object = {} +param tags object? // ============= // // Variables // diff --git a/modules/search/search-service/main.json b/modules/search/search-service/main.json index b7467ad1f0..895ff66987 100644 --- a/modules/search/search-service/main.json +++ b/modules/search/search-service/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "6839264843077014016" + "templateHash": "16977539745468752400" }, "name": "Search Services", "description": "This module deploys a Search Service.", @@ -522,7 +522,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags to help categorize the resource in the Azure portal." } diff --git a/modules/service-bus/namespace/README.md b/modules/service-bus/namespace/README.md index 877ff238b5..a000e89570 100644 --- a/modules/service-bus/namespace/README.md +++ b/modules/service-bus/namespace/README.md @@ -1352,7 +1352,6 @@ Name of this SKU. - Basic, Standard, Premium. Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `topics` diff --git a/modules/service-bus/namespace/main.bicep b/modules/service-bus/namespace/main.bicep index b78edd738f..da8dd5b8bf 100644 --- a/modules/service-bus/namespace/main.bicep +++ b/modules/service-bus/namespace/main.bicep @@ -94,7 +94,7 @@ param networkRuleSets object = {} param disableLocalAuth bool = true @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true diff --git a/modules/service-bus/namespace/main.json b/modules/service-bus/namespace/main.json index 5f9e473ae2..eb70f4dfeb 100644 --- a/modules/service-bus/namespace/main.json +++ b/modules/service-bus/namespace/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "14764861552700304868" + "templateHash": "18136363667820640336" }, "name": "Service Bus Namespaces", "description": "This module deploys a Service Bus Namespace.", @@ -547,7 +547,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/service-fabric/cluster/README.md b/modules/service-fabric/cluster/README.md index 4a9a11977f..c572b02a48 100644 --- a/modules/service-fabric/cluster/README.md +++ b/modules/service-fabric/cluster/README.md @@ -956,7 +956,6 @@ This property controls the logical grouping of VMs in upgrade domains (UDs). Thi Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `upgradeDescription` diff --git a/modules/service-fabric/cluster/application-type/README.md b/modules/service-fabric/cluster/application-type/README.md index 1fd40f7308..41f0879037 100644 --- a/modules/service-fabric/cluster/application-type/README.md +++ b/modules/service-fabric/cluster/application-type/README.md @@ -56,7 +56,6 @@ The name of the parent Service Fabric cluster. Required if the template is used Tags of the resource. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/service-fabric/cluster/application-type/main.bicep b/modules/service-fabric/cluster/application-type/main.bicep index 128fda8663..e630244a60 100644 --- a/modules/service-fabric/cluster/application-type/main.bicep +++ b/modules/service-fabric/cluster/application-type/main.bicep @@ -9,7 +9,7 @@ param serviceFabricClusterName string param name string = 'defaultApplicationType' @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true diff --git a/modules/service-fabric/cluster/application-type/main.json b/modules/service-fabric/cluster/application-type/main.json index ed0f9dfa6d..89edee625a 100644 --- a/modules/service-fabric/cluster/application-type/main.json +++ b/modules/service-fabric/cluster/application-type/main.json @@ -1,11 +1,12 @@ { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "3441501457466891361" + "templateHash": "16143571289588705380" }, "name": "Service Fabric Cluster Application Types", "description": "This module deploys a Service Fabric Cluster Application Type.", @@ -27,7 +28,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } @@ -40,8 +41,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -55,13 +56,22 @@ } } }, - { + "serviceFabricCluster": { + "existing": true, + "type": "Microsoft.ServiceFabric/clusters", + "apiVersion": "2021-06-01", + "name": "[parameters('serviceFabricClusterName')]" + }, + "applicationTypes": { "type": "Microsoft.ServiceFabric/clusters/applicationTypes", "apiVersion": "2021-06-01", "name": "[format('{0}/{1}', parameters('serviceFabricClusterName'), parameters('name'))]", - "tags": "[parameters('tags')]" + "tags": "[parameters('tags')]", + "dependsOn": [ + "serviceFabricCluster" + ] } - ], + }, "outputs": { "name": { "type": "string", diff --git a/modules/service-fabric/cluster/main.bicep b/modules/service-fabric/cluster/main.bicep index cea7afb8f7..929b22eb40 100644 --- a/modules/service-fabric/cluster/main.bicep +++ b/modules/service-fabric/cluster/main.bicep @@ -9,7 +9,7 @@ param name string param location string = resourceGroup().location @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. The lock settings of the service.') param lock lockType @@ -317,7 +317,7 @@ module serviceFabricCluster_applicationTypes 'application-type/main.bicep' = [fo params: { name: applicationType.name serviceFabricClusterName: serviceFabricCluster.name - tags: contains(applicationType, 'tags') ? applicationType.tags : {} + tags: applicationType.?tags ?? tags enableDefaultTelemetry: enableReferencedModulesTelemetry } }] diff --git a/modules/service-fabric/cluster/main.json b/modules/service-fabric/cluster/main.json index 7a59bc1f37..ac97598011 100644 --- a/modules/service-fabric/cluster/main.json +++ b/modules/service-fabric/cluster/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "16595935702067786987" + "templateHash": "4163996962220385017" }, "name": "Service Fabric Clusters", "description": "This module deploys a Service Fabric Cluster.", @@ -121,7 +121,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } @@ -545,19 +545,22 @@ "serviceFabricClusterName": { "value": "[parameters('name')]" }, - "tags": "[if(contains(parameters('applicationTypes')[copyIndex()], 'tags'), createObject('value', parameters('applicationTypes')[copyIndex()].tags), createObject('value', createObject()))]", + "tags": { + "value": "[coalesce(tryGet(parameters('applicationTypes')[copyIndex()], 'tags'), parameters('tags'))]" + }, "enableDefaultTelemetry": { "value": "[variables('enableReferencedModulesTelemetry')]" } }, "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "3441501457466891361" + "templateHash": "16143571289588705380" }, "name": "Service Fabric Cluster Application Types", "description": "This module deploys a Service Fabric Cluster Application Type.", @@ -579,7 +582,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } @@ -592,8 +595,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -607,13 +610,22 @@ } } }, - { + "serviceFabricCluster": { + "existing": true, + "type": "Microsoft.ServiceFabric/clusters", + "apiVersion": "2021-06-01", + "name": "[parameters('serviceFabricClusterName')]" + }, + "applicationTypes": { "type": "Microsoft.ServiceFabric/clusters/applicationTypes", "apiVersion": "2021-06-01", "name": "[format('{0}/{1}', parameters('serviceFabricClusterName'), parameters('name'))]", - "tags": "[parameters('tags')]" + "tags": "[parameters('tags')]", + "dependsOn": [ + "serviceFabricCluster" + ] } - ], + }, "outputs": { "name": { "type": "string", diff --git a/modules/signal-r-service/signal-r/README.md b/modules/signal-r-service/signal-r/README.md index ff3c273afd..4a59945bf2 100644 --- a/modules/signal-r-service/signal-r/README.md +++ b/modules/signal-r-service/signal-r/README.md @@ -681,7 +681,6 @@ The SKU of the service. The tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `upstreamTemplatesToEnable` diff --git a/modules/signal-r-service/signal-r/main.bicep b/modules/signal-r-service/signal-r/main.bicep index 385295b8f2..23f6aaca41 100644 --- a/modules/signal-r-service/signal-r/main.bicep +++ b/modules/signal-r-service/signal-r/main.bicep @@ -31,7 +31,7 @@ param sku string = 'Standard_S1' param capacity int = 1 @description('Optional. The tags of the resource.') -param tags object = {} +param tags object? @description('Optional. The allowed origin settings of the resource.') param allowedOrigins array = [ diff --git a/modules/signal-r-service/signal-r/main.json b/modules/signal-r-service/signal-r/main.json index bf43fef7a7..a842ad77f2 100644 --- a/modules/signal-r-service/signal-r/main.json +++ b/modules/signal-r-service/signal-r/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "4290982066037624920" + "templateHash": "1214561796520796276" }, "name": "SignalR Service SignalR", "description": "This module deploys a SignalR Service SignalR.", @@ -304,7 +304,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. The tags of the resource." } diff --git a/modules/signal-r-service/web-pub-sub/README.md b/modules/signal-r-service/web-pub-sub/README.md index 802630e972..c4aa82598c 100644 --- a/modules/signal-r-service/web-pub-sub/README.md +++ b/modules/signal-r-service/web-pub-sub/README.md @@ -769,7 +769,6 @@ Pricing tier of the resource. Tags of the resource. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/signal-r-service/web-pub-sub/main.bicep b/modules/signal-r-service/web-pub-sub/main.bicep index 70b93a62d7..93a0247790 100644 --- a/modules/signal-r-service/web-pub-sub/main.bicep +++ b/modules/signal-r-service/web-pub-sub/main.bicep @@ -18,7 +18,7 @@ param lock lockType param roleAssignments roleAssignmentType @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. The unit count of the resource. 1 by default.') param capacity int = 1 diff --git a/modules/signal-r-service/web-pub-sub/main.json b/modules/signal-r-service/web-pub-sub/main.json index aa1f93b682..9decb0dc2e 100644 --- a/modules/signal-r-service/web-pub-sub/main.json +++ b/modules/signal-r-service/web-pub-sub/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "12261287441324704754" + "templateHash": "12680610655362641595" }, "name": "SignalR Web PubSub Services", "description": "This module deploys a SignalR Web PubSub Service.", @@ -311,7 +311,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/sql/managed-instance/README.md b/modules/sql/managed-instance/README.md index aa416f045a..332f0dcb64 100644 --- a/modules/sql/managed-instance/README.md +++ b/modules/sql/managed-instance/README.md @@ -999,7 +999,6 @@ The fully qualified resource ID of the subnet on which the SQL managed instance Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `timezoneId` diff --git a/modules/sql/managed-instance/database/README.md b/modules/sql/managed-instance/database/README.md index 886dac15da..ce3569342e 100644 --- a/modules/sql/managed-instance/database/README.md +++ b/modules/sql/managed-instance/database/README.md @@ -293,7 +293,6 @@ Specifies the uri of the storage container where backups for this restore are st Tags of the resource. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/sql/managed-instance/database/main.bicep b/modules/sql/managed-instance/database/main.bicep index 5bd0e8cf7b..897d60d2fd 100644 --- a/modules/sql/managed-instance/database/main.bicep +++ b/modules/sql/managed-instance/database/main.bicep @@ -61,7 +61,7 @@ param backupShortTermRetentionPoliciesObj object = {} param backupLongTermRetentionPoliciesObj object = {} @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true diff --git a/modules/sql/managed-instance/database/main.json b/modules/sql/managed-instance/database/main.json index db4a4d2966..a2638dea38 100644 --- a/modules/sql/managed-instance/database/main.json +++ b/modules/sql/managed-instance/database/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "11809118815295815977" + "templateHash": "8385261968552186747" }, "name": "SQL Managed Instance Databases", "description": "This module deploys a SQL Managed Instance Database.", @@ -252,7 +252,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/sql/managed-instance/main.bicep b/modules/sql/managed-instance/main.bicep index 1b10ecd747..27a246ada0 100644 --- a/modules/sql/managed-instance/main.bicep +++ b/modules/sql/managed-instance/main.bicep @@ -96,7 +96,7 @@ param lock lockType param roleAssignments roleAssignmentType @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true @@ -282,7 +282,7 @@ module managedInstance_databases 'database/main.bicep' = [for (database, index) sourceDatabaseId: contains(database, 'sourceDatabaseId') ? database.sourceDatabaseId : '' storageContainerSasToken: contains(database, 'storageContainerSasToken') ? database.storageContainerSasToken : '' storageContainerUri: contains(database, 'storageContainerUri') ? database.storageContainerUri : '' - tags: contains(database, 'tags') ? database.tags : {} + tags: database.?tags ?? tags backupShortTermRetentionPoliciesObj: contains(database, 'backupShortTermRetentionPolicies') ? database.backupShortTermRetentionPolicies : {} backupLongTermRetentionPoliciesObj: contains(database, 'backupLongTermRetentionPolicies') ? database.backupLongTermRetentionPolicies : {} enableDefaultTelemetry: enableReferencedModulesTelemetry diff --git a/modules/sql/managed-instance/main.json b/modules/sql/managed-instance/main.json index cee9076a62..c1884f0c02 100644 --- a/modules/sql/managed-instance/main.json +++ b/modules/sql/managed-instance/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "486965125676503752" + "templateHash": "12495888352047670800" }, "name": "SQL Managed Instances", "description": "This module deploys a SQL Managed Instance.", @@ -422,7 +422,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } @@ -683,7 +683,9 @@ "sourceDatabaseId": "[if(contains(parameters('databases')[copyIndex()], 'sourceDatabaseId'), createObject('value', parameters('databases')[copyIndex()].sourceDatabaseId), createObject('value', ''))]", "storageContainerSasToken": "[if(contains(parameters('databases')[copyIndex()], 'storageContainerSasToken'), createObject('value', parameters('databases')[copyIndex()].storageContainerSasToken), createObject('value', ''))]", "storageContainerUri": "[if(contains(parameters('databases')[copyIndex()], 'storageContainerUri'), createObject('value', parameters('databases')[copyIndex()].storageContainerUri), createObject('value', ''))]", - "tags": "[if(contains(parameters('databases')[copyIndex()], 'tags'), createObject('value', parameters('databases')[copyIndex()].tags), createObject('value', createObject()))]", + "tags": { + "value": "[coalesce(tryGet(parameters('databases')[copyIndex()], 'tags'), parameters('tags'))]" + }, "backupShortTermRetentionPoliciesObj": "[if(contains(parameters('databases')[copyIndex()], 'backupShortTermRetentionPolicies'), createObject('value', parameters('databases')[copyIndex()].backupShortTermRetentionPolicies), createObject('value', createObject()))]", "backupLongTermRetentionPoliciesObj": "[if(contains(parameters('databases')[copyIndex()], 'backupLongTermRetentionPolicies'), createObject('value', parameters('databases')[copyIndex()].backupLongTermRetentionPolicies), createObject('value', createObject()))]", "enableDefaultTelemetry": { @@ -698,7 +700,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "11809118815295815977" + "templateHash": "8385261968552186747" }, "name": "SQL Managed Instance Databases", "description": "This module deploys a SQL Managed Instance Database.", @@ -944,7 +946,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/sql/server/README.md b/modules/sql/server/README.md index 81fa6667cc..da79dd63a3 100644 --- a/modules/sql/server/README.md +++ b/modules/sql/server/README.md @@ -1183,7 +1183,6 @@ The security alert policies to create in the server. Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `virtualNetworkRules` diff --git a/modules/sql/server/database/README.md b/modules/sql/server/database/README.md index a5f07c4b92..588563b5fb 100644 --- a/modules/sql/server/database/README.md +++ b/modules/sql/server/database/README.md @@ -392,7 +392,6 @@ Resource ID of database if createMode set to Copy, Secondary, PointInTimeRestore Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `zoneRedundant` diff --git a/modules/sql/server/database/main.bicep b/modules/sql/server/database/main.bicep index 789fd60793..f1943a2c02 100644 --- a/modules/sql/server/database/main.bicep +++ b/modules/sql/server/database/main.bicep @@ -63,7 +63,7 @@ param minCapacity string = '' param autoPauseDelay int = 0 @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. The resource ID of the elastic pool containing this database.') param elasticPoolId string = '' diff --git a/modules/sql/server/database/main.json b/modules/sql/server/database/main.json index c8043872b1..f7e79bc48c 100644 --- a/modules/sql/server/database/main.json +++ b/modules/sql/server/database/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "7566326750370718720" + "templateHash": "17297721819291768897" }, "name": "SQL Server Database", "description": "This module deploys an Azure SQL Server Database.", @@ -249,7 +249,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/sql/server/elastic-pool/README.md b/modules/sql/server/elastic-pool/README.md index 8cbfe4e622..c979ff564a 100644 --- a/modules/sql/server/elastic-pool/README.md +++ b/modules/sql/server/elastic-pool/README.md @@ -150,7 +150,6 @@ The tier or edition of the particular SKU, e.g. Basic, Premium. Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `zoneRedundant` diff --git a/modules/sql/server/elastic-pool/main.bicep b/modules/sql/server/elastic-pool/main.bicep index 0a1246a96d..4269c2e8d1 100644 --- a/modules/sql/server/elastic-pool/main.bicep +++ b/modules/sql/server/elastic-pool/main.bicep @@ -9,7 +9,7 @@ param name string param serverName string @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Location for all resources.') param location string = resourceGroup().location diff --git a/modules/sql/server/elastic-pool/main.json b/modules/sql/server/elastic-pool/main.json index d530033524..dd9e5202b8 100644 --- a/modules/sql/server/elastic-pool/main.json +++ b/modules/sql/server/elastic-pool/main.json @@ -1,11 +1,12 @@ { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "2069769222124842536" + "templateHash": "9388916155534343976" }, "name": "SQL Server Elastic Pool", "description": "This module deploys an Azure SQL Server Elastic Pool.", @@ -26,7 +27,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } @@ -127,8 +128,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -142,7 +143,13 @@ } } }, - { + "server": { + "existing": true, + "type": "Microsoft.Sql/servers", + "apiVersion": "2022-05-01-preview", + "name": "[parameters('serverName')]" + }, + "elasticPool": { "type": "Microsoft.Sql/servers/elasticPools", "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", @@ -164,9 +171,12 @@ "maxCapacity": "[parameters('databaseMaxCapacity')]" }, "zoneRedundant": "[parameters('zoneRedundant')]" - } + }, + "dependsOn": [ + "server" + ] } - ], + }, "outputs": { "name": { "type": "string", @@ -194,7 +204,7 @@ "metadata": { "description": "The location the resource was deployed into." }, - "value": "[reference(resourceId('Microsoft.Sql/servers/elasticPools', parameters('serverName'), parameters('name')), '2022-05-01-preview', 'full').location]" + "value": "[reference('elasticPool', '2022-05-01-preview', 'full').location]" } } } \ No newline at end of file diff --git a/modules/sql/server/main.bicep b/modules/sql/server/main.bicep index 50bfad6e00..fa6063ee6e 100644 --- a/modules/sql/server/main.bicep +++ b/modules/sql/server/main.bicep @@ -28,7 +28,7 @@ param lock lockType param roleAssignments roleAssignmentType @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true @@ -193,7 +193,7 @@ module server_databases 'database/main.bicep' = [for (database, index) in databa readScale: contains(database, 'readScale') ? database.readScale : 'Disabled' requestedBackupStorageRedundancy: contains(database, 'requestedBackupStorageRedundancy') ? database.requestedBackupStorageRedundancy : '' sampleName: contains(database, 'sampleName') ? database.sampleName : '' - tags: contains(database, 'tags') ? database.tags : {} + tags: database.?tags ?? tags zoneRedundant: contains(database, 'zoneRedundant') ? database.zoneRedundant : false elasticPoolId: contains(database, 'elasticPoolId') ? database.elasticPoolId : '' enableDefaultTelemetry: enableReferencedModulesTelemetry @@ -228,7 +228,7 @@ module server_elasticPools 'elastic-pool/main.bicep' = [for (elasticPool, index) zoneRedundant: contains(elasticPool, 'zoneRedundant') ? elasticPool.zoneRedundant : false enableDefaultTelemetry: enableReferencedModulesTelemetry location: location - tags: contains(elasticPool, 'tags') ? elasticPool.tags : {} + tags: elasticPool.?tags ?? tags } }] diff --git a/modules/sql/server/main.json b/modules/sql/server/main.json index 44de76b732..286074e2f6 100644 --- a/modules/sql/server/main.json +++ b/modules/sql/server/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "10315505573708385972" + "templateHash": "4565599506408192920" }, "name": "Azure SQL Servers", "description": "This module deploys an Azure SQL Server.", @@ -332,7 +332,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } @@ -580,7 +580,9 @@ "readScale": "[if(contains(parameters('databases')[copyIndex()], 'readScale'), createObject('value', parameters('databases')[copyIndex()].readScale), createObject('value', 'Disabled'))]", "requestedBackupStorageRedundancy": "[if(contains(parameters('databases')[copyIndex()], 'requestedBackupStorageRedundancy'), createObject('value', parameters('databases')[copyIndex()].requestedBackupStorageRedundancy), createObject('value', ''))]", "sampleName": "[if(contains(parameters('databases')[copyIndex()], 'sampleName'), createObject('value', parameters('databases')[copyIndex()].sampleName), createObject('value', ''))]", - "tags": "[if(contains(parameters('databases')[copyIndex()], 'tags'), createObject('value', parameters('databases')[copyIndex()].tags), createObject('value', createObject()))]", + "tags": { + "value": "[coalesce(tryGet(parameters('databases')[copyIndex()], 'tags'), parameters('tags'))]" + }, "zoneRedundant": "[if(contains(parameters('databases')[copyIndex()], 'zoneRedundant'), createObject('value', parameters('databases')[copyIndex()].zoneRedundant), createObject('value', false()))]", "elasticPoolId": "[if(contains(parameters('databases')[copyIndex()], 'elasticPoolId'), createObject('value', parameters('databases')[copyIndex()].elasticPoolId), createObject('value', ''))]", "enableDefaultTelemetry": { @@ -602,7 +604,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "7566326750370718720" + "templateHash": "17297721819291768897" }, "name": "SQL Server Database", "description": "This module deploys an Azure SQL Server Database.", @@ -845,7 +847,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } @@ -1378,16 +1380,19 @@ "location": { "value": "[parameters('location')]" }, - "tags": "[if(contains(parameters('elasticPools')[copyIndex()], 'tags'), createObject('value', parameters('elasticPools')[copyIndex()].tags), createObject('value', createObject()))]" + "tags": { + "value": "[coalesce(tryGet(parameters('elasticPools')[copyIndex()], 'tags'), parameters('tags'))]" + } }, "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "languageVersion": "2.0", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "2069769222124842536" + "templateHash": "9388916155534343976" }, "name": "SQL Server Elastic Pool", "description": "This module deploys an Azure SQL Server Elastic Pool.", @@ -1408,7 +1413,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } @@ -1509,8 +1514,8 @@ } } }, - "resources": [ - { + "resources": { + "defaultTelemetry": { "condition": "[parameters('enableDefaultTelemetry')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", @@ -1524,7 +1529,13 @@ } } }, - { + "server": { + "existing": true, + "type": "Microsoft.Sql/servers", + "apiVersion": "2022-05-01-preview", + "name": "[parameters('serverName')]" + }, + "elasticPool": { "type": "Microsoft.Sql/servers/elasticPools", "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", @@ -1546,9 +1557,12 @@ "maxCapacity": "[parameters('databaseMaxCapacity')]" }, "zoneRedundant": "[parameters('zoneRedundant')]" - } + }, + "dependsOn": [ + "server" + ] } - ], + }, "outputs": { "name": { "type": "string", @@ -1576,7 +1590,7 @@ "metadata": { "description": "The location the resource was deployed into." }, - "value": "[reference(resourceId('Microsoft.Sql/servers/elasticPools', parameters('serverName'), parameters('name')), '2022-05-01-preview', 'full').location]" + "value": "[reference('elasticPool', '2022-05-01-preview', 'full').location]" } } } diff --git a/modules/storage/storage-account/README.md b/modules/storage/storage-account/README.md index e974443c9d..3d53bcb9fd 100644 --- a/modules/storage/storage-account/README.md +++ b/modules/storage/storage-account/README.md @@ -1808,7 +1808,6 @@ Table service and tables to create. Tags of the resource. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/storage/storage-account/main.bicep b/modules/storage/storage-account/main.bicep index 42f8b18c1f..8dbf5b6599 100644 --- a/modules/storage/storage-account/main.bicep +++ b/modules/storage/storage-account/main.bicep @@ -136,7 +136,7 @@ param diagnosticSettings diagnosticSettingType param lock lockType @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true diff --git a/modules/storage/storage-account/main.json b/modules/storage/storage-account/main.json index dde38f6c5b..3b1c5cfd2e 100644 --- a/modules/storage/storage-account/main.json +++ b/modules/storage/storage-account/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "1854017442729323429" + "templateHash": "8645368819124015994" }, "name": "Storage Accounts", "description": "This module deploys a Storage Account.", @@ -614,7 +614,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/synapse/private-link-hub/README.md b/modules/synapse/private-link-hub/README.md index 2a0b0cff04..fc6c154677 100644 --- a/modules/synapse/private-link-hub/README.md +++ b/modules/synapse/private-link-hub/README.md @@ -513,7 +513,6 @@ Required. The name of the role to assign. If it cannot be found you can specify Tags of the resource. - Required: No - Type: object -- Default: `{object}` ## Outputs diff --git a/modules/synapse/private-link-hub/main.bicep b/modules/synapse/private-link-hub/main.bicep index 003f53a1dd..703fe86f23 100644 --- a/modules/synapse/private-link-hub/main.bicep +++ b/modules/synapse/private-link-hub/main.bicep @@ -9,7 +9,7 @@ param name string param location string = resourceGroup().location @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. The lock settings of the service.') param lock lockType diff --git a/modules/synapse/private-link-hub/main.json b/modules/synapse/private-link-hub/main.json index 4fab3419d1..a69dbc2793 100644 --- a/modules/synapse/private-link-hub/main.json +++ b/modules/synapse/private-link-hub/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "13462616099297553465" + "templateHash": "684659786245480339" }, "name": "Azure Synapse Analytics", "description": "This module deploys an Azure Synapse Analytics (Private Link Hub).", @@ -269,7 +269,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/synapse/workspace/README.md b/modules/synapse/workspace/README.md index 150314f8d8..da6f7bd74d 100644 --- a/modules/synapse/workspace/README.md +++ b/modules/synapse/workspace/README.md @@ -1094,7 +1094,6 @@ Password for administrator access to the workspace's SQL pools. If you don't pro Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `userAssignedIdentities` diff --git a/modules/synapse/workspace/main.bicep b/modules/synapse/workspace/main.bicep index d7d099043e..68ff4b3558 100644 --- a/modules/synapse/workspace/main.bicep +++ b/modules/synapse/workspace/main.bicep @@ -11,7 +11,7 @@ param name string param location string = resourceGroup().location @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable or Disable AzureADOnlyAuthentication on All Workspace sub-resource.') param azureADOnlyAuthentication bool = false diff --git a/modules/synapse/workspace/main.json b/modules/synapse/workspace/main.json index fb713390f4..7f66fe19ae 100644 --- a/modules/synapse/workspace/main.json +++ b/modules/synapse/workspace/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "11476274375435948845" + "templateHash": "1529722820399903843" }, "name": "Synapse Workspaces", "description": "This module deploys a Synapse Workspace.", @@ -358,7 +358,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/virtual-machine-images/image-template/README.md b/modules/virtual-machine-images/image-template/README.md index 40fab0d762..b8eaf937ae 100644 --- a/modules/virtual-machine-images/image-template/README.md +++ b/modules/virtual-machine-images/image-template/README.md @@ -544,7 +544,6 @@ Resource ID of an already existing subnet, e.g.: /subscriptions/ Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `unManagedImageName` diff --git a/modules/virtual-machine-images/image-template/main.bicep b/modules/virtual-machine-images/image-template/main.bicep index 7f0d3b2a07..c3def8cd69 100644 --- a/modules/virtual-machine-images/image-template/main.bicep +++ b/modules/virtual-machine-images/image-template/main.bicep @@ -69,7 +69,7 @@ param stagingResourceGroup string = '' param lock lockType @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Generated. Do not provide a value! This date value is used to generate a unique image template name.') param baseTime string = utcNow('yyyy-MM-dd-HH-mm-ss') diff --git a/modules/virtual-machine-images/image-template/main.json b/modules/virtual-machine-images/image-template/main.json index 873da1becd..db5fe986d1 100644 --- a/modules/virtual-machine-images/image-template/main.json +++ b/modules/virtual-machine-images/image-template/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "13895680092104029246" + "templateHash": "11391151747567689793" }, "name": "Virtual Machine Image Templates", "description": "This module deploys a Virtual Machine Image Template that can be consumed by Azure Image Builder (AIB).", @@ -249,7 +249,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/web/connection/README.md b/modules/web/connection/README.md index bd1c83f539..9c3e5d2bb1 100644 --- a/modules/web/connection/README.md +++ b/modules/web/connection/README.md @@ -313,7 +313,6 @@ Status of the connection. Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `testLinks` diff --git a/modules/web/connection/main.bicep b/modules/web/connection/main.bicep index db24458661..bfa55bc54f 100644 --- a/modules/web/connection/main.bicep +++ b/modules/web/connection/main.bicep @@ -38,7 +38,7 @@ param statuses array = [] param lock lockType @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Links to test the API connection.') param testLinks array = [] diff --git a/modules/web/connection/main.json b/modules/web/connection/main.json index fa79bdb08e..dab170f63e 100644 --- a/modules/web/connection/main.json +++ b/modules/web/connection/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "1935169026150435990" + "templateHash": "11837763267512511834" }, "name": "API Connections", "description": "This module deploys an Azure API Connection.", @@ -181,7 +181,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/web/hosting-environment/README.md b/modules/web/hosting-environment/README.md index e41afff80c..0a55538ca4 100644 --- a/modules/web/hosting-environment/README.md +++ b/modules/web/hosting-environment/README.md @@ -757,7 +757,6 @@ ResourceId for the subnet. Resource tags. - Required: No - Type: object -- Default: `{object}` ### Parameter: `upgradePreference` diff --git a/modules/web/hosting-environment/main.bicep b/modules/web/hosting-environment/main.bicep index f39bc28623..a6a4c565b2 100644 --- a/modules/web/hosting-environment/main.bicep +++ b/modules/web/hosting-environment/main.bicep @@ -16,7 +16,7 @@ param lock lockType param roleAssignments roleAssignmentType @description('Optional. Resource tags.') -param tags object = {} +param tags object? @allowed([ 'ASEv2' diff --git a/modules/web/hosting-environment/main.json b/modules/web/hosting-environment/main.json index 468a1dd392..b1d6749b4f 100644 --- a/modules/web/hosting-environment/main.json +++ b/modules/web/hosting-environment/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "4072056725724568319" + "templateHash": "12800539837694740755" }, "name": "App Service Environments", "description": "This module deploys an App Service Environment.", @@ -245,7 +245,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Resource tags." } diff --git a/modules/web/serverfarm/README.md b/modules/web/serverfarm/README.md index a8de74f584..0e8f31571a 100644 --- a/modules/web/serverfarm/README.md +++ b/modules/web/serverfarm/README.md @@ -445,7 +445,6 @@ Defines the name, tier, size, family and capacity of the App Service Plan. Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `targetWorkerCount` diff --git a/modules/web/serverfarm/main.bicep b/modules/web/serverfarm/main.bicep index 6beca161de..856f2cc3cd 100644 --- a/modules/web/serverfarm/main.bicep +++ b/modules/web/serverfarm/main.bicep @@ -59,7 +59,7 @@ param lock lockType param roleAssignments roleAssignmentType @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true diff --git a/modules/web/serverfarm/main.json b/modules/web/serverfarm/main.json index d02adee91d..53eec7f0dd 100644 --- a/modules/web/serverfarm/main.json +++ b/modules/web/serverfarm/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "3543793483023585730" + "templateHash": "14824797980620937555" }, "name": "App Service Plans", "description": "This module deploys an App Service Plan.", @@ -289,7 +289,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/web/site/README.md b/modules/web/site/README.md index 160432f44c..4a1fef0403 100644 --- a/modules/web/site/README.md +++ b/modules/web/site/README.md @@ -1508,7 +1508,6 @@ Required if app of kind functionapp. Resource ID of the storage account to manag Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `virtualNetworkSubnetId` diff --git a/modules/web/site/main.bicep b/modules/web/site/main.bicep index 4add5b8016..49f99a9ebb 100644 --- a/modules/web/site/main.bicep +++ b/modules/web/site/main.bicep @@ -82,7 +82,7 @@ param privateEndpoints privateEndpointType param slots array = [] @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true @@ -268,9 +268,9 @@ module app_slots 'slot/main.bicep' = [for (slot, index) in slots: { diagnosticSettings: slot.?diagnosticSettings roleAssignments: contains(slot, 'roleAssignments') ? slot.roleAssignments : roleAssignments appSettingsKeyValuePairs: contains(slot, 'appSettingsKeyValuePairs') ? slot.appSettingsKeyValuePairs : appSettingsKeyValuePairs - lock: contains(slot, 'lock') ? slot.lock : lock + lock: slot.?lock ?? lock privateEndpoints: contains(slot, 'privateEndpoints') ? slot.privateEndpoints : privateEndpoints - tags: tags + tags: slot.?tags ?? tags clientCertEnabled: contains(slot, 'clientCertEnabled') ? slot.clientCertEnabled : false clientCertExclusionPaths: contains(slot, 'clientCertExclusionPaths') ? slot.clientCertExclusionPaths : '' clientCertMode: contains(slot, 'clientCertMode') ? slot.clientCertMode : 'Optional' diff --git a/modules/web/site/main.json b/modules/web/site/main.json index c313b1d0ce..9ccef83733 100644 --- a/modules/web/site/main.json +++ b/modules/web/site/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "7527886527579756889" + "templateHash": "16422154168736567404" }, "name": "Web/Function Apps", "description": "This module deploys a Web or Function App.", @@ -555,7 +555,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } @@ -1147,10 +1147,12 @@ }, "roleAssignments": "[if(contains(parameters('slots')[copyIndex()], 'roleAssignments'), createObject('value', parameters('slots')[copyIndex()].roleAssignments), createObject('value', parameters('roleAssignments')))]", "appSettingsKeyValuePairs": "[if(contains(parameters('slots')[copyIndex()], 'appSettingsKeyValuePairs'), createObject('value', parameters('slots')[copyIndex()].appSettingsKeyValuePairs), createObject('value', parameters('appSettingsKeyValuePairs')))]", - "lock": "[if(contains(parameters('slots')[copyIndex()], 'lock'), createObject('value', parameters('slots')[copyIndex()].lock), createObject('value', parameters('lock')))]", + "lock": { + "value": "[coalesce(tryGet(parameters('slots')[copyIndex()], 'lock'), parameters('lock'))]" + }, "privateEndpoints": "[if(contains(parameters('slots')[copyIndex()], 'privateEndpoints'), createObject('value', parameters('slots')[copyIndex()].privateEndpoints), createObject('value', parameters('privateEndpoints')))]", "tags": { - "value": "[parameters('tags')]" + "value": "[coalesce(tryGet(parameters('slots')[copyIndex()], 'tags'), parameters('tags'))]" }, "clientCertEnabled": "[if(contains(parameters('slots')[copyIndex()], 'clientCertEnabled'), createObject('value', parameters('slots')[copyIndex()].clientCertEnabled), createObject('value', false()))]", "clientCertExclusionPaths": "[if(contains(parameters('slots')[copyIndex()], 'clientCertExclusionPaths'), createObject('value', parameters('slots')[copyIndex()].clientCertExclusionPaths), createObject('value', ''))]", @@ -1177,7 +1179,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "11996079594340351559" + "templateHash": "2776575331575111691" }, "name": "Web/Function App Deployment Slots", "description": "This module deploys a Web or Function App Deployment Slot.", @@ -1698,7 +1700,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } diff --git a/modules/web/site/slot/README.md b/modules/web/site/slot/README.md index 29258b7088..5f79c8d56f 100644 --- a/modules/web/site/slot/README.md +++ b/modules/web/site/slot/README.md @@ -700,7 +700,6 @@ Required if app of kind functionapp. Resource ID of the storage account to manag Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `virtualNetworkSubnetId` diff --git a/modules/web/site/slot/main.bicep b/modules/web/site/slot/main.bicep index 3cb7142811..6909c7040f 100644 --- a/modules/web/site/slot/main.bicep +++ b/modules/web/site/slot/main.bicep @@ -70,7 +70,7 @@ param lock lockType param privateEndpoints privateEndpointType @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') param enableDefaultTelemetry bool = true diff --git a/modules/web/site/slot/main.json b/modules/web/site/slot/main.json index 6ce2296e50..a0dd2e433f 100644 --- a/modules/web/site/slot/main.json +++ b/modules/web/site/slot/main.json @@ -527,7 +527,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." } @@ -1842,4 +1842,4 @@ "value": "[reference('slot', '2022-09-01', 'full').location]" } } -} \ No newline at end of file +} diff --git a/modules/web/static-site/README.md b/modules/web/static-site/README.md index ed4ab98af5..0cc50ab558 100644 --- a/modules/web/static-site/README.md +++ b/modules/web/static-site/README.md @@ -697,7 +697,6 @@ State indicating whether staging environments are allowed or not allowed for a s Tags of the resource. - Required: No - Type: object -- Default: `{object}` ### Parameter: `templateProperties` diff --git a/modules/web/static-site/main.bicep b/modules/web/static-site/main.bicep index 181e771819..160cdf3082 100644 --- a/modules/web/static-site/main.bicep +++ b/modules/web/static-site/main.bicep @@ -65,7 +65,7 @@ param lock lockType param privateEndpoints privateEndpointType @description('Optional. Tags of the resource.') -param tags object = {} +param tags object? @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') param enableDefaultTelemetry bool = true diff --git a/modules/web/static-site/main.json b/modules/web/static-site/main.json index b7423b7aea..b56be52ddb 100644 --- a/modules/web/static-site/main.json +++ b/modules/web/static-site/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "332857934206486865" + "templateHash": "17501728288699973579" }, "name": "Static Web Apps", "description": "This module deploys a Static Web App.", @@ -397,7 +397,7 @@ }, "tags": { "type": "object", - "defaultValue": {}, + "nullable": true, "metadata": { "description": "Optional. Tags of the resource." }