diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e2ab1172d0..d5e9d5a17d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -48,6 +48,7 @@ /avm/res/app-configuration/configuration-store/ @Azure/avm-res-appconfiguration-configurationstore-module-owners-bicep @Azure/avm-module-reviewers-bicep /avm/res/automation/automation-account/ @Azure/avm-res-automation-automationaccount-module-owners-bicep @Azure/avm-module-reviewers-bicep /avm/res/azure-stack-hci/cluster/ @Azure/avm-res-azurestackhci-cluster-module-owners-bicep @Azure/avm-module-reviewers-bicep +/avm/res/azure-stack-hci/virtual-hard-disk/ @Azure/avm-res-azurestackhci-virtualharddisk-module-owners-bicep @Azure/avm-module-reviewers-bicep /avm/res/batch/batch-account/ @Azure/avm-res-batch-batchaccount-module-owners-bicep @Azure/avm-module-reviewers-bicep /avm/res/cache/redis/ @Azure/avm-res-cache-redis-module-owners-bicep @Azure/avm-module-reviewers-bicep /avm/res/cdn/profile/ @Azure/avm-res-cdn-profile-module-owners-bicep @Azure/avm-module-reviewers-bicep diff --git a/.github/ISSUE_TEMPLATE/avm_module_issue.yml b/.github/ISSUE_TEMPLATE/avm_module_issue.yml index 871a9782a5..78513ec324 100644 --- a/.github/ISSUE_TEMPLATE/avm_module_issue.yml +++ b/.github/ISSUE_TEMPLATE/avm_module_issue.yml @@ -83,6 +83,7 @@ body: - "avm/res/app/session-pool" - "avm/res/automation/automation-account" - "avm/res/azure-stack-hci/cluster" + - "avm/res/azure-stack-hci/virtual-hard-disk" - "avm/res/batch/batch-account" - "avm/res/cache/redis" - "avm/res/cdn/profile" diff --git a/.github/actions/templates/avm-validateModuleDeployment/action.yml b/.github/actions/templates/avm-validateModuleDeployment/action.yml index f127041711..842f08d721 100644 --- a/.github/actions/templates/avm-validateModuleDeployment/action.yml +++ b/.github/actions/templates/avm-validateModuleDeployment/action.yml @@ -75,6 +75,7 @@ runs: $exceptionModulePaths = @( 'avm/ptn/lz/sub-vending' # Failing on resource deletion when trying to delete RBAC at subscription level (hub-spoke test) 'avm/res/azure-stack-hci/cluster' # Failing on resource deletion when trying to delete RBAC at subscription level + 'avm/res/azure-stack-hci/virtual-hard-disk' # Failing on resource deletion when trying to delete RBAC at subscription level 'avm/res/compute/image' # Failing on resource deletion when trying to delete RBAC at subscription level 'avm/res/compute/disk' # Failing on resource deletion when trying to delete RBAC at subscription level 'avm/ptn/virtual-machine-images/azure-image-builder' # Failing on resource deletion when trying to delete RBAC at subscription level diff --git a/.github/workflows/avm.res.azure-stack-hci.virtual-hard-disk.yml b/.github/workflows/avm.res.azure-stack-hci.virtual-hard-disk.yml new file mode 100644 index 0000000000..bc2c707991 --- /dev/null +++ b/.github/workflows/avm.res.azure-stack-hci.virtual-hard-disk.yml @@ -0,0 +1,93 @@ +name: "avm.res.azure-stack-hci.virtual-hard-disk" + + +on: + workflow_dispatch: + inputs: + staticValidation: + type: boolean + description: "Execute static validation" + required: false + default: true + deploymentValidation: + type: boolean + description: "Execute deployment validation" + required: false + default: true + removeDeployment: + type: boolean + description: "Remove deployed module" + required: false + default: true + customLocation: + type: string + description: "Default location overwrite (e.g., eastus)" + required: false + push: + branches: + - main + paths: + - ".github/actions/templates/avm-**" + - ".github/workflows/avm.template.module.yml" + - ".github/workflows/avm.res.azure-stack-hci.virtual-hard-disk.yml" + - "avm/res/azure-stack-hci/virtual-hard-disk/**" + - "avm/utilities/pipelines/**" + - "!avm/utilities/pipelines/platform/**" + - "!*/**/README.md" + + +env: + modulePath: "avm/res/azure-stack-hci/virtual-hard-disk" + workflowPath: ".github/workflows/avm.res.azure-stack-hci.virtual-hard-disk.yml" + + +concurrency: + group: ${{ github.workflow }} + + +jobs: + ########################### + # Initialize pipeline # + ########################### + job_initialize_pipeline: + runs-on: ubuntu-latest + name: "Initialize pipeline" + steps: + - name: "Checkout" + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: "Set input parameters to output variables" + id: get-workflow-param + uses: ./.github/actions/templates/avm-getWorkflowInput + with: + workflowPath: "${{ env.workflowPath}}" + - name: "Get module test file paths" + id: get-module-test-file-paths + uses: ./.github/actions/templates/avm-getModuleTestFiles + with: + modulePath: "${{ env.modulePath }}" + outputs: + workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} + moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} + modulePath: "${{ env.modulePath }}" + + + ############################## + # Call reusable workflow # + ############################## + call-workflow-passing-data: + name: "Run" + permissions: + id-token: write # For OIDC + contents: write # For release tags + needs: + - job_initialize_pipeline + uses: ./.github/workflows/avm.template.module.yml + with: + workflowInput: "${{ needs.job_initialize_pipeline.outputs.workflowInput }}" + moduleTestFilePaths: "${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}" + psRuleModuleTestFilePaths: "${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}" + modulePath: "${{ needs.job_initialize_pipeline.outputs.modulePath}}" + secrets: inherit diff --git a/avm/res/azure-stack-hci/virtual-hard-disk/README.md b/avm/res/azure-stack-hci/virtual-hard-disk/README.md new file mode 100644 index 0000000000..7331117035 --- /dev/null +++ b/avm/res/azure-stack-hci/virtual-hard-disk/README.md @@ -0,0 +1,408 @@ +# Azure Stack HCI Virtual Hard Disk `[Microsoft.AzureStackHCI/virtualHardDisks]` + +This module deploys an Azure Stack HCI virtual hard disk. + +## Navigation + +- [Resource Types](#Resource-Types) +- [Usage examples](#Usage-examples) +- [Parameters](#Parameters) +- [Outputs](#Outputs) +- [Cross-referenced modules](#Cross-referenced-modules) +- [Data Collection](#Data-Collection) + +## Resource Types + +| Resource Type | API Version | +| :-- | :-- | +| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) | +| `Microsoft.AzureStackHCI/virtualHardDisks` | [2024-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.AzureStackHCI/2024-05-01-preview/virtualHardDisks) | + +## Usage examples + +The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository. + +>**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/public:avm/res/azure-stack-hci/virtual-hard-disk:`. + +- [Using only defaults](#example-1-using-only-defaults) +- [WAF-aligned](#example-2-waf-aligned) + +### Example 1: _Using only defaults_ + +This instance deploys the module with the minimum set of required parameters. + + +
+ +via Bicep module + +```bicep +module virtualHardDisk 'br/public:avm/res/azure-stack-hci/virtual-hard-disk:' = { + name: 'virtualHardDiskDeployment' + params: { + // Required parameters + customLocationId: '' + diskSizeGB: 4 + dynamic: false + name: 'ashvhdminvhd' + // Non-required parameters + location: '' + } +} +``` + +
+

+ +

+ +via JSON parameters file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + // Required parameters + "customLocationId": { + "value": "" + }, + "diskSizeGB": { + "value": 4 + }, + "dynamic": { + "value": false + }, + "name": { + "value": "ashvhdminvhd" + }, + // Non-required parameters + "location": { + "value": "" + } + } +} +``` + +
+

+ +

+ +via Bicep parameters file + +```bicep-params +using 'br/public:avm/res/azure-stack-hci/virtual-hard-disk:' + +// Required parameters +param customLocationId = '' +param diskSizeGB = 4 +param dynamic = false +param name = 'ashvhdminvhd' +// Non-required parameters +param location = '' +``` + +
+

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

+ +via Bicep module + +```bicep +module virtualHardDisk 'br/public:avm/res/azure-stack-hci/virtual-hard-disk:' = { + name: 'virtualHardDiskDeployment' + params: { + // Required parameters + customLocationId: '' + diskSizeGB: 4 + dynamic: true + name: 'ashvhdwafvhd' + // Non-required parameters + location: '' + tags: { + Environment: 'Non-Prod' + 'hidden-title': 'This is visible in the resource name' + Role: 'DeploymentValidation' + } + } +} +``` + +
+

+ +

+ +via JSON parameters file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + // Required parameters + "customLocationId": { + "value": "" + }, + "diskSizeGB": { + "value": 4 + }, + "dynamic": { + "value": true + }, + "name": { + "value": "ashvhdwafvhd" + }, + // Non-required parameters + "location": { + "value": "" + }, + "tags": { + "value": { + "Environment": "Non-Prod", + "hidden-title": "This is visible in the resource name", + "Role": "DeploymentValidation" + } + } + } +} +``` + +
+

+ +

+ +via Bicep parameters file + +```bicep-params +using 'br/public:avm/res/azure-stack-hci/virtual-hard-disk:' + +// Required parameters +param customLocationId = '' +param diskSizeGB = 4 +param dynamic = true +param name = 'ashvhdwafvhd' +// Non-required parameters +param location = '' +param tags = { + Environment: 'Non-Prod' + 'hidden-title': 'This is visible in the resource name' + Role: 'DeploymentValidation' +} +``` + +
+

+ +## Parameters + +**Required parameters** + +| Parameter | Type | Description | +| :-- | :-- | :-- | +| [`customLocationId`](#parameter-customlocationid) | string | Resource ID of the associated custom location. | +| [`diskSizeGB`](#parameter-disksizegb) | int | The size of the disk in GB. | +| [`dynamic`](#parameter-dynamic) | bool | The disk type. | +| [`name`](#parameter-name) | string | Name of the resource to create. | + +**Optional parameters** + +| Parameter | Type | Description | +| :-- | :-- | :-- | +| [`containerId`](#parameter-containerid) | string | The container ID. | +| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable/Disable usage telemetry for module. | +| [`location`](#parameter-location) | string | Location for all Resources. | +| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. | +| [`tags`](#parameter-tags) | object | Tags of the resource. | + +### Parameter: `customLocationId` + +Resource ID of the associated custom location. + +- Required: Yes +- Type: string + +### Parameter: `diskSizeGB` + +The size of the disk in GB. + +- Required: Yes +- Type: int + +### Parameter: `dynamic` + +The disk type. + +- Required: Yes +- Type: bool + +### Parameter: `name` + +Name of the resource to create. + +- Required: Yes +- Type: string + +### Parameter: `containerId` + +The container ID. + +- Required: No +- Type: string + +### Parameter: `enableTelemetry` + +Enable/Disable usage telemetry for module. + +- Required: No +- Type: bool +- Default: `True` + +### Parameter: `location` + +Location for all Resources. + +- Required: No +- Type: string +- Default: `[resourceGroup().location]` + +### Parameter: `roleAssignments` + +Array of role assignments to create. + +- Required: No +- Type: array +- Roles configurable by name: + - `'Contributor'` + - `'Owner'` + - `'Reader'` + - `'User Access Administrator'` + - `'Role Based Access Control Administrator (Preview)'` + +**Required parameters** + +| Parameter | Type | Description | +| :-- | :-- | :-- | +| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. | +| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | 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'. | + +**Optional parameters** + +| Parameter | Type | Description | +| :-- | :-- | :-- | +| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container". | +| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. | +| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. | +| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. | +| [`name`](#parameter-roleassignmentsname) | string | The name (as GUID) of the role assignment. If not provided, a GUID will be generated. | +| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. | + +### Parameter: `roleAssignments.principalId` + +The principal ID of the principal (user/group/identity) to assign the role to. + +- Required: Yes +- Type: string + +### Parameter: `roleAssignments.roleDefinitionIdOrName` + +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'. + +- Required: Yes +- Type: string + +### Parameter: `roleAssignments.condition` + +The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container". + +- Required: No +- Type: string + +### Parameter: `roleAssignments.conditionVersion` + +Version of the condition. + +- Required: No +- Type: string +- Allowed: + ```Bicep + [ + '2.0' + ] + ``` + +### Parameter: `roleAssignments.delegatedManagedIdentityResourceId` + +The Resource Id of the delegated managed identity resource. + +- Required: No +- Type: string + +### Parameter: `roleAssignments.description` + +The description of the role assignment. + +- Required: No +- Type: string + +### Parameter: `roleAssignments.name` + +The name (as GUID) of the role assignment. If not provided, a GUID will be generated. + +- Required: No +- Type: string + +### Parameter: `roleAssignments.principalType` + +The principal type of the assigned principal ID. + +- Required: No +- Type: string +- Allowed: + ```Bicep + [ + 'Device' + 'ForeignGroup' + 'Group' + 'ServicePrincipal' + 'User' + ] + ``` + +### Parameter: `tags` + +Tags of the resource. + +- Required: No +- Type: object + +## Outputs + +| Output | Type | Description | +| :-- | :-- | :-- | +| `location` | string | The location of the virtual hard disk. | +| `name` | string | The name of the virtual hard disk. | +| `resourceGroupName` | string | The resource group of the virtual hard disk. | +| `resourceId` | string | The resource ID of the virtual hard disk. | + +## Cross-referenced modules + +This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs). + +| Reference | Type | +| :-- | :-- | +| `br/public:avm/utl/types/avm-common-types:0.5.1` | Remote reference | + +## Data Collection + +The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the [repository](https://aka.ms/avm/telemetry). There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at . You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices. diff --git a/avm/res/azure-stack-hci/virtual-hard-disk/main.bicep b/avm/res/azure-stack-hci/virtual-hard-disk/main.bicep new file mode 100644 index 0000000000..7534499247 --- /dev/null +++ b/avm/res/azure-stack-hci/virtual-hard-disk/main.bicep @@ -0,0 +1,126 @@ +metadata name = 'Azure Stack HCI Virtual Hard Disk' +metadata description = 'This module deploys an Azure Stack HCI virtual hard disk.' + +@description('Required. Name of the resource to create.') +param name string + +@description('Optional. Location for all Resources.') +param location string = resourceGroup().location + +@description('Optional. Tags of the resource.') +param tags object? + +@description('Required. Resource ID of the associated custom location.') +param customLocationId string + +@description('Optional. Enable/Disable usage telemetry for module.') +param enableTelemetry bool = true + +@description('Required. The size of the disk in GB.') +param diskSizeGB int + +@description('Required. The disk type.') +param dynamic bool + +@description('Optional. The container ID.') +param containerId string? + +import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.5.1' +@description('Optional. Array of role assignments to create.') +param roleAssignments roleAssignmentType[]? + +var builtInRoleNames = { + // Add other relevant built-in roles here for your resource as per BCPNFR5 + Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') + Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') + Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') + 'User Access Administrator': subscriptionResourceId( + 'Microsoft.Authorization/roleDefinitions', + '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9' + ) + 'Role Based Access Control Administrator (Preview)': subscriptionResourceId( + 'Microsoft.Authorization/roleDefinitions', + 'f58310d9-a9f6-439a-9e8d-f62e7b41a168' + ) +} + +var formattedRoleAssignments = [ + for (roleAssignment, index) in (roleAssignments ?? []): union(roleAssignment, { + roleDefinitionId: builtInRoleNames[?roleAssignment.roleDefinitionIdOrName] ?? (contains( + roleAssignment.roleDefinitionIdOrName, + '/providers/Microsoft.Authorization/roleDefinitions/' + ) + ? roleAssignment.roleDefinitionIdOrName + : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)) + }) +] + +// ============== // +// Resources // +// ============== // + +#disable-next-line no-deployments-resources +resource avmTelemetry 'Microsoft.Resources/deployments@2024-03-01' = if (enableTelemetry) { + name: '46d3xbcp.res.azurestackhci-virtualharddisk.${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 virtualHardDisk 'Microsoft.AzureStackHCI/virtualHardDisks@2024-05-01-preview' = { + name: name + tags: tags + extendedLocation: { + type: 'CustomLocation' + name: customLocationId + } + location: location + properties: { + diskSizeGB: diskSizeGB + dynamic: dynamic + containerId: containerId + } +} + +resource virtualHardDisk_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [ + for (roleAssignment, index) in (formattedRoleAssignments ?? []): { + name: roleAssignment.?name ?? guid(virtualHardDisk.id, roleAssignment.principalId, roleAssignment.roleDefinitionId) + properties: { + roleDefinitionId: roleAssignment.roleDefinitionId + principalId: roleAssignment.principalId + description: roleAssignment.?description + principalType: roleAssignment.?principalType + condition: roleAssignment.?condition + conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set + delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId + } + scope: virtualHardDisk + } +] + +// ============ // +// Outputs // +// ============ // + +@description('The name of the virtual hard disk.') +output name string = virtualHardDisk.name + +@description('The resource ID of the virtual hard disk.') +output resourceId string = virtualHardDisk.id + +@description('The resource group of the virtual hard disk.') +output resourceGroupName string = resourceGroup().name + +@description('The location of the virtual hard disk.') +output location string = virtualHardDisk.location diff --git a/avm/res/azure-stack-hci/virtual-hard-disk/main.json b/avm/res/azure-stack-hci/virtual-hard-disk/main.json new file mode 100644 index 0000000000..a0f7e29b4a --- /dev/null +++ b/avm/res/azure-stack-hci/virtual-hard-disk/main.json @@ -0,0 +1,261 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "languageVersion": "2.0", + "contentVersion": "1.0.0.0", + "metadata": { + "_generator": { + "name": "bicep", + "version": "0.32.4.45862", + "templateHash": "11860310236188549637" + }, + "name": "Azure Stack HCI Virtual Hard Disk", + "description": "This module deploys an Azure Stack HCI virtual hard disk." + }, + "definitions": { + "roleAssignmentType": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "metadata": { + "description": "Optional. The name (as GUID) of the role assignment. If not provided, a GUID will be generated." + } + }, + "roleDefinitionIdOrName": { + "type": "string", + "metadata": { + "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": { + "type": "string", + "metadata": { + "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." + } + }, + "principalType": { + "type": "string", + "allowedValues": [ + "Device", + "ForeignGroup", + "Group", + "ServicePrincipal", + "User" + ], + "nullable": true, + "metadata": { + "description": "Optional. The principal type of the assigned principal ID." + } + }, + "description": { + "type": "string", + "nullable": true, + "metadata": { + "description": "Optional. The description of the role assignment." + } + }, + "condition": { + "type": "string", + "nullable": true, + "metadata": { + "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"." + } + }, + "conditionVersion": { + "type": "string", + "allowedValues": [ + "2.0" + ], + "nullable": true, + "metadata": { + "description": "Optional. Version of the condition." + } + }, + "delegatedManagedIdentityResourceId": { + "type": "string", + "nullable": true, + "metadata": { + "description": "Optional. The Resource Id of the delegated managed identity resource." + } + } + }, + "metadata": { + "description": "An AVM-aligned type for a role assignment.", + "__bicep_imported_from!": { + "sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.5.1" + } + } + } + }, + "parameters": { + "name": { + "type": "string", + "metadata": { + "description": "Required. Name of the resource to create." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Optional. Location for all Resources." + } + }, + "tags": { + "type": "object", + "nullable": true, + "metadata": { + "description": "Optional. Tags of the resource." + } + }, + "customLocationId": { + "type": "string", + "metadata": { + "description": "Required. Resource ID of the associated custom location." + } + }, + "enableTelemetry": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "Optional. Enable/Disable usage telemetry for module." + } + }, + "diskSizeGB": { + "type": "int", + "metadata": { + "description": "Required. The size of the disk in GB." + } + }, + "dynamic": { + "type": "bool", + "metadata": { + "description": "Required. The disk type." + } + }, + "containerId": { + "type": "string", + "nullable": true, + "metadata": { + "description": "Optional. The container ID." + } + }, + "roleAssignments": { + "type": "array", + "items": { + "$ref": "#/definitions/roleAssignmentType" + }, + "nullable": true, + "metadata": { + "description": "Optional. Array of role assignments to create." + } + } + }, + "variables": { + "copy": [ + { + "name": "formattedRoleAssignments", + "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]", + "input": "[union(coalesce(parameters('roleAssignments'), createArray())[copyIndex('formattedRoleAssignments')], createObject('roleDefinitionId', coalesce(tryGet(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex('formattedRoleAssignments')].roleDefinitionIdOrName), if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex('formattedRoleAssignments')].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex('formattedRoleAssignments')].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex('formattedRoleAssignments')].roleDefinitionIdOrName)))))]" + } + ], + "builtInRoleNames": { + "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", + "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", + "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", + "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]", + "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]" + } + }, + "resources": { + "avmTelemetry": { + "condition": "[parameters('enableTelemetry')]", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2024-03-01", + "name": "[format('46d3xbcp.res.azurestackhci-virtualharddisk.{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": [], + "outputs": { + "telemetry": { + "type": "String", + "value": "For more information, see https://aka.ms/avm/TelemetryInfo" + } + } + } + } + }, + "virtualHardDisk": { + "type": "Microsoft.AzureStackHCI/virtualHardDisks", + "apiVersion": "2024-05-01-preview", + "name": "[parameters('name')]", + "tags": "[parameters('tags')]", + "extendedLocation": { + "type": "CustomLocation", + "name": "[parameters('customLocationId')]" + }, + "location": "[parameters('location')]", + "properties": { + "diskSizeGB": "[parameters('diskSizeGB')]", + "dynamic": "[parameters('dynamic')]", + "containerId": "[parameters('containerId')]" + } + }, + "virtualHardDisk_roleAssignments": { + "copy": { + "name": "virtualHardDisk_roleAssignments", + "count": "[length(coalesce(variables('formattedRoleAssignments'), createArray()))]" + }, + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2022-04-01", + "scope": "[format('Microsoft.AzureStackHCI/virtualHardDisks/{0}', parameters('name'))]", + "name": "[coalesce(tryGet(coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()], 'name'), guid(resourceId('Microsoft.AzureStackHCI/virtualHardDisks', parameters('name')), coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()].principalId, coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()].roleDefinitionId))]", + "properties": { + "roleDefinitionId": "[coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()].roleDefinitionId]", + "principalId": "[coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()].principalId]", + "description": "[tryGet(coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()], 'description')]", + "principalType": "[tryGet(coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()], 'principalType')]", + "condition": "[tryGet(coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()], 'condition')]", + "conditionVersion": "[if(not(empty(tryGet(coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", + "delegatedManagedIdentityResourceId": "[tryGet(coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" + }, + "dependsOn": [ + "virtualHardDisk" + ] + } + }, + "outputs": { + "name": { + "type": "string", + "metadata": { + "description": "The name of the virtual hard disk." + }, + "value": "[parameters('name')]" + }, + "resourceId": { + "type": "string", + "metadata": { + "description": "The resource ID of the virtual hard disk." + }, + "value": "[resourceId('Microsoft.AzureStackHCI/virtualHardDisks', parameters('name'))]" + }, + "resourceGroupName": { + "type": "string", + "metadata": { + "description": "The resource group of the virtual hard disk." + }, + "value": "[resourceGroup().name]" + }, + "location": { + "type": "string", + "metadata": { + "description": "The location of the virtual hard disk." + }, + "value": "[reference('virtualHardDisk', '2024-05-01-preview', 'full').location]" + } + } +} \ No newline at end of file diff --git a/avm/res/azure-stack-hci/virtual-hard-disk/tests/e2e/defaults/main.test.bicep b/avm/res/azure-stack-hci/virtual-hard-disk/tests/e2e/defaults/main.test.bicep new file mode 100644 index 0000000000..b8acda2409 --- /dev/null +++ b/avm/res/azure-stack-hci/virtual-hard-disk/tests/e2e/defaults/main.test.bicep @@ -0,0 +1,196 @@ +targetScope = 'subscription' + +metadata name = 'Using only defaults' +metadata description = 'This instance deploys the module with the minimum set of required parameters.' + +@description('Optional. The name of the resource group to deploy for testing purposes.') +@maxLength(90) +param resourceGroupName string = 'dep-${namePrefix}-azurestackhci.virtualharddisk-${serviceShort}-rg' + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') +param serviceShort string = 'ashvhdmin' + +@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_#' + +@description('Optional. The password of the LCM deployment user and local administrator accounts.') +@secure() +param localAdminAndDeploymentUserPass string = newGuid() + +@description('Required. The app ID of the service principal used for the Azure Stack HCI Resource Bridge deployment.') +@secure() +#disable-next-line secure-parameter-default +param arbDeploymentAppId string = '' + +@description('Required. The service principal ID of the service principal used for the Azure Stack HCI Resource Bridge deployment.') +@secure() +#disable-next-line secure-parameter-default +param arbDeploymentSPObjectId string = '' + +@description('Required. The secret of the service principal used for the Azure Stack HCI Resource Bridge deployment.') +@secure() +#disable-next-line secure-parameter-default +param arbDeploymentServicePrincipalSecret string = '' + +@description('Required. The service principal object ID of the Azure Stack HCI Resource Provider in this tenant. Can be fetched via `Get-AzADServicePrincipal -ApplicationId 1412d89f-b8a8-4111-b4fd-e82905cbd85d` after the \'Microsoft.AzureStackHCI\' provider was registered in the subscription.') +@secure() +#disable-next-line secure-parameter-default +param hciResourceProviderObjectId string = '' + +#disable-next-line no-hardcoded-location // Due to quotas and capacity challenges, this region must be used in the AVM testing subscription +var enforcedLocation = 'southeastasia' + +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: enforcedLocation +} + +module nestedDependencies '../../../../cluster/tests/e2e/defaults/dependencies.bicep' = { + name: '${uniqueString(deployment().name, enforcedLocation)}-test-nestedDependencies-${serviceShort}' + scope: resourceGroup + params: { + clusterName: '${namePrefix}${serviceShort}001' + clusterWitnessStorageAccountName: 'dep${namePrefix}wst${serviceShort}' + keyVaultDiagnosticStorageAccountName: 'dep${namePrefix}st${serviceShort}' + keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}' + userAssignedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' + maintenanceConfigurationName: 'dep-${namePrefix}-mc-${serviceShort}' + maintenanceConfigurationAssignmentName: 'dep-${namePrefix}-mca-${serviceShort}' + HCIHostVirtualMachineScaleSetName: 'dep-${namePrefix}-hvmss-${serviceShort}' + virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' + networkSecurityGroupName: 'dep-${namePrefix}-nsg-${serviceShort}' + networkInterfaceName: 'dep-${namePrefix}-mice-${serviceShort}' + diskNamePrefix: 'dep-${namePrefix}-disk-${serviceShort}' + virtualMachineName: 'dep-${namePrefix}-vm-${serviceShort}' + waitDeploymentScriptPrefixName: 'dep-${namePrefix}-wds-${serviceShort}' + arbDeploymentAppId: arbDeploymentAppId + arbDeploymentServicePrincipalSecret: arbDeploymentServicePrincipalSecret + arbDeploymentSPObjectId: arbDeploymentSPObjectId + deploymentUserPassword: localAdminAndDeploymentUserPass + hciResourceProviderObjectId: hciResourceProviderObjectId + localAdminPassword: localAdminAndDeploymentUserPass + location: enforcedLocation + } +} + +module azlocal 'br/public:avm/res/azure-stack-hci/cluster:0.1.0' = { + name: '${uniqueString(deployment().name, enforcedLocation)}-test-clustermodule-${serviceShort}' + scope: resourceGroup + params: { + name: nestedDependencies.outputs.clusterName + deploymentSettings: { + customLocationName: '${namePrefix}${serviceShort}-location' + clusterNodeNames: nestedDependencies.outputs.clusterNodeNames + clusterWitnessStorageAccountName: nestedDependencies.outputs.clusterWitnessStorageAccountName + defaultGateway: '172.20.0.1' + deploymentPrefix: 'a${take(uniqueString(namePrefix, serviceShort), 7)}' // ensure deployment prefix starts with a letter to match '^(?=.{1,8}$)([a-zA-Z])(\-?[a-zA-Z\d])*$' + dnsServers: ['172.20.0.1'] + domainFqdn: 'hci.local' + domainOUPath: nestedDependencies.outputs.domainOUPath + startingIPAddress: '172.20.0.2' + endingIPAddress: '172.20.0.7' + enableStorageAutoIp: true + keyVaultName: nestedDependencies.outputs.keyVaultName + networkIntents: [ + { + adapter: ['mgmt'] + name: 'management' + overrideAdapterProperty: true + adapterPropertyOverrides: { + jumboPacket: '9014' + networkDirect: 'Disabled' + networkDirectTechnology: 'iWARP' + } + overrideQosPolicy: false + qosPolicyOverrides: { + bandwidthPercentage_SMB: '50' + priorityValue8021Action_Cluster: '7' + priorityValue8021Action_SMB: '3' + } + overrideVirtualSwitchConfiguration: false + virtualSwitchConfigurationOverrides: { + enableIov: 'true' + loadBalancingAlgorithm: 'Dynamic' + } + trafficType: ['Management'] + } + { + adapter: ['comp0', 'comp1'] + name: 'compute' + overrideAdapterProperty: true + adapterPropertyOverrides: { + jumboPacket: '9014' + networkDirect: 'Disabled' + networkDirectTechnology: 'iWARP' + } + overrideQosPolicy: false + qosPolicyOverrides: { + bandwidthPercentage_SMB: '50' + priorityValue8021Action_Cluster: '7' + priorityValue8021Action_SMB: '3' + } + overrideVirtualSwitchConfiguration: false + virtualSwitchConfigurationOverrides: { + enableIov: 'true' + loadBalancingAlgorithm: 'Dynamic' + } + trafficType: ['Compute'] + } + { + adapter: ['smb0', 'smb1'] + name: 'storage' + overrideAdapterProperty: true + adapterPropertyOverrides: { + jumboPacket: '9014' + networkDirect: 'Disabled' + networkDirectTechnology: 'iWARP' + } + overrideQosPolicy: true + qosPolicyOverrides: { + bandwidthPercentage_SMB: '50' + priorityValue8021Action_Cluster: '7' + priorityValue8021Action_SMB: '3' + } + overrideVirtualSwitchConfiguration: false + virtualSwitchConfigurationOverrides: { + enableIov: 'true' + loadBalancingAlgorithm: 'Dynamic' + } + trafficType: ['Storage'] + } + ] + storageConnectivitySwitchless: false + storageNetworks: [ + { + adapterName: 'smb0' + vlan: '711' + } + { + adapterName: 'smb1' + vlan: '712' + } + ] + subnetMask: '255.255.255.0' + } + } +} + +resource customLocation 'Microsoft.ExtendedLocation/customLocations@2021-08-31-preview' existing = { + scope: resourceGroup + name: '${namePrefix}${serviceShort}-location' + dependsOn: [ + azlocal + ] +} + +module testDeployment '../../../main.bicep' = { + name: '${uniqueString(deployment().name, enforcedLocation)}-virtualharddisk-${serviceShort}' + scope: resourceGroup + params: { + name: '${namePrefix}${serviceShort}vhd' + location: enforcedLocation + diskSizeGB: 4 + dynamic: false + customLocationId: customLocation.id + } +} diff --git a/avm/res/azure-stack-hci/virtual-hard-disk/tests/e2e/waf-aligned/main.test.bicep b/avm/res/azure-stack-hci/virtual-hard-disk/tests/e2e/waf-aligned/main.test.bicep new file mode 100644 index 0000000000..b38a660839 --- /dev/null +++ b/avm/res/azure-stack-hci/virtual-hard-disk/tests/e2e/waf-aligned/main.test.bicep @@ -0,0 +1,212 @@ +targetScope = 'subscription' + +metadata name = 'WAF-aligned' +metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.' + +@description('Optional. The name of the resource group to deploy for testing purposes.') +@maxLength(90) +param resourceGroupName string = 'dep-${namePrefix}-azurestackhci.virtualharddisk-${serviceShort}-rg' + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') +param serviceShort string = 'ashvhdwaf' + +@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_#' + +@description('Optional. The password of the LCM deployment user and local administrator accounts.') +@secure() +param localAdminAndDeploymentUserPass string = newGuid() + +@description('Required. The app ID of the service principal used for the Azure Stack HCI Resource Bridge deployment.') +@secure() +#disable-next-line secure-parameter-default +param arbDeploymentAppId string = '' + +@description('Required. The service principal ID of the service principal used for the Azure Stack HCI Resource Bridge deployment.') +@secure() +#disable-next-line secure-parameter-default +param arbDeploymentSPObjectId string = '' + +@description('Required. The secret of the service principal used for the Azure Stack HCI Resource Bridge deployment.') +@secure() +#disable-next-line secure-parameter-default +param arbDeploymentServicePrincipalSecret string = '' + +@description('Required. The service principal object ID of the Azure Stack HCI Resource Provider in this tenant. Can be fetched via `Get-AzADServicePrincipal -ApplicationId 1412d89f-b8a8-4111-b4fd-e82905cbd85d` after the \'Microsoft.AzureStackHCI\' provider was registered in the subscription.') +@secure() +#disable-next-line secure-parameter-default +param hciResourceProviderObjectId string = '' + +#disable-next-line no-hardcoded-location // Due to quotas and capacity challenges, this region must be used in the AVM testing subscription +var enforcedLocation = 'southeastasia' + +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: enforcedLocation +} + +module nestedDependencies '../../../../cluster/tests/e2e/waf-aligned/dependencies.bicep' = { + name: '${uniqueString(deployment().name, enforcedLocation)}-test-nestedDependencies-${serviceShort}' + scope: resourceGroup + params: { + clusterName: '${namePrefix}${serviceShort}001' + clusterWitnessStorageAccountName: 'dep${namePrefix}wst${serviceShort}' + keyVaultDiagnosticStorageAccountName: 'dep${namePrefix}st${serviceShort}' + keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}' + userAssignedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' + maintenanceConfigurationName: 'dep-${namePrefix}-mc-${serviceShort}' + maintenanceConfigurationAssignmentName: 'dep-${namePrefix}-mca-${serviceShort}' + HCIHostVirtualMachineScaleSetName: 'dep-${namePrefix}-hvmss-${serviceShort}' + virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' + networkSecurityGroupName: 'dep-${namePrefix}-nsg-${serviceShort}' + networkInterfaceName: 'dep-${namePrefix}-mice-${serviceShort}' + diskNamePrefix: 'dep-${namePrefix}-disk-${serviceShort}' + virtualMachineName: 'dep-${namePrefix}-vm-${serviceShort}' + waitDeploymentScriptPrefixName: 'dep-${namePrefix}-wds-${serviceShort}' + arbDeploymentAppId: arbDeploymentAppId + arbDeploymentServicePrincipalSecret: arbDeploymentServicePrincipalSecret + arbDeploymentSPObjectId: arbDeploymentSPObjectId + deploymentUserPassword: localAdminAndDeploymentUserPass + hciResourceProviderObjectId: hciResourceProviderObjectId + localAdminPassword: localAdminAndDeploymentUserPass + location: enforcedLocation + } +} + +module azlocal 'br/public:avm/res/azure-stack-hci/cluster:0.1.0' = { + name: '${uniqueString(deployment().name, enforcedLocation)}-test-clustermodule-${serviceShort}' + scope: resourceGroup + params: { + name: nestedDependencies.outputs.clusterName + deploymentSettings: { + customLocationName: '${namePrefix}${serviceShort}-location' + clusterNodeNames: nestedDependencies.outputs.clusterNodeNames + clusterWitnessStorageAccountName: nestedDependencies.outputs.clusterWitnessStorageAccountName + defaultGateway: '172.20.0.1' + deploymentPrefix: 'a${take(uniqueString(namePrefix, serviceShort), 7)}' // ensure deployment prefix starts with a letter to match '^(?=.{1,8}$)([a-zA-Z])(\-?[a-zA-Z\d])*$' + dnsServers: ['172.20.0.1'] + domainFqdn: 'hci.local' + domainOUPath: nestedDependencies.outputs.domainOUPath + startingIPAddress: '172.20.0.2' + endingIPAddress: '172.20.0.7' + enableStorageAutoIp: true + keyVaultName: nestedDependencies.outputs.keyVaultName + networkIntents: [ + { + adapter: ['mgmt'] + name: 'management' + overrideAdapterProperty: true + adapterPropertyOverrides: { + jumboPacket: '9014' + networkDirect: 'Disabled' + networkDirectTechnology: 'iWARP' + } + overrideQosPolicy: false + qosPolicyOverrides: { + bandwidthPercentage_SMB: '50' + priorityValue8021Action_Cluster: '7' + priorityValue8021Action_SMB: '3' + } + overrideVirtualSwitchConfiguration: false + virtualSwitchConfigurationOverrides: { + enableIov: 'true' + loadBalancingAlgorithm: 'Dynamic' + } + trafficType: ['Management'] + } + { + adapter: ['comp0', 'comp1'] + name: 'compute' + overrideAdapterProperty: true + adapterPropertyOverrides: { + jumboPacket: '9014' + networkDirect: 'Disabled' + networkDirectTechnology: 'iWARP' + } + overrideQosPolicy: false + qosPolicyOverrides: { + bandwidthPercentage_SMB: '50' + priorityValue8021Action_Cluster: '7' + priorityValue8021Action_SMB: '3' + } + overrideVirtualSwitchConfiguration: false + virtualSwitchConfigurationOverrides: { + enableIov: 'true' + loadBalancingAlgorithm: 'Dynamic' + } + trafficType: ['Compute'] + } + { + adapter: ['smb0', 'smb1'] + name: 'storage' + overrideAdapterProperty: true + adapterPropertyOverrides: { + jumboPacket: '9014' + networkDirect: 'Disabled' + networkDirectTechnology: 'iWARP' + } + overrideQosPolicy: true + qosPolicyOverrides: { + bandwidthPercentage_SMB: '50' + priorityValue8021Action_Cluster: '7' + priorityValue8021Action_SMB: '3' + } + overrideVirtualSwitchConfiguration: false + virtualSwitchConfigurationOverrides: { + enableIov: 'true' + loadBalancingAlgorithm: 'Dynamic' + } + trafficType: ['Storage'] + } + ] + storageConnectivitySwitchless: false + storageNetworks: [ + { + adapterName: 'smb0' + vlan: '711' + } + { + adapterName: 'smb1' + vlan: '712' + } + ] + subnetMask: '255.255.255.0' + driftControlEnforced: true + smbSigningEnforced: true + smbClusterEncryption: true + sideChannelMitigationEnforced: true + bitlockerBootVolume: true + bitlockerDataVolumes: true + } + tags: { + 'hidden-title': 'This is visible in the resource name' + Environment: 'Non-Prod' + Role: 'DeploymentValidation' + } + } +} + +resource customLocation 'Microsoft.ExtendedLocation/customLocations@2021-08-31-preview' existing = { + scope: resourceGroup + name: '${namePrefix}${serviceShort}-location' + dependsOn: [ + azlocal + ] +} + +module testDeployment '../../../main.bicep' = { + name: '${uniqueString(deployment().name, enforcedLocation)}-virtualharddisk-${serviceShort}' + scope: resourceGroup + params: { + name: '${namePrefix}${serviceShort}vhd' + location: enforcedLocation + customLocationId: customLocation.id + diskSizeGB: 4 + dynamic: true + tags: { + 'hidden-title': 'This is visible in the resource name' + Environment: 'Non-Prod' + Role: 'DeploymentValidation' + } + } +} diff --git a/avm/res/azure-stack-hci/virtual-hard-disk/version.json b/avm/res/azure-stack-hci/virtual-hard-disk/version.json new file mode 100644 index 0000000000..8def869ede --- /dev/null +++ b/avm/res/azure-stack-hci/virtual-hard-disk/version.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", + "version": "0.1", + "pathFilters": [ + "./main.json" + ] +}