diff --git a/avm/res/analysis-services/server/README.md b/avm/res/analysis-services/server/README.md index e98e2db197..5869c1db46 100644 --- a/avm/res/analysis-services/server/README.md +++ b/avm/res/analysis-services/server/README.md @@ -25,7 +25,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br:bicep/modules/analysis-services.server:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/analysis-services/server:`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -41,13 +41,13 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module server 'br:bicep/modules/analysis-services.server:1.0.0' = { +module server 'br/public:avm/res/analysis-services/server:' = { name: '${uniqueString(deployment().name, location)}-test-assmin' params: { // Required parameters name: 'assmin' // Non-required parameters - enableDefaultTelemetry: '' + location: '' } } ``` @@ -69,8 +69,8 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { "value": "assmin" }, // Non-required parameters - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" } } } @@ -89,7 +89,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module server 'br:bicep/modules/analysis-services.server:1.0.0' = { +module server 'br/public:avm/res/analysis-services/server:' = { name: '${uniqueString(deployment().name, location)}-test-assmax' params: { // Required parameters @@ -117,7 +117,6 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { workspaceResourceId: '' } ] - enableDefaultTelemetry: '' firewallSettings: { enablePowerBIService: true firewallRules: [ @@ -128,6 +127,7 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { } ] } + location: '' lock: { kind: 'CanNotDelete' name: 'myCustomLockName' @@ -201,9 +201,6 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { } ] }, - "enableDefaultTelemetry": { - "value": "" - }, "firewallSettings": { "value": { "enablePowerBIService": true, @@ -216,6 +213,9 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { ] } }, + "location": { + "value": "" + }, "lock": { "value": { "kind": "CanNotDelete", @@ -271,7 +271,7 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module server 'br:bicep/modules/analysis-services.server:1.0.0' = { +module server 'br/public:avm/res/analysis-services/server:' = { name: '${uniqueString(deployment().name, location)}-test-asswaf' params: { // Required parameters @@ -299,7 +299,6 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { workspaceResourceId: '' } ] - enableDefaultTelemetry: '' firewallSettings: { enablePowerBIService: true firewallRules: [ @@ -310,6 +309,7 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { } ] } + location: '' lock: { kind: 'CanNotDelete' name: 'myCustomLockName' @@ -366,9 +366,6 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { } ] }, - "enableDefaultTelemetry": { - "value": "" - }, "firewallSettings": { "value": { "enablePowerBIService": true, @@ -381,6 +378,9 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { ] } }, + "location": { + "value": "" + }, "lock": { "value": { "kind": "CanNotDelete", @@ -421,7 +421,7 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { | Parameter | Type | Description | | :-- | :-- | :-- | | [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | +| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | | [`firewallSettings`](#parameter-firewallsettings) | object | The inbound firewall rules to define on the server. If not specified, firewall is disabled. | | [`location`](#parameter-location) | string | Location for all Resources. | | [`lock`](#parameter-lock) | object | The lock settings of the service. | @@ -528,7 +528,7 @@ Resource ID of the diagnostic log analytics workspace. For security reasons, it - Required: No - Type: string -### Parameter: `enableDefaultTelemetry` +### Parameter: `enableTelemetry` Enable telemetry via a Globally Unique Identifier (GUID). diff --git a/avm/res/analysis-services/server/main.json b/avm/res/analysis-services/server/main.json index b3e4158662..e050279221 100644 --- a/avm/res/analysis-services/server/main.json +++ b/avm/res/analysis-services/server/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "1605417065240868452" + "templateHash": "15153643486811668197" }, "name": "Analysis Services Servers", "description": "This module deploys an Analysis Services Server.", @@ -280,7 +280,7 @@ "description": "Optional. Tags of the resource." } }, - "enableDefaultTelemetry": { + "enableTelemetry": { "type": "bool", "defaultValue": true, "metadata": { @@ -298,17 +298,23 @@ } }, "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", + "avmTelemetry": { + "condition": "[parameters('enableTelemetry')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", + "apiVersion": "2023-07-01", + "name": "[format('46d3xbcp.res.analysisservices-server.{0}.{1}', replace('-..--..-', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "resources": [] + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } } } }, diff --git a/avm/res/cache/redis/README.md b/avm/res/cache/redis/README.md index 5f026c7c76..e28143dc71 100644 --- a/avm/res/cache/redis/README.md +++ b/avm/res/cache/redis/README.md @@ -28,7 +28,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br:bicep/modules/cache.redis:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/cache/redis:`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -44,13 +44,13 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module redis 'br:bicep/modules/cache.redis:1.0.0' = { +module redis 'br/public:avm/res/cache/redis:' = { name: '${uniqueString(deployment().name, location)}-test-crmin' params: { // Required parameters name: 'crmin001' // Non-required parameters - enableDefaultTelemetry: '' + location: '' } } ``` @@ -72,8 +72,8 @@ module redis 'br:bicep/modules/cache.redis:1.0.0' = { "value": "crmin001" }, // Non-required parameters - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" } } } @@ -92,7 +92,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module redis 'br:bicep/modules/cache.redis:1.0.0' = { +module redis 'br/public:avm/res/cache/redis:' = { name: '${uniqueString(deployment().name, location)}-test-crmax' params: { // Required parameters @@ -113,8 +113,8 @@ module redis 'br:bicep/modules/cache.redis:1.0.0' = { workspaceResourceId: '' } ] - enableDefaultTelemetry: '' enableNonSslPort: true + location: '' lock: { kind: 'CanNotDelete' name: 'myCustomLockName' @@ -192,12 +192,12 @@ module redis 'br:bicep/modules/cache.redis:1.0.0' = { } ] }, - "enableDefaultTelemetry": { - "value": "" - }, "enableNonSslPort": { "value": true }, + "location": { + "value": "" + }, "lock": { "value": { "kind": "CanNotDelete", @@ -274,7 +274,7 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module redis 'br:bicep/modules/cache.redis:1.0.0' = { +module redis 'br/public:avm/res/cache/redis:' = { name: '${uniqueString(deployment().name, location)}-test-crwaf' params: { // Required parameters @@ -295,8 +295,8 @@ module redis 'br:bicep/modules/cache.redis:1.0.0' = { workspaceResourceId: '' } ] - enableDefaultTelemetry: '' enableNonSslPort: true + location: '' lock: { kind: 'CanNotDelete' name: 'myCustomLockName' @@ -374,12 +374,12 @@ module redis 'br:bicep/modules/cache.redis:1.0.0' = { } ] }, - "enableDefaultTelemetry": { - "value": "" - }, "enableNonSslPort": { "value": true }, + "location": { + "value": "" + }, "lock": { "value": { "kind": "CanNotDelete", @@ -461,8 +461,8 @@ module redis 'br:bicep/modules/cache.redis:1.0.0' = { | :-- | :-- | :-- | | [`capacity`](#parameter-capacity) | int | The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4). | | [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | | [`enableNonSslPort`](#parameter-enablenonsslport) | bool | Specifies whether the non-ssl Redis server port (6379) is enabled. | +| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | | [`location`](#parameter-location) | string | The location to deploy the Redis cache service. | | [`lock`](#parameter-lock) | object | The lock settings of the service. | | [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. | @@ -601,21 +601,21 @@ Resource ID of the diagnostic log analytics workspace. For security reasons, it - Required: No - Type: string -### Parameter: `enableDefaultTelemetry` +### Parameter: `enableNonSslPort` -Enable telemetry via a Globally Unique Identifier (GUID). +Specifies whether the non-ssl Redis server port (6379) is enabled. - Required: No - Type: bool -- Default: `True` +- Default: `False` -### Parameter: `enableNonSslPort` +### Parameter: `enableTelemetry` -Specifies whether the non-ssl Redis server port (6379) is enabled. +Enable telemetry via a Globally Unique Identifier (GUID). - Required: No - Type: bool -- Default: `False` +- Default: `True` ### Parameter: `location` @@ -731,7 +731,7 @@ Configuration details for private endpoints. For security reasons, it is recomme | [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. | | [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. | | [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. | -| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. | +| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided. | | [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. | | [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | Array of role assignments to create. | | [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". | @@ -838,7 +838,7 @@ The name of the private endpoint. ### Parameter: `privateEndpoints.privateDnsZoneGroupName` -The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. +The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided. - Required: No - Type: string @@ -1188,7 +1188,7 @@ This section gives you an overview of all local-referenced module files (i.e., o | Reference | Type | | :-- | :-- | -| `modules/network/private-endpoint` | Local reference | +| `br/public:avm/res/network/private-endpoint:0.3.1` | Remote reference | ## Notes diff --git a/avm/res/cache/redis/main.bicep b/avm/res/cache/redis/main.bicep index 12c05f9e79..2e5a8ea4cb 100644 --- a/avm/res/cache/redis/main.bicep +++ b/avm/res/cache/redis/main.bicep @@ -114,8 +114,6 @@ var identity = !empty(managedIdentities) ? { userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null } : null -var enableReferencedModulesTelemetry = false - var builtInRoleNames = { Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') diff --git a/avm/res/cache/redis/main.json b/avm/res/cache/redis/main.json index 90b5617b8a..9b1b223441 100644 --- a/avm/res/cache/redis/main.json +++ b/avm/res/cache/redis/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "10455754336377427456" + "templateHash": "12006824777124262825" }, "name": "Redis Cache", "description": "This module deploys a Redis Cache.", @@ -163,7 +163,7 @@ "type": "string", "nullable": true, "metadata": { - "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided." + "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided." } }, "privateDnsZoneResourceIds": { @@ -185,7 +185,7 @@ "type": "string", "nullable": true, "metadata": { - "description": "Required. Fqdn that resolves to private endpoint ip address." + "description": "Required. Fqdn that resolves to private endpoint IP address." } }, "ipAddresses": { @@ -194,7 +194,7 @@ "type": "string" }, "metadata": { - "description": "Required. A list of private ip addresses of the private endpoint." + "description": "Required. A list of private IP addresses of the private endpoint." } } } @@ -233,7 +233,7 @@ "privateIPAddress": { "type": "string", "metadata": { - "description": "Required. A private ip address obtained from the private endpoint's subnet." + "description": "Required. A private IP address obtained from the private endpoint's subnet." } } }, @@ -596,7 +596,7 @@ "description": "Optional. The diagnostic settings of the service." } }, - "enableDefaultTelemetry": { + "enableTelemetry": { "type": "bool", "defaultValue": true, "metadata": { @@ -608,7 +608,6 @@ "availabilityZones": "[if(equals(parameters('skuName'), 'Premium'), if(parameters('zoneRedundant'), if(not(empty(parameters('zones'))), parameters('zones'), pickZones('Microsoft.Cache', 'redis', parameters('location'), 3)), createArray()), createArray())]", "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]", "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]", - "enableReferencedModulesTelemetry": false, "builtInRoleNames": { "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", @@ -619,17 +618,23 @@ } }, "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", + "avmTelemetry": { + "condition": "[parameters('enableTelemetry')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", + "apiVersion": "2023-07-01", + "name": "[format('46d3xbcp.res.cache-redis.{0}.{1}', replace('-..--..-', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "resources": [] + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } } } }, @@ -726,29 +731,34 @@ }, "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", - "name": "[format('{0}-redis-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]", + "name": "[format('{0}-KeyVault-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]", "properties": { "expressionEvaluationOptions": { "scope": "inner" }, "mode": "Incremental", "parameters": { - "groupIds": { + "privateLinkServiceConnections": { "value": [ - "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'redisCache')]" + { + "name": "[parameters('name')]", + "properties": { + "privateLinkServiceId": "[resourceId('Microsoft.Cache/redis', parameters('name'))]", + "groupIds": [ + "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'redisCache')]" + ] + } + } ] }, "name": { "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.Cache/redis', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'redisCache'), copyIndex()))]" }, - "serviceResourceId": { - "value": "[resourceId('Microsoft.Cache/redis', parameters('name'))]" - }, "subnetResourceId": { "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]" }, - "enableDefaultTelemetry": { - "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]" + "enableTelemetry": { + "value": "[parameters('enableTelemetry')]" }, "location": { "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]" @@ -792,7 +802,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "6873008238043407177" + "templateHash": "2821141217598568122" }, "name": "Private Endpoints", "description": "This module deploys a Private Endpoint.", @@ -807,7 +817,7 @@ "roleDefinitionIdOrName": { "type": "string", "metadata": { - "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead." + "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." } }, "principalId": { @@ -931,6 +941,89 @@ }, "nullable": true }, + "manualPrivateLinkServiceConnectionsType": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "metadata": { + "description": "Required. The name of the private link service connection." + } + }, + "properties": { + "type": "object", + "properties": { + "groupIds": { + "type": "array", + "metadata": { + "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to." + } + }, + "privateLinkServiceId": { + "type": "string", + "metadata": { + "description": "Required. The resource id of private link service." + } + }, + "requestMessage": { + "type": "string", + "metadata": { + "description": "Optional. A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars." + } + } + }, + "metadata": { + "description": "Required. Properties of private link service connection." + } + } + } + }, + "nullable": true + }, + "privateLinkServiceConnectionsType": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "metadata": { + "description": "Required. The name of the private link service connection." + } + }, + "properties": { + "type": "object", + "properties": { + "groupIds": { + "type": "array", + "metadata": { + "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to." + } + }, + "privateLinkServiceId": { + "type": "string", + "metadata": { + "description": "Required. The resource id of private link service." + } + }, + "requestMessage": { + "type": "string", + "nullable": true, + "metadata": { + "description": "Optional. A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars." + } + } + }, + "metadata": { + "description": "Required. Properties of private link service connection." + } + } + } + }, + "nullable": true + }, "customDnsConfigType": { "type": "array", "items": { @@ -969,12 +1062,6 @@ "description": "Required. Resource ID of the subnet where the endpoint needs to be created." } }, - "serviceResourceId": { - "type": "string", - "metadata": { - "description": "Required. Resource ID of the resource that needs to be connected to the network." - } - }, "applicationSecurityGroupResourceIds": { "type": "array", "nullable": true, @@ -991,17 +1078,10 @@ }, "ipConfigurations": { "$ref": "#/definitions/ipConfigurationsType", - "nullable": true, "metadata": { "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints." } }, - "groupIds": { - "type": "array", - "metadata": { - "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to." - } - }, "privateDnsZoneGroupName": { "type": "string", "nullable": true, @@ -1032,7 +1112,7 @@ "roleAssignments": { "$ref": "#/definitions/roleAssignmentType", "metadata": { - "description": "Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." + "description": "Optional. Array of role assignments to create." } }, "tags": { @@ -1044,19 +1124,23 @@ }, "customDnsConfigs": { "$ref": "#/definitions/customDnsConfigType", - "nullable": true, "metadata": { "description": "Optional. Custom DNS configurations." } }, "manualPrivateLinkServiceConnections": { - "type": "array", - "nullable": true, + "$ref": "#/definitions/manualPrivateLinkServiceConnectionsType", "metadata": { - "description": "Optional. Manual PrivateLink Service Connections." + "description": "Optional. A grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource." } }, - "enableDefaultTelemetry": { + "privateLinkServiceConnections": { + "$ref": "#/definitions/privateLinkServiceConnectionsType", + "metadata": { + "description": "Optional. A grouping of information about the connection to the remote resource." + } + }, + "enableTelemetry": { "type": "bool", "defaultValue": true, "metadata": { @@ -1065,7 +1149,6 @@ } }, "variables": { - "enableReferencedModulesTelemetry": false, "builtInRoleNames": { "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]", @@ -1080,17 +1163,23 @@ } }, "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", + "avmTelemetry": { + "condition": "[parameters('enableTelemetry')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", + "apiVersion": "2023-07-01", + "name": "[format('46d3xbcp.res.network-privateendpoint.{0}.{1}', replace('0.3.1', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "resources": [] + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } } } }, @@ -1110,19 +1199,11 @@ } } ], - "customDnsConfigs": "[parameters('customDnsConfigs')]", + "customDnsConfigs": "[coalesce(parameters('customDnsConfigs'), createArray())]", "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]", "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]", "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]", - "privateLinkServiceConnections": [ - { - "name": "[parameters('name')]", - "properties": { - "privateLinkServiceId": "[parameters('serviceResourceId')]", - "groupIds": "[parameters('groupIds')]" - } - } - ], + "privateLinkServiceConnections": "[coalesce(parameters('privateLinkServiceConnections'), createArray())]", "subnet": { "id": "[parameters('subnetResourceId')]" } @@ -1152,7 +1233,7 @@ "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]", "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", + "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", @@ -1183,9 +1264,6 @@ }, "privateEndpointName": { "value": "[parameters('name')]" - }, - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" } }, "template": { @@ -1195,7 +1273,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "17578977753131828304" + "templateHash": "18168683629401652671" }, "name": "Private Endpoint Private DNS Zone Groups", "description": "This module deploys a Private Endpoint Private DNS Zone Group.", @@ -1222,13 +1300,6 @@ "metadata": { "description": "Optional. The name of the private DNS zone group." } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable/Disable usage telemetry for module." - } } }, "variables": { @@ -1246,20 +1317,6 @@ ] }, "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, { "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups", "apiVersion": "2023-04-01", diff --git a/avm/res/compute/disk/README.md b/avm/res/compute/disk/README.md index 3bc00fac1b..6aa74cfad5 100644 --- a/avm/res/compute/disk/README.md +++ b/avm/res/compute/disk/README.md @@ -24,7 +24,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br:bicep/modules/compute.disk:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/compute/disk:`. - [Using only defaults](#example-1-using-only-defaults) - [Image](#example-2-image) @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module disk 'br:bicep/modules/compute.disk:1.0.0' = { +module disk 'br/public:avm/res/compute/disk:' = { name: '${uniqueString(deployment().name, location)}-test-cdmin' params: { // Required parameters @@ -50,7 +50,7 @@ module disk 'br:bicep/modules/compute.disk:1.0.0' = { sku: 'Standard_LRS' // Non-required parameters diskSizeGB: 1 - enableDefaultTelemetry: '' + location: '' } } ``` @@ -78,8 +78,8 @@ module disk 'br:bicep/modules/compute.disk:1.0.0' = { "diskSizeGB": { "value": 1 }, - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" } } } @@ -95,7 +95,7 @@ module disk 'br:bicep/modules/compute.disk:1.0.0' = { via Bicep module ```bicep -module disk 'br:bicep/modules/compute.disk:1.0.0' = { +module disk 'br/public:avm/res/compute/disk:' = { name: '${uniqueString(deployment().name, location)}-test-cdimg' params: { // Required parameters @@ -103,8 +103,8 @@ module disk 'br:bicep/modules/compute.disk:1.0.0' = { sku: 'Standard_LRS' // Non-required parameters createOption: 'FromImage' - enableDefaultTelemetry: '' imageReferenceId: '' + location: '' roleAssignments: [ { principalId: '' @@ -154,12 +154,12 @@ module disk 'br:bicep/modules/compute.disk:1.0.0' = { "createOption": { "value": "FromImage" }, - "enableDefaultTelemetry": { - "value": "" - }, "imageReferenceId": { "value": "" }, + "location": { + "value": "" + }, "roleAssignments": { "value": [ { @@ -200,7 +200,7 @@ module disk 'br:bicep/modules/compute.disk:1.0.0' = { via Bicep module ```bicep -module disk 'br:bicep/modules/compute.disk:1.0.0' = { +module disk 'br/public:avm/res/compute/disk:' = { name: '${uniqueString(deployment().name, location)}-test-cdimp' params: { // Required parameters @@ -208,7 +208,7 @@ module disk 'br:bicep/modules/compute.disk:1.0.0' = { sku: 'Standard_LRS' // Non-required parameters createOption: 'Import' - enableDefaultTelemetry: '' + location: '' roleAssignments: [ { principalId: '' @@ -260,8 +260,8 @@ module disk 'br:bicep/modules/compute.disk:1.0.0' = { "createOption": { "value": "Import" }, - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" }, "roleAssignments": { "value": [ @@ -312,7 +312,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module disk 'br:bicep/modules/compute.disk:1.0.0' = { +module disk 'br/public:avm/res/compute/disk:' = { name: '${uniqueString(deployment().name, location)}-test-cdmax' params: { // Required parameters @@ -322,7 +322,7 @@ module disk 'br:bicep/modules/compute.disk:1.0.0' = { diskIOPSReadWrite: 500 diskMBpsReadWrite: 60 diskSizeGB: 128 - enableDefaultTelemetry: '' + location: '' lock: { kind: 'CanNotDelete' name: 'myCustomLockName' @@ -385,8 +385,8 @@ module disk 'br:bicep/modules/compute.disk:1.0.0' = { "diskSizeGB": { "value": 128 }, - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" }, "lock": { "value": { @@ -446,7 +446,7 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module disk 'br:bicep/modules/compute.disk:1.0.0' = { +module disk 'br/public:avm/res/compute/disk:' = { name: '${uniqueString(deployment().name, location)}-test-cdwaf' params: { // Required parameters @@ -456,7 +456,7 @@ module disk 'br:bicep/modules/compute.disk:1.0.0' = { diskIOPSReadWrite: 500 diskMBpsReadWrite: 60 diskSizeGB: 128 - enableDefaultTelemetry: '' + location: '' lock: { kind: 'CanNotDelete' name: 'myCustomLockName' @@ -502,8 +502,8 @@ module disk 'br:bicep/modules/compute.disk:1.0.0' = { "diskSizeGB": { "value": 128 }, - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" }, "lock": { "value": { @@ -562,7 +562,7 @@ module disk 'br:bicep/modules/compute.disk:1.0.0' = { | [`createOption`](#parameter-createoption) | string | Sources of a disk creation. | | [`diskIOPSReadWrite`](#parameter-diskiopsreadwrite) | int | The number of IOPS allowed for this disk; only settable for UltraSSD disks. | | [`diskMBpsReadWrite`](#parameter-diskmbpsreadwrite) | int | The bandwidth allowed for this disk; only settable for UltraSSD disks. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | +| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | | [`hyperVGeneration`](#parameter-hypervgeneration) | string | The hypervisor generation of the Virtual Machine. Applicable to OS disks only. | | [`imageReferenceId`](#parameter-imagereferenceid) | string | A relative uri containing either a Platform Image Repository or user image reference. | | [`location`](#parameter-location) | string | Resource location. | @@ -701,7 +701,7 @@ The bandwidth allowed for this disk; only settable for UltraSSD disks. - Type: int - Default: `0` -### Parameter: `enableDefaultTelemetry` +### Parameter: `enableTelemetry` Enable telemetry via a Globally Unique Identifier (GUID). diff --git a/avm/res/compute/disk/main.json b/avm/res/compute/disk/main.json index 37e7361de7..741308dfc3 100644 --- a/avm/res/compute/disk/main.json +++ b/avm/res/compute/disk/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "8419179965275134660" + "templateHash": "8431673418740300927" }, "name": "Compute Disks", "description": "This module deploys a Compute Disk", @@ -335,7 +335,7 @@ "description": "Optional. Tags of the availability set resource." } }, - "enableDefaultTelemetry": { + "enableTelemetry": { "type": "bool", "defaultValue": true, "metadata": { @@ -358,17 +358,23 @@ } }, "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", + "avmTelemetry": { + "condition": "[parameters('enableTelemetry')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", + "apiVersion": "2023-07-01", + "name": "[format('46d3xbcp.res.compute-disk.{0}.{1}', replace('-..--..-', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "resources": [] + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } } } }, diff --git a/avm/res/compute/image/README.md b/avm/res/compute/image/README.md index dbfd145add..33c5fc43dc 100644 --- a/avm/res/compute/image/README.md +++ b/avm/res/compute/image/README.md @@ -23,22 +23,57 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br:bicep/modules/compute.image:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/compute/image:`. -- [Using large parameter set](#example-1-using-large-parameter-set) -- [WAF-aligned](#example-2-waf-aligned) +- [Defaults](#example-1-defaults) +- [Max](#example-2-max) +- [Waf-Aligned](#example-3-waf-aligned) -### Example 1: _Using large parameter set_ +### Example 1: _Defaults_ -This instance deploys the module with most of its features enabled. +
+ +via Bicep module + +```bicep +module image 'br/public:avm/res/compute/image:' = { + name: '${uniqueString(deployment().name, location)}-test-cidef' + params: { + name: 'cidef001' + } +} +``` + +
+

+ +

+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "cidef001" + } + } +} +``` +
+

+ +### Example 2: _Max_

via Bicep module ```bicep -module image 'br:bicep/modules/compute.image:1.0.0' = { +module image 'br/public:avm/res/compute/image:' = { name: '${uniqueString(deployment().name, location)}-test-cimax' params: { // Required parameters @@ -50,8 +85,8 @@ module image 'br:bicep/modules/compute.image:1.0.0' = { // Non-required parameters diskEncryptionSetResourceId: '' diskSizeGB: 128 - enableDefaultTelemetry: '' hyperVGeneration: 'V1' + location: '' osState: 'Generalized' roleAssignments: [ { @@ -115,12 +150,12 @@ module image 'br:bicep/modules/compute.image:1.0.0' = { "diskSizeGB": { "value": 128 }, - "enableDefaultTelemetry": { - "value": "" - }, "hyperVGeneration": { "value": "V1" }, + "location": { + "value": "" + }, "osState": { "value": "Generalized" }, @@ -160,17 +195,14 @@ module image 'br:bicep/modules/compute.image:1.0.0' = {

-### Example 2: _WAF-aligned_ - -This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework. - +### Example 3: _Waf-Aligned_

via Bicep module ```bicep -module image 'br:bicep/modules/compute.image:1.0.0' = { +module image 'br/public:avm/res/compute/image:' = { name: '${uniqueString(deployment().name, location)}-test-ciwaf' params: { // Required parameters @@ -182,8 +214,8 @@ module image 'br:bicep/modules/compute.image:1.0.0' = { // Non-required parameters diskEncryptionSetResourceId: '' diskSizeGB: 128 - enableDefaultTelemetry: '' hyperVGeneration: 'V1' + location: '' osState: 'Generalized' tags: { 'hidden-title': 'This is visible in the resource name' @@ -230,12 +262,12 @@ module image 'br:bicep/modules/compute.image:1.0.0' = { "diskSizeGB": { "value": 128 }, - "enableDefaultTelemetry": { - "value": "" - }, "hyperVGeneration": { "value": "V1" }, + "location": { + "value": "" + }, "osState": { "value": "Generalized" }, @@ -274,7 +306,7 @@ module image 'br:bicep/modules/compute.image:1.0.0' = { | [`dataDisks`](#parameter-datadisks) | array | Specifies the parameters that are used to add a data disk to a virtual machine. | | [`diskEncryptionSetResourceId`](#parameter-diskencryptionsetresourceid) | string | Specifies the customer managed disk encryption set resource ID for the managed image disk. | | [`diskSizeGB`](#parameter-disksizegb) | int | Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | +| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | | [`extendedLocation`](#parameter-extendedlocation) | object | The extended location of the Image. | | [`hyperVGeneration`](#parameter-hypervgeneration) | string | Gets the HyperVGenerationType of the VirtualMachine created from the image. - V1 or V2. | | [`location`](#parameter-location) | string | Location for all resources. | @@ -333,7 +365,7 @@ Specifies the size of empty data disks in gigabytes. This element can be used to - Type: int - Default: `128` -### Parameter: `enableDefaultTelemetry` +### Parameter: `enableTelemetry` Enable telemetry via a Globally Unique Identifier (GUID). diff --git a/avm/res/compute/image/main.json b/avm/res/compute/image/main.json index b3099a9dec..3bc9aec995 100644 --- a/avm/res/compute/image/main.json +++ b/avm/res/compute/image/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "6473488393825855372" + "templateHash": "9039111988355192698" }, "name": "Images", "description": "This module deploys a Compute Image.", @@ -205,7 +205,7 @@ "description": "Optional. Specifies the parameters that are used to add a data disk to a virtual machine." } }, - "enableDefaultTelemetry": { + "enableTelemetry": { "type": "bool", "defaultValue": true, "metadata": { @@ -223,17 +223,23 @@ } }, "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", + "avmTelemetry": { + "condition": "[parameters('enableTelemetry')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", + "apiVersion": "2023-07-01", + "name": "[format('46d3xbcp.res.compute-image.{0}.{1}', replace('-..--..-', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "resources": [] + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } } } }, diff --git a/avm/res/compute/image/tests/e2e/defaults/main.test.bicep b/avm/res/compute/image/tests/e2e/defaults/main.test.bicep new file mode 100644 index 0000000000..655aa61422 --- /dev/null +++ b/avm/res/compute/image/tests/e2e/defaults/main.test.bicep @@ -0,0 +1,45 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // + +@description('Optional. The name of the resource group to deploy for testing purposes.') +@maxLength(90) +// e.g., for a module 'network/private-endpoint' you could use 'dep-dev-network.privateendpoints-${serviceShort}-rg' +param resourceGroupName string = 'dep-${namePrefix}---${serviceShort}-rg' + +@description('Optional. The location to deploy resources to.') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') +// e.g., for a module 'network/private-endpoint' you could use 'npe' as a prefix and then 'waf' as a suffix for the waf-aligned test +param serviceShort string = 'cidef' + +@description('Optional. A token to inject into the name of each resource. This value can be automatically injected by the CI.') +param namePrefix string = '#_namePrefix_#' + +// ============ // +// Dependencies // +// ============ // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +// ============== // +// Test Execution // +// ============== // + +@batchSize(1) +module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + params: { + // You parameters go here + name: '${namePrefix}${serviceShort}001' + } +}] diff --git a/avm/res/consumption/budget/README.md b/avm/res/consumption/budget/README.md index 27a7dbedeb..6e955e668b 100644 --- a/avm/res/consumption/budget/README.md +++ b/avm/res/consumption/budget/README.md @@ -22,23 +22,20 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br:bicep/modules/consumption.budget:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/consumption/budget:`. -- [Using only defaults](#example-1-using-only-defaults) +- [Defaults](#example-1-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) -- [WAF-aligned](#example-3-waf-aligned) - -### Example 1: _Using only defaults_ - -This instance deploys the module with the minimum set of required parameters. +- [Waf-Aligned](#example-3-waf-aligned) +### Example 1: _Defaults_
via Bicep module ```bicep -module budget 'br:bicep/modules/consumption.budget:1.0.0' = { +module budget 'br/public:avm/res/consumption/budget:' = { name: '${uniqueString(deployment().name)}-test-cbmin' params: { // Required parameters @@ -48,7 +45,7 @@ module budget 'br:bicep/modules/consumption.budget:1.0.0' = { contactEmails: [ 'dummy@contoso.com' ] - enableDefaultTelemetry: '' + location: '' } } ``` @@ -78,8 +75,8 @@ module budget 'br:bicep/modules/consumption.budget:1.0.0' = { "dummy@contoso.com" ] }, - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" } } } @@ -98,7 +95,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module budget 'br:bicep/modules/consumption.budget:1.0.0' = { +module budget 'br/public:avm/res/consumption/budget:' = { name: '${uniqueString(deployment().name)}-test-cbmax' params: { // Required parameters @@ -108,7 +105,7 @@ module budget 'br:bicep/modules/consumption.budget:1.0.0' = { contactEmails: [ 'dummy@contoso.com' ] - enableDefaultTelemetry: '' + location: '' thresholds: [ 50 75 @@ -145,8 +142,8 @@ module budget 'br:bicep/modules/consumption.budget:1.0.0' = { "dummy@contoso.com" ] }, - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" }, "thresholds": { "value": [ @@ -164,17 +161,14 @@ module budget 'br:bicep/modules/consumption.budget:1.0.0' = {

-### Example 3: _WAF-aligned_ - -This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework. - +### Example 3: _Waf-Aligned_

via Bicep module ```bicep -module budget 'br:bicep/modules/consumption.budget:1.0.0' = { +module budget 'br/public:avm/res/consumption/budget:' = { name: '${uniqueString(deployment().name)}-test-cbwaf' params: { // Required parameters @@ -184,7 +178,7 @@ module budget 'br:bicep/modules/consumption.budget:1.0.0' = { contactEmails: [ 'dummy@contoso.com' ] - enableDefaultTelemetry: '' + location: '' thresholds: [ 50 75 @@ -221,8 +215,8 @@ module budget 'br:bicep/modules/consumption.budget:1.0.0' = { "dummy@contoso.com" ] }, - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" }, "thresholds": { "value": [ @@ -263,7 +257,7 @@ module budget 'br:bicep/modules/consumption.budget:1.0.0' = { | Parameter | Type | Description | | :-- | :-- | :-- | | [`category`](#parameter-category) | string | The category of the budget, whether the budget tracks cost or usage. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | +| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | | [`endDate`](#parameter-enddate) | string | The end date for the budget. If not provided, it will default to 10 years from the start date. | | [`location`](#parameter-location) | string | Location deployment metadata. | | [`resetPeriod`](#parameter-resetperiod) | string | The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers. | @@ -323,7 +317,7 @@ The category of the budget, whether the budget tracks cost or usage. ] ``` -### Parameter: `enableDefaultTelemetry` +### Parameter: `enableTelemetry` Enable telemetry via a Globally Unique Identifier (GUID). diff --git a/avm/res/consumption/budget/main.json b/avm/res/consumption/budget/main.json index 31a5523934..8d5f9ea8f9 100644 --- a/avm/res/consumption/budget/main.json +++ b/avm/res/consumption/budget/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "10861664842554589267" + "templateHash": "6182258303963233923" }, "name": "Consumption Budgets", "description": "This module deploys a Consumption Budget for Subscriptions.", @@ -99,7 +99,7 @@ "description": "Conditional. List of action group resource IDs that will receive the alert. Required if neither `contactEmails` nor `contactEmails` was provided." } }, - "enableDefaultTelemetry": { + "enableTelemetry": { "type": "bool", "defaultValue": true, "metadata": { @@ -136,17 +136,22 @@ }, "resources": [ { - "condition": "[parameters('enableDefaultTelemetry')]", + "condition": "[parameters('enableTelemetry')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "location": "[parameters('location')]", + "apiVersion": "2023-07-01", + "name": "[format('46d3xbcp.res.consumption-budget.{0}.{1}', replace('-..--..-', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "resources": [] + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } } } }, diff --git a/avm/res/data-protection/backup-vault/README.md b/avm/res/data-protection/backup-vault/README.md index 3744f13387..a463e0cbe5 100644 --- a/avm/res/data-protection/backup-vault/README.md +++ b/avm/res/data-protection/backup-vault/README.md @@ -26,7 +26,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br:bicep/modules/data-protection.backup-vault:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/data-protection/backup-vault:`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -42,13 +42,13 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module backupVault 'br:bicep/modules/data-protection.backup-vault:1.0.0' = { +module backupVault 'br/public:avm/res/data-protection/backup-vault:' = { name: '${uniqueString(deployment().name, location)}-test-dpbvmin' params: { // Required parameters name: 'dpbvmin001' // Non-required parameters - enableDefaultTelemetry: '' + location: '' } } ``` @@ -70,8 +70,8 @@ module backupVault 'br:bicep/modules/data-protection.backup-vault:1.0.0' = { "value": "dpbvmin001" }, // Non-required parameters - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" } } } @@ -90,7 +90,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module backupVault 'br:bicep/modules/data-protection.backup-vault:1.0.0' = { +module backupVault 'br/public:avm/res/data-protection/backup-vault:' = { name: '${uniqueString(deployment().name, location)}-test-dpbvmax' params: { // Required parameters @@ -159,7 +159,7 @@ module backupVault 'br:bicep/modules/data-protection.backup-vault:1.0.0' = { } } ] - enableDefaultTelemetry: '' + location: '' lock: { kind: 'CanNotDelete' name: 'myCustomLockName' @@ -277,8 +277,8 @@ module backupVault 'br:bicep/modules/data-protection.backup-vault:1.0.0' = { } ] }, - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" }, "lock": { "value": { @@ -334,7 +334,7 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module backupVault 'br:bicep/modules/data-protection.backup-vault:1.0.0' = { +module backupVault 'br/public:avm/res/data-protection/backup-vault:' = { name: '${uniqueString(deployment().name, location)}-test-dpbvwaf' params: { // Required parameters @@ -403,7 +403,7 @@ module backupVault 'br:bicep/modules/data-protection.backup-vault:1.0.0' = { } } ] - enableDefaultTelemetry: '' + location: '' lock: { kind: 'CanNotDelete' name: 'myCustomLockName' @@ -504,8 +504,8 @@ module backupVault 'br:bicep/modules/data-protection.backup-vault:1.0.0' = { } ] }, - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" }, "lock": { "value": { @@ -548,7 +548,7 @@ module backupVault 'br:bicep/modules/data-protection.backup-vault:1.0.0' = { | [`azureMonitorAlertSettingsAlertsForAllJobFailures`](#parameter-azuremonitoralertsettingsalertsforalljobfailures) | string | Settings for Azure Monitor based alerts for job failures. | | [`backupPolicies`](#parameter-backuppolicies) | array | List of all backup policies. | | [`dataStoreType`](#parameter-datastoretype) | string | The datastore type to use. ArchiveStore does not support ZoneRedundancy. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | +| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | | [`featureSettings`](#parameter-featuresettings) | object | Feature settings for the backup vault. | | [`location`](#parameter-location) | string | Location for all resources. | | [`lock`](#parameter-lock) | object | The lock settings of the service. | @@ -604,7 +604,7 @@ The datastore type to use. ArchiveStore does not support ZoneRedundancy. ] ``` -### Parameter: `enableDefaultTelemetry` +### Parameter: `enableTelemetry` Enable telemetry via a Globally Unique Identifier (GUID). diff --git a/avm/res/data-protection/backup-vault/main.json b/avm/res/data-protection/backup-vault/main.json index 487583bb38..c5e0f0f727 100644 --- a/avm/res/data-protection/backup-vault/main.json +++ b/avm/res/data-protection/backup-vault/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "11737453267233569722" + "templateHash": "6830132536079831372" }, "name": "Data Protection Backup Vaults", "description": "This module deploys a Data Protection Backup Vault.", @@ -125,7 +125,7 @@ "description": "Required. Name of the Backup Vault." } }, - "enableDefaultTelemetry": { + "enableTelemetry": { "type": "bool", "defaultValue": true, "metadata": { @@ -223,7 +223,6 @@ }, "variables": { "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), 'SystemAssigned', null())), null())]", - "enableReferencedModulesTelemetry": false, "builtInRoleNames": { "Backup Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5e467623-bb1f-42f4-a55d-6e525e11384b')]", "Backup Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00c29273-979b-4161-815c-10b084fb9324')]", @@ -236,17 +235,23 @@ } }, "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", + "avmTelemetry": { + "condition": "[parameters('enableTelemetry')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", + "apiVersion": "2023-07-01", + "name": "[format('46d3xbcp.res.dataprotection-backupvault.{0}.{1}', replace('-..--..-', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "resources": [] + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } } } }, @@ -331,9 +336,6 @@ }, "properties": { "value": "[parameters('backupPolicies')[copyIndex()].properties]" - }, - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" } }, "template": { @@ -343,7 +345,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "3378438498887899064" + "templateHash": "9679092928668541836" }, "name": "Data Protection Backup Vault Backup Policies", "description": "This module deploys a Data Protection Backup Vault Backup Policy.", @@ -369,30 +371,9 @@ "metadata": { "description": "Optional. The properties of the backup policy." } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } } }, "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, { "type": "Microsoft.DataProtection/backupVaults/backupPolicies", "apiVersion": "2023-05-01", diff --git a/avm/res/databricks/access-connector/README.md b/avm/res/databricks/access-connector/README.md index ba68a44a37..bc1f487b71 100644 --- a/avm/res/databricks/access-connector/README.md +++ b/avm/res/databricks/access-connector/README.md @@ -24,7 +24,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br:bicep/modules/databricks.access-connector:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/databricks/access-connector:`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -40,13 +40,13 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module accessConnector 'br:bicep/modules/databricks.access-connector:1.0.0' = { +module accessConnector 'br/public:avm/res/databricks/access-connector:' = { name: '${uniqueString(deployment().name, location)}-test-dacmin' params: { // Required parameters name: 'dacmin001' // Non-required parameters - enableDefaultTelemetry: '' + location: '' } } ``` @@ -68,8 +68,8 @@ module accessConnector 'br:bicep/modules/databricks.access-connector:1.0.0' = { "value": "dacmin001" }, // Non-required parameters - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" } } } @@ -88,13 +88,12 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module accessConnector 'br:bicep/modules/databricks.access-connector:1.0.0' = { +module accessConnector 'br/public:avm/res/databricks/access-connector:' = { name: '${uniqueString(deployment().name, location)}-test-dacmax' params: { // Required parameters name: 'dacmax001' // Non-required parameters - enableDefaultTelemetry: '' location: '' lock: { kind: 'CanNotDelete' @@ -149,9 +148,6 @@ module accessConnector 'br:bicep/modules/databricks.access-connector:1.0.0' = { "value": "dacmax001" }, // Non-required parameters - "enableDefaultTelemetry": { - "value": "" - }, "location": { "value": "" }, @@ -212,13 +208,12 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module accessConnector 'br:bicep/modules/databricks.access-connector:1.0.0' = { +module accessConnector 'br/public:avm/res/databricks/access-connector:' = { name: '${uniqueString(deployment().name, location)}-test-dacwaf' params: { // Required parameters name: 'dacwaf001' // Non-required parameters - enableDefaultTelemetry: '' location: '' lock: { kind: 'CanNotDelete' @@ -256,9 +251,6 @@ module accessConnector 'br:bicep/modules/databricks.access-connector:1.0.0' = { "value": "dacwaf001" }, // Non-required parameters - "enableDefaultTelemetry": { - "value": "" - }, "location": { "value": "" }, @@ -303,7 +295,7 @@ module accessConnector 'br:bicep/modules/databricks.access-connector:1.0.0' = { | Parameter | Type | Description | | :-- | :-- | :-- | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | +| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | | [`location`](#parameter-location) | string | Location for all Resources. | | [`lock`](#parameter-lock) | object | The lock settings of the service. | | [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. | @@ -317,7 +309,7 @@ The name of the Azure Databricks access connector to create. - Required: Yes - Type: string -### Parameter: `enableDefaultTelemetry` +### Parameter: `enableTelemetry` Enable telemetry via a Globally Unique Identifier (GUID). diff --git a/avm/res/databricks/access-connector/main.json b/avm/res/databricks/access-connector/main.json index dce724ef4b..b55b4ceff1 100644 --- a/avm/res/databricks/access-connector/main.json +++ b/avm/res/databricks/access-connector/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "3245638906962144809" + "templateHash": "394207615675999827" }, "name": "Azure Databricks Access Connectors", "description": "This module deploys an Azure Databricks Access Connector.", @@ -167,7 +167,7 @@ "description": "Optional. The managed identity definition for this resource." } }, - "enableDefaultTelemetry": { + "enableTelemetry": { "type": "bool", "defaultValue": true, "metadata": { @@ -187,17 +187,23 @@ } }, "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", + "avmTelemetry": { + "condition": "[parameters('enableTelemetry')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", + "apiVersion": "2023-07-01", + "name": "[format('46d3xbcp.res.databricks-accessconnector.{0}.{1}', replace('-..--..-', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "resources": [] + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } } } }, diff --git a/avm/res/databricks/workspace/README.md b/avm/res/databricks/workspace/README.md index a6502ad9f6..0b9a5f72f1 100644 --- a/avm/res/databricks/workspace/README.md +++ b/avm/res/databricks/workspace/README.md @@ -28,7 +28,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br:bicep/modules/databricks.workspace:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/databricks/workspace:`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -44,13 +44,13 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module workspace 'br:bicep/modules/databricks.workspace:1.0.0' = { +module workspace 'br/public:avm/res/databricks/workspace:' = { name: '${uniqueString(deployment().name, location)}-test-dwmin' params: { // Required parameters name: 'dwmin001' // Non-required parameters - enableDefaultTelemetry: '' + location: '' } } ``` @@ -72,8 +72,8 @@ module workspace 'br:bicep/modules/databricks.workspace:1.0.0' = { "value": "dwmin001" }, // Non-required parameters - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" } } } @@ -92,7 +92,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module workspace 'br:bicep/modules/databricks.workspace:1.0.0' = { +module workspace 'br/public:avm/res/databricks/workspace:' = { name: '${uniqueString(deployment().name, location)}-test-dwmax' params: { // Required parameters @@ -129,7 +129,6 @@ module workspace 'br:bicep/modules/databricks.workspace:1.0.0' = { } ] disablePublicIp: true - enableDefaultTelemetry: '' loadBalancerBackendPoolName: '' loadBalancerResourceId: '' location: '' @@ -250,9 +249,6 @@ module workspace 'br:bicep/modules/databricks.workspace:1.0.0' = { "disablePublicIp": { "value": true }, - "enableDefaultTelemetry": { - "value": "" - }, "loadBalancerBackendPoolName": { "value": "" }, @@ -358,7 +354,7 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module workspace 'br:bicep/modules/databricks.workspace:1.0.0' = { +module workspace 'br/public:avm/res/databricks/workspace:' = { name: '${uniqueString(deployment().name, location)}-test-dwwaf' params: { // Required parameters @@ -395,7 +391,6 @@ module workspace 'br:bicep/modules/databricks.workspace:1.0.0' = { } ] disablePublicIp: true - enableDefaultTelemetry: '' loadBalancerBackendPoolName: '' loadBalancerResourceId: '' location: '' @@ -499,9 +494,6 @@ module workspace 'br:bicep/modules/databricks.workspace:1.0.0' = { "disablePublicIp": { "value": true }, - "enableDefaultTelemetry": { - "value": "" - }, "loadBalancerBackendPoolName": { "value": "" }, @@ -599,7 +591,7 @@ module workspace 'br:bicep/modules/databricks.workspace:1.0.0' = { | [`customVirtualNetworkResourceId`](#parameter-customvirtualnetworkresourceid) | string | The resource ID of a Virtual Network where this Databricks Cluster should be created. | | [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. | | [`disablePublicIp`](#parameter-disablepublicip) | bool | Disable Public IP. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | +| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | | [`loadBalancerBackendPoolName`](#parameter-loadbalancerbackendpoolname) | string | Name of the outbound Load Balancer Backend Pool for Secure Cluster Connectivity (No Public IP). | | [`loadBalancerResourceId`](#parameter-loadbalancerresourceid) | string | Resource URI of Outbound Load balancer for Secure Cluster Connectivity (No Public IP) workspace. | | [`location`](#parameter-location) | string | Location for all Resources. | @@ -855,7 +847,7 @@ Disable Public IP. - Type: bool - Default: `False` -### Parameter: `enableDefaultTelemetry` +### Parameter: `enableTelemetry` Enable telemetry via a Globally Unique Identifier (GUID). @@ -973,7 +965,7 @@ Configuration details for private endpoints. For security reasons, it is recomme | [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. | | [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. | | [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. | -| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. | +| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided. | | [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. | | [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | Array of role assignments to create. | | [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". | @@ -1080,7 +1072,7 @@ The name of the private endpoint. ### Parameter: `privateEndpoints.privateDnsZoneGroupName` -The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. +The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided. - Required: No - Type: string @@ -1393,7 +1385,7 @@ This section gives you an overview of all local-referenced module files (i.e., o | Reference | Type | | :-- | :-- | -| `modules/network/private-endpoint` | Local reference | +| `br/public:avm/res/network/private-endpoint:0.3.1` | Remote reference | ## Notes diff --git a/avm/res/databricks/workspace/main.bicep b/avm/res/databricks/workspace/main.bicep index 70ce6634d2..81d6f4fa46 100644 --- a/avm/res/databricks/workspace/main.bicep +++ b/avm/res/databricks/workspace/main.bicep @@ -99,8 +99,6 @@ param requiredNsgRules string = 'AllRules' @description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.') param privateEndpoints privateEndpointType -var enableReferencedModulesTelemetry = false - var builtInRoleNames = { Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') diff --git a/avm/res/databricks/workspace/main.json b/avm/res/databricks/workspace/main.json index 47a19aa465..4444ba4674 100644 --- a/avm/res/databricks/workspace/main.json +++ b/avm/res/databricks/workspace/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "17678709403904494263" + "templateHash": "14087130830480205215" }, "name": "Azure Databricks Workspaces", "description": "This module deploys an Azure Databricks Workspace.", @@ -140,7 +140,7 @@ "type": "string", "nullable": true, "metadata": { - "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided." + "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided." } }, "privateDnsZoneResourceIds": { @@ -162,7 +162,7 @@ "type": "string", "nullable": true, "metadata": { - "description": "Required. Fqdn that resolves to private endpoint ip address." + "description": "Required. Fqdn that resolves to private endpoint IP address." } }, "ipAddresses": { @@ -171,7 +171,7 @@ "type": "string" }, "metadata": { - "description": "Required. A list of private ip addresses of the private endpoint." + "description": "Required. A list of private IP addresses of the private endpoint." } } } @@ -210,7 +210,7 @@ "privateIPAddress": { "type": "string", "metadata": { - "description": "Required. A private ip address obtained from the private endpoint's subnet." + "description": "Required. A private IP address obtained from the private endpoint's subnet." } } }, @@ -497,7 +497,7 @@ "description": "Optional. Tags of the resource." } }, - "enableDefaultTelemetry": { + "enableTelemetry": { "type": "bool", "defaultValue": true, "metadata": { @@ -644,7 +644,6 @@ } }, "variables": { - "enableReferencedModulesTelemetry": false, "builtInRoleNames": { "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", @@ -678,17 +677,23 @@ "cMKManagedDiskKeyVault" ] }, - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", + "avmTelemetry": { + "condition": "[parameters('enableTelemetry')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", + "apiVersion": "2023-07-01", + "name": "[format('46d3xbcp.res.databricks-workspace.{0}.{1}', replace('-..--..-', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "resources": [] + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } } } }, @@ -796,29 +801,34 @@ }, "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", - "name": "[format('{0}-workspace-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]", + "name": "[format('{0}-KeyVault-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]", "properties": { "expressionEvaluationOptions": { "scope": "inner" }, "mode": "Incremental", "parameters": { - "groupIds": { + "privateLinkServiceConnections": { "value": [ - "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'databricks_ui_api')]" + { + "name": "[parameters('name')]", + "properties": { + "privateLinkServiceId": "[resourceId('Microsoft.Databricks/workspaces', parameters('name'))]", + "groupIds": [ + "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'databricks_ui_api')]" + ] + } + } ] }, "name": { "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.Databricks/workspaces', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'databricks_ui_api'), copyIndex()))]" }, - "serviceResourceId": { - "value": "[resourceId('Microsoft.Databricks/workspaces', parameters('name'))]" - }, "subnetResourceId": { "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]" }, - "enableDefaultTelemetry": { - "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]" + "enableTelemetry": { + "value": "[parameters('enableTelemetry')]" }, "location": { "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]" @@ -862,7 +872,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "6873008238043407177" + "templateHash": "2821141217598568122" }, "name": "Private Endpoints", "description": "This module deploys a Private Endpoint.", @@ -877,7 +887,7 @@ "roleDefinitionIdOrName": { "type": "string", "metadata": { - "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead." + "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." } }, "principalId": { @@ -1001,6 +1011,89 @@ }, "nullable": true }, + "manualPrivateLinkServiceConnectionsType": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "metadata": { + "description": "Required. The name of the private link service connection." + } + }, + "properties": { + "type": "object", + "properties": { + "groupIds": { + "type": "array", + "metadata": { + "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to." + } + }, + "privateLinkServiceId": { + "type": "string", + "metadata": { + "description": "Required. The resource id of private link service." + } + }, + "requestMessage": { + "type": "string", + "metadata": { + "description": "Optional. A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars." + } + } + }, + "metadata": { + "description": "Required. Properties of private link service connection." + } + } + } + }, + "nullable": true + }, + "privateLinkServiceConnectionsType": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "metadata": { + "description": "Required. The name of the private link service connection." + } + }, + "properties": { + "type": "object", + "properties": { + "groupIds": { + "type": "array", + "metadata": { + "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to." + } + }, + "privateLinkServiceId": { + "type": "string", + "metadata": { + "description": "Required. The resource id of private link service." + } + }, + "requestMessage": { + "type": "string", + "nullable": true, + "metadata": { + "description": "Optional. A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars." + } + } + }, + "metadata": { + "description": "Required. Properties of private link service connection." + } + } + } + }, + "nullable": true + }, "customDnsConfigType": { "type": "array", "items": { @@ -1039,12 +1132,6 @@ "description": "Required. Resource ID of the subnet where the endpoint needs to be created." } }, - "serviceResourceId": { - "type": "string", - "metadata": { - "description": "Required. Resource ID of the resource that needs to be connected to the network." - } - }, "applicationSecurityGroupResourceIds": { "type": "array", "nullable": true, @@ -1061,17 +1148,10 @@ }, "ipConfigurations": { "$ref": "#/definitions/ipConfigurationsType", - "nullable": true, "metadata": { "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints." } }, - "groupIds": { - "type": "array", - "metadata": { - "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to." - } - }, "privateDnsZoneGroupName": { "type": "string", "nullable": true, @@ -1102,7 +1182,7 @@ "roleAssignments": { "$ref": "#/definitions/roleAssignmentType", "metadata": { - "description": "Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." + "description": "Optional. Array of role assignments to create." } }, "tags": { @@ -1114,19 +1194,23 @@ }, "customDnsConfigs": { "$ref": "#/definitions/customDnsConfigType", - "nullable": true, "metadata": { "description": "Optional. Custom DNS configurations." } }, "manualPrivateLinkServiceConnections": { - "type": "array", - "nullable": true, + "$ref": "#/definitions/manualPrivateLinkServiceConnectionsType", "metadata": { - "description": "Optional. Manual PrivateLink Service Connections." + "description": "Optional. A grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource." } }, - "enableDefaultTelemetry": { + "privateLinkServiceConnections": { + "$ref": "#/definitions/privateLinkServiceConnectionsType", + "metadata": { + "description": "Optional. A grouping of information about the connection to the remote resource." + } + }, + "enableTelemetry": { "type": "bool", "defaultValue": true, "metadata": { @@ -1135,7 +1219,6 @@ } }, "variables": { - "enableReferencedModulesTelemetry": false, "builtInRoleNames": { "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]", @@ -1150,17 +1233,23 @@ } }, "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", + "avmTelemetry": { + "condition": "[parameters('enableTelemetry')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", + "apiVersion": "2023-07-01", + "name": "[format('46d3xbcp.res.network-privateendpoint.{0}.{1}', replace('0.3.1', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "resources": [] + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } } } }, @@ -1180,19 +1269,11 @@ } } ], - "customDnsConfigs": "[parameters('customDnsConfigs')]", + "customDnsConfigs": "[coalesce(parameters('customDnsConfigs'), createArray())]", "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]", "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]", "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]", - "privateLinkServiceConnections": [ - { - "name": "[parameters('name')]", - "properties": { - "privateLinkServiceId": "[parameters('serviceResourceId')]", - "groupIds": "[parameters('groupIds')]" - } - } - ], + "privateLinkServiceConnections": "[coalesce(parameters('privateLinkServiceConnections'), createArray())]", "subnet": { "id": "[parameters('subnetResourceId')]" } @@ -1222,7 +1303,7 @@ "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]", "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", + "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", @@ -1253,9 +1334,6 @@ }, "privateEndpointName": { "value": "[parameters('name')]" - }, - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" } }, "template": { @@ -1265,7 +1343,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "17578977753131828304" + "templateHash": "18168683629401652671" }, "name": "Private Endpoint Private DNS Zone Groups", "description": "This module deploys a Private Endpoint Private DNS Zone Group.", @@ -1292,13 +1370,6 @@ "metadata": { "description": "Optional. The name of the private DNS zone group." } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable/Disable usage telemetry for module." - } } }, "variables": { @@ -1316,20 +1387,6 @@ ] }, "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, { "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups", "apiVersion": "2023-04-01", diff --git a/avm/res/db-for-my-sql/flexible-server/README.md b/avm/res/db-for-my-sql/flexible-server/README.md index bdbfbf4aa1..b62c12a34c 100644 --- a/avm/res/db-for-my-sql/flexible-server/README.md +++ b/avm/res/db-for-my-sql/flexible-server/README.md @@ -28,11 +28,12 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br:bicep/modules/db-for-my-sql.flexible-server:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/db-for-my-sql/flexible-server:`. - [Using only defaults](#example-1-using-only-defaults) - [Private](#example-2-private) - [Public](#example-3-public) +- [Waf-Aligned](#example-4-waf-aligned) ### Example 1: _Using only defaults_ @@ -44,7 +45,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = { +module flexibleServer 'br/public:avm/res/db-for-my-sql/flexible-server:' = { name: '${uniqueString(deployment().name, location)}-test-dfmsfsmin' params: { // Required parameters @@ -54,7 +55,7 @@ module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = { // Non-required parameters administratorLogin: 'adminUserName' administratorLoginPassword: '' - enableDefaultTelemetry: '' + location: '' } } ``` @@ -88,8 +89,8 @@ module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = { "administratorLoginPassword": { "value": "" }, - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" } } } @@ -105,7 +106,7 @@ module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = { via Bicep module ```bicep -module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = { +module flexibleServer 'br/public:avm/res/db-for-my-sql/flexible-server:' = { name: '${uniqueString(deployment().name, location)}-test-dfmsfspvt' params: { // Required parameters @@ -143,7 +144,6 @@ module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = { workspaceResourceId: '' } ] - enableDefaultTelemetry: '' highAvailability: 'SameZone' location: '' lock: { @@ -253,9 +253,6 @@ module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = { } ] }, - "enableDefaultTelemetry": { - "value": "" - }, "highAvailability": { "value": "SameZone" }, @@ -330,7 +327,7 @@ module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = { via Bicep module ```bicep -module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = { +module flexibleServer 'br/public:avm/res/db-for-my-sql/flexible-server:' = { name: '${uniqueString(deployment().name, location)}-test-dfmsfsp' params: { // Required parameters @@ -376,7 +373,6 @@ module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = { workspaceResourceId: '' } ] - enableDefaultTelemetry: '' firewallRules: [ { endIpAddress: '0.0.0.0' @@ -505,9 +501,6 @@ module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = { } ] }, - "enableDefaultTelemetry": { - "value": "" - }, "firewallRules": { "value": [ { @@ -588,6 +581,43 @@ module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = {

+### Example 4: _Waf-Aligned_ + +

+ +via Bicep module + +```bicep +module flexibleServer 'br/public:avm/res/db-for-my-sql/flexible-server:' = { + name: '${uniqueString(deployment().name, location)}-test-dfmsfswaf' + params: { + name: 'dfmsfswaf001' + } +} +``` + +
+

+ +

+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "dfmsfswaf001" + } + } +} +``` + +
+

+ ## Parameters @@ -624,7 +654,7 @@ module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = { | [`databases`](#parameter-databases) | array | The databases to create in the server. | | [`delegatedSubnetResourceId`](#parameter-delegatedsubnetresourceid) | string | Delegated subnet arm resource ID. Used when the desired connectivity mode is "Private Access" - virtual network integration. Delegation must be enabled on the subnet for MySQL Flexible Servers and subnet CIDR size is /29. | | [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | +| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | | [`firewallRules`](#parameter-firewallrules) | array | The firewall rules to create in the MySQL flexible server. | | [`geoRedundantBackup`](#parameter-georedundantbackup) | string | A value indicating whether Geo-Redundant backup is enabled on the server. If "Enabled" and "cMKKeyName" is not empty, then "geoBackupCMKKeyVaultResourceId" and "cMKUserAssignedIdentityResourceId" are also required. | | [`highAvailability`](#parameter-highavailability) | string | The mode for High Availability (HA). It is not supported for the Burstable pricing tier and Zone redundant HA can only be set during server provisioning. | @@ -998,7 +1028,7 @@ Resource ID of the diagnostic log analytics workspace. For security reasons, it - Required: No - Type: string -### Parameter: `enableDefaultTelemetry` +### Parameter: `enableTelemetry` Enable telemetry via a Globally Unique Identifier (GUID). diff --git a/avm/res/db-for-my-sql/flexible-server/main.json b/avm/res/db-for-my-sql/flexible-server/main.json index 5d63ee48ca..40d415eff2 100644 --- a/avm/res/db-for-my-sql/flexible-server/main.json +++ b/avm/res/db-for-my-sql/flexible-server/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "13509958318011769977" + "templateHash": "9454239676460003107" }, "name": "DBforMySQL Flexible Servers", "description": "This module deploys a DBforMySQL Flexible Server.", @@ -533,7 +533,7 @@ "description": "Optional. The diagnostic settings of the service." } }, - "enableDefaultTelemetry": { + "enableTelemetry": { "type": "bool", "defaultValue": true, "metadata": { @@ -544,7 +544,6 @@ "variables": { "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]", "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null()), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]", - "enableReferencedModulesTelemetry": false, "builtInRoleNames": { "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", "MySQL Backup And Export Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd18ad5f3-1baf-4119-b49b-d944edb1f9d0')]", @@ -579,17 +578,23 @@ "cMKGeoKeyVault" ] }, - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", + "avmTelemetry": { + "condition": "[parameters('enableTelemetry')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", + "apiVersion": "2023-07-01", + "name": "[format('46d3xbcp.res.dbformysql-flexibleserver.{0}.{1}', replace('-..--..-', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "resources": [] + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } } } }, @@ -754,10 +759,7 @@ "value": "[parameters('name')]" }, "collation": "[if(contains(parameters('databases')[copyIndex()], 'collation'), createObject('value', parameters('databases')[copyIndex()].collation), createObject('value', ''))]", - "charset": "[if(contains(parameters('databases')[copyIndex()], 'charset'), createObject('value', parameters('databases')[copyIndex()].charset), createObject('value', ''))]", - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" - } + "charset": "[if(contains(parameters('databases')[copyIndex()], 'charset'), createObject('value', parameters('databases')[copyIndex()].charset), createObject('value', ''))]" }, "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", @@ -766,7 +768,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "7585808247826533259" + "templateHash": "4885810309374527606" }, "name": "DBforMySQL Flexible Server Databases", "description": "This module deploys a DBforMySQL Flexible Server Database.", @@ -798,37 +800,9 @@ "metadata": { "description": "Optional. The charset of the database." } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Location for all resources." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } } }, "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, { "type": "Microsoft.DBforMySQL/flexibleServers/databases", "apiVersion": "2022-01-01", @@ -893,9 +867,6 @@ }, "endIpAddress": { "value": "[parameters('firewallRules')[copyIndex()].endIpAddress]" - }, - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" } }, "template": { @@ -905,7 +876,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "9889972221731602451" + "templateHash": "5525339023784252205" }, "name": "DBforMySQL Flexible Server Firewall Rules", "description": "This module deploys a DBforMySQL Flexible Server Firewall Rule.", @@ -935,30 +906,9 @@ "metadata": { "description": "Conditional. The name of the parent MySQL flexible server. Required if the template is used in a standalone deployment." } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } } }, "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, { "type": "Microsoft.DBforMySQL/flexibleServers/firewallRules", "apiVersion": "2022-01-01", @@ -1033,7 +983,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "8863151548145849170" + "templateHash": "12048235018035722270" }, "name": "DBforMySQL Flexible Server Administrators", "description": "This module deploys a DBforMySQL Flexible Server Administrator.", @@ -1070,37 +1020,9 @@ "metadata": { "description": "Optional. The tenantId of the Active Directory administrator." } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Location for all resources." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } } }, "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, { "type": "Microsoft.DBforMySQL/flexibleServers/administrators", "apiVersion": "2022-01-01", diff --git a/avm/res/db-for-my-sql/flexible-server/tests/e2e/waf-aligned/main.test.bicep b/avm/res/db-for-my-sql/flexible-server/tests/e2e/waf-aligned/main.test.bicep new file mode 100644 index 0000000000..1c3183493c --- /dev/null +++ b/avm/res/db-for-my-sql/flexible-server/tests/e2e/waf-aligned/main.test.bicep @@ -0,0 +1,45 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // + +@description('Optional. The name of the resource group to deploy for testing purposes.') +@maxLength(90) +// e.g., for a module 'network/private-endpoint' you could use 'dep-dev-network.privateendpoints-${serviceShort}-rg' +param resourceGroupName string = 'dep-${namePrefix}---${serviceShort}-rg' + +@description('Optional. The location to deploy resources to.') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') +// e.g., for a module 'network/private-endpoint' you could use 'npe' as a prefix and then 'waf' as a suffix for the waf-aligned test +param serviceShort string = 'dfmsfswaf' + +@description('Optional. A token to inject into the name of each resource. This value can be automatically injected by the CI.') +param namePrefix string = '#_namePrefix_#' + +// ============ // +// Dependencies // +// ============ // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +// ============== // +// Test Execution // +// ============== // + +@batchSize(1) +module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + params: { + // You parameters go here + name: '${namePrefix}${serviceShort}001' + } +}] diff --git a/avm/res/health-bot/health-bot/README.md b/avm/res/health-bot/health-bot/README.md index 3b796cfb65..77e0fddafa 100644 --- a/avm/res/health-bot/health-bot/README.md +++ b/avm/res/health-bot/health-bot/README.md @@ -24,7 +24,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br:bicep/modules/health-bot.health-bot:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/health-bot/health-bot:`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -40,14 +40,14 @@ This instance deploys the module with the minimum set of required parameters.

via Bicep module ```bicep -module healthBot 'br:bicep/modules/health-bot.health-bot:1.0.0' = { +module healthBot 'br/public:avm/res/health-bot/health-bot:' = { name: '${uniqueString(deployment().name, location)}-test-hbhbmin' params: { // Required parameters name: 'hbhbmin001' sku: 'F0' // Non-required parameters - enableDefaultTelemetry: '' + location: '' } } ``` @@ -72,8 +72,8 @@ module healthBot 'br:bicep/modules/health-bot.health-bot:1.0.0' = { "value": "F0" }, // Non-required parameters - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" } } } @@ -92,14 +92,14 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module healthBot 'br:bicep/modules/health-bot.health-bot:1.0.0' = { +module healthBot 'br/public:avm/res/health-bot/health-bot:' = { name: '${uniqueString(deployment().name, location)}-test-hbhbmax' params: { // Required parameters name: 'hbhbmax001' sku: 'F0' // Non-required parameters - enableDefaultTelemetry: '' + location: '' lock: { kind: 'CanNotDelete' name: 'myCustomLockName' @@ -155,8 +155,8 @@ module healthBot 'br:bicep/modules/health-bot.health-bot:1.0.0' = { "value": "F0" }, // Non-required parameters - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" }, "lock": { "value": { @@ -214,14 +214,14 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module healthBot 'br:bicep/modules/health-bot.health-bot:1.0.0' = { +module healthBot 'br/public:avm/res/health-bot/health-bot:' = { name: '${uniqueString(deployment().name, location)}-test-hbhbwaf' params: { // Required parameters name: 'hbhbwaf001' sku: 'F0' // Non-required parameters - enableDefaultTelemetry: '' + location: '' lock: { kind: 'CanNotDelete' name: 'myCustomLockName' @@ -260,8 +260,8 @@ module healthBot 'br:bicep/modules/health-bot.health-bot:1.0.0' = { "value": "F0" }, // Non-required parameters - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" }, "lock": { "value": { @@ -304,7 +304,7 @@ module healthBot 'br:bicep/modules/health-bot.health-bot:1.0.0' = { | Parameter | Type | Description | | :-- | :-- | :-- | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | +| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | | [`location`](#parameter-location) | string | Location for all resources. | | [`lock`](#parameter-lock) | object | The lock settings of the service. | | [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. | @@ -333,7 +333,7 @@ The name of the Azure Health Bot SKU. ] ``` -### Parameter: `enableDefaultTelemetry` +### Parameter: `enableTelemetry` Enable telemetry via a Globally Unique Identifier (GUID). diff --git a/avm/res/health-bot/health-bot/main.json b/avm/res/health-bot/health-bot/main.json index 538d2d760a..f2fa5f7eb1 100644 --- a/avm/res/health-bot/health-bot/main.json +++ b/avm/res/health-bot/health-bot/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "582765600236650029" + "templateHash": "15987244695395932464" }, "name": "Azure Health Bots", "description": "This module deploys an Azure Health Bot.", @@ -170,7 +170,7 @@ "description": "Optional. Tags of the resource." } }, - "enableDefaultTelemetry": { + "enableTelemetry": { "type": "bool", "defaultValue": true, "metadata": { @@ -190,17 +190,23 @@ } }, "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", + "avmTelemetry": { + "condition": "[parameters('enableTelemetry')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", + "apiVersion": "2023-07-01", + "name": "[format('46d3xbcp.res.healthbot-healthbot.{0}.{1}', replace('-..--..-', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "resources": [] + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } } } }, diff --git a/avm/res/health-bot/health-bot/version.json b/avm/res/health-bot/health-bot/version.json new file mode 100644 index 0000000000..8def869ede --- /dev/null +++ b/avm/res/health-bot/health-bot/version.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", + "version": "0.1", + "pathFilters": [ + "./main.json" + ] +} diff --git a/avm/res/net-app/net-app-account/README.md b/avm/res/net-app/net-app-account/README.md index c0fdd19a6e..3e4cae9c70 100644 --- a/avm/res/net-app/net-app-account/README.md +++ b/avm/res/net-app/net-app-account/README.md @@ -26,11 +26,12 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br:bicep/modules/net-app.net-app-account:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/net-app/net-app-account:`. - [Using only defaults](#example-1-using-only-defaults) - [Nfs3](#example-2-nfs3) - [Nfs41](#example-3-nfs41) +- [Waf-Aligned](#example-4-waf-aligned) ### Example 1: _Using only defaults_ @@ -42,13 +43,13 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = { +module netAppAccount 'br/public:avm/res/net-app/net-app-account:' = { name: '${uniqueString(deployment().name, location)}-test-nanaamin' params: { // Required parameters name: 'nanaamin001' // Non-required parameters - enableDefaultTelemetry: '' + location: '' } } ``` @@ -70,8 +71,8 @@ module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = { "value": "nanaamin001" }, // Non-required parameters - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" } } } @@ -87,7 +88,7 @@ module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = { via Bicep module ```bicep -module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = { +module netAppAccount 'br/public:avm/res/net-app/net-app-account:' = { name: '${uniqueString(deployment().name, location)}-test-nanaanfs3' params: { // Required parameters @@ -155,7 +156,7 @@ module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = { volumes: [] } ] - enableDefaultTelemetry: '' + location: '' lock: { kind: 'CanNotDelete' name: 'myCustomLockName' @@ -271,8 +272,8 @@ module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = { } ] }, - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" }, "lock": { "value": { @@ -324,7 +325,7 @@ module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = { via Bicep module ```bicep -module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = { +module netAppAccount 'br/public:avm/res/net-app/net-app-account:' = { name: '${uniqueString(deployment().name, location)}-test-nanaanfs41' params: { // Required parameters @@ -402,7 +403,7 @@ module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = { volumes: [] } ] - enableDefaultTelemetry: '' + location: '' managedIdentities: { userAssignedResourceIds: [ '' @@ -529,8 +530,8 @@ module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = { } ] }, - "enableDefaultTelemetry": { - "value": "" + "location": { + "value": "" }, "managedIdentities": { "value": { @@ -576,6 +577,43 @@ module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = {

+### Example 4: _Waf-Aligned_ + +

+ +via Bicep module + +```bicep +module netAppAccount 'br/public:avm/res/net-app/net-app-account:' = { + name: '${uniqueString(deployment().name, location)}-test-nanaawaf' + params: { + name: 'nanaawaf001' + } +} +``` + +
+

+ +

+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "nanaawaf001" + } + } +} +``` + +
+

+ ## Parameters @@ -595,7 +633,7 @@ module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = { | [`domainJoinPassword`](#parameter-domainjoinpassword) | securestring | Required if domainName is specified. Password of the user specified in domainJoinUser parameter. | | [`domainJoinUser`](#parameter-domainjoinuser) | string | Required if domainName is specified. Username of Active Directory domain administrator, with permissions to create SMB server machine account in the AD domain. | | [`domainName`](#parameter-domainname) | string | Fully Qualified Active Directory DNS Domain Name (e.g. 'contoso.com'). | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | +| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | | [`location`](#parameter-location) | string | Location for all resources. | | [`lock`](#parameter-lock) | object | The lock settings of the service. | | [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. | @@ -658,7 +696,7 @@ Fully Qualified Active Directory DNS Domain Name (e.g. 'contoso.com'). - Type: string - Default: `''` -### Parameter: `enableDefaultTelemetry` +### Parameter: `enableTelemetry` Enable telemetry via a Globally Unique Identifier (GUID). diff --git a/avm/res/net-app/net-app-account/capacity-pool/main.bicep b/avm/res/net-app/net-app-account/capacity-pool/main.bicep index ba9c73ac8f..51dd53b329 100644 --- a/avm/res/net-app/net-app-account/capacity-pool/main.bicep +++ b/avm/res/net-app/net-app-account/capacity-pool/main.bicep @@ -49,11 +49,6 @@ param roleAssignments roleAssignmentType ]) param encryptionType string = 'Single' -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableTelemetry bool = true - -var enableReferencedModulesTelemetry = false - var builtInRoleNames = { Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') @@ -62,24 +57,6 @@ var builtInRoleNames = { 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9') } -resource avmTelemetry 'Microsoft.Resources/deployments@2023-07-01' = if (enableTelemetry) { - name: '46d3xbcp.res.netapp-netappaccount.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name, location), 0, 4)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - outputs: { - telemetry: { - type: 'String' - value: 'For more information, see https://aka.ms/avm/TelemetryInfo' - } - } - } - } -} - resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2022-11-01' existing = { name: netAppAccountName } diff --git a/avm/res/net-app/net-app-account/capacity-pool/version.json b/avm/res/net-app/net-app-account/capacity-pool/version.json deleted file mode 100644 index 96236a61ba..0000000000 --- a/avm/res/net-app/net-app-account/capacity-pool/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.4", - "pathFilters": [ - "./main.json" - ] -} diff --git a/avm/res/net-app/net-app-account/main.bicep b/avm/res/net-app/net-app-account/main.bicep index 3c06547974..76b7ff8caa 100644 --- a/avm/res/net-app/net-app-account/main.bicep +++ b/avm/res/net-app/net-app-account/main.bicep @@ -42,6 +42,9 @@ param lock lockType @description('Optional. Tags for all resources.') param tags object? +@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') +param enableTelemetry bool = true + var activeDirectoryConnectionProperties = [ { username: !empty(domainName) ? domainJoinUser : null @@ -69,7 +72,7 @@ var builtInRoleNames = { } resource avmTelemetry 'Microsoft.Resources/deployments@2023-07-01' = if (enableTelemetry) { - name: '46d3xbcp.res.network-networksecuritygroup.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name, location), 0, 4)}' + name: '46d3xbcp.res.netapp-netappaccount.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name, location), 0, 4)}' properties: { mode: 'Incremental' template: { diff --git a/avm/res/net-app/net-app-account/main.json b/avm/res/net-app/net-app-account/main.json index 862b3c67db..ef054cec6e 100644 --- a/avm/res/net-app/net-app-account/main.json +++ b/avm/res/net-app/net-app-account/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "8081072067801758787" + "templateHash": "16523658267969007487" }, "name": "Azure NetApp Files", "description": "This module deploys an Azure NetApp File.", @@ -208,7 +208,7 @@ "description": "Optional. Tags for all resources." } }, - "enableDefaultTelemetry": { + "enableTelemetry": { "type": "bool", "defaultValue": true, "metadata": { @@ -217,7 +217,6 @@ } }, "variables": { - "enableReferencedModulesTelemetry": false, "activeDirectoryConnectionProperties": [ { "username": "[if(not(empty(parameters('domainName'))), parameters('domainJoinUser'), null())]", @@ -239,17 +238,23 @@ } }, "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", + "avmTelemetry": { + "condition": "[parameters('enableTelemetry')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", + "apiVersion": "2023-07-01", + "name": "[format('46d3xbcp.res.netapp-netappaccount.{0}.{1}', replace('-..--..-', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", - "resources": [] + "resources": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } } } }, @@ -334,9 +339,6 @@ "encryptionType": "[if(contains(parameters('capacityPools')[copyIndex()], 'encryptionType'), createObject('value', parameters('capacityPools')[copyIndex()].encryptionType), createObject('value', 'Single'))]", "tags": { "value": "[coalesce(tryGet(parameters('capacityPools')[copyIndex()], 'tags'), parameters('tags'))]" - }, - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" } }, "template": { @@ -347,7 +349,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "15353329491336313807" + "templateHash": "13567874697839927577" }, "name": "Azure NetApp Files Capacity Pools", "description": "This module deploys an Azure NetApp Files Capacity Pool.", @@ -508,17 +510,9 @@ "metadata": { "description": "Optional. Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool." } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } } }, "variables": { - "enableReferencedModulesTelemetry": false, "builtInRoleNames": { "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", @@ -528,20 +522,6 @@ } }, "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, "netAppAccount": { "existing": true, "type": "Microsoft.NetApp/netAppAccounts", @@ -627,10 +607,7 @@ "value": "[parameters('volumes')[copyIndex()].subnetResourceId]" }, "exportPolicyRules": "[if(contains(parameters('volumes')[copyIndex()], 'exportPolicyRules'), createObject('value', parameters('volumes')[copyIndex()].exportPolicyRules), createObject('value', createArray()))]", - "roleAssignments": "[if(contains(parameters('volumes')[copyIndex()], 'roleAssignments'), createObject('value', parameters('volumes')[copyIndex()].roleAssignments), createObject('value', createArray()))]", - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" - } + "roleAssignments": "[if(contains(parameters('volumes')[copyIndex()], 'roleAssignments'), createObject('value', parameters('volumes')[copyIndex()].roleAssignments), createObject('value', createArray()))]" }, "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", @@ -640,7 +617,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "3662331312918191126" + "templateHash": "13281702213100562603" }, "name": "Azure NetApp Files Capacity Pool Volumes", "description": "This module deploys an Azure NetApp Files Capacity Pool Volume.", @@ -791,13 +768,6 @@ "metadata": { "description": "Optional. Array of role assignments to create." } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } } }, "variables": { @@ -819,20 +789,6 @@ "netAppAccount" ] }, - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, "netAppAccount": { "existing": true, "type": "Microsoft.NetApp/netAppAccounts", diff --git a/avm/res/net-app/net-app-account/tests/e2e/waf-aligned/main.test.bicep b/avm/res/net-app/net-app-account/tests/e2e/waf-aligned/main.test.bicep new file mode 100644 index 0000000000..6b4ddb0e4e --- /dev/null +++ b/avm/res/net-app/net-app-account/tests/e2e/waf-aligned/main.test.bicep @@ -0,0 +1,45 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // + +@description('Optional. The name of the resource group to deploy for testing purposes.') +@maxLength(90) +// e.g., for a module 'network/private-endpoint' you could use 'dep-dev-network.privateendpoints-${serviceShort}-rg' +param resourceGroupName string = 'dep-${namePrefix}---${serviceShort}-rg' + +@description('Optional. The location to deploy resources to.') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') +// e.g., for a module 'network/private-endpoint' you could use 'npe' as a prefix and then 'waf' as a suffix for the waf-aligned test +param serviceShort string = 'nanaawaf' + +@description('Optional. A token to inject into the name of each resource. This value can be automatically injected by the CI.') +param namePrefix string = '#_namePrefix_#' + +// ============ // +// Dependencies // +// ============ // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +// ============== // +// Test Execution // +// ============== // + +@batchSize(1) +module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + params: { + // You parameters go here + name: '${namePrefix}${serviceShort}001' + } +}]