Skip to content

Commit

Permalink
move children
Browse files Browse the repository at this point in the history
  • Loading branch information
rahalan committed Dec 7, 2023
1 parent fdfadc0 commit a5e687e
Show file tree
Hide file tree
Showing 7 changed files with 168 additions and 161 deletions.
165 changes: 165 additions & 0 deletions avm/res/compute/virtual-machine/extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# Virtual Machine Extensions `[Microsoft.Compute/virtualMachines/extensions]`

This module deploys a Virtual Machine Extension.

## Navigation

- [Resource Types](#Resource-Types)
- [Parameters](#Parameters)
- [Outputs](#Outputs)
- [Cross-referenced modules](#Cross-referenced-modules)

## Resource Types

| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.Compute/virtualMachines/extensions` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Compute/2022-11-01/virtualMachines/extensions) |

## Parameters

**Required parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`autoUpgradeMinorVersion`](#parameter-autoupgrademinorversion) | bool | Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. |
| [`enableAutomaticUpgrade`](#parameter-enableautomaticupgrade) | bool | Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. |
| [`name`](#parameter-name) | string | The name of the virtual machine extension. |
| [`publisher`](#parameter-publisher) | string | The name of the extension handler publisher. |
| [`type`](#parameter-type) | string | Specifies the type of the extension; an example is "CustomScriptExtension". |
| [`typeHandlerVersion`](#parameter-typehandlerversion) | string | Specifies the version of the script handler. |

**Conditional parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`virtualMachineName`](#parameter-virtualmachinename) | string | The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment. |

**Optional parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
| [`forceUpdateTag`](#parameter-forceupdatetag) | string | How the extension handler should be forced to update even if the extension configuration has not changed. |
| [`location`](#parameter-location) | string | The location the extension is deployed to. |
| [`protectedSettings`](#parameter-protectedsettings) | secureObject | Any object that contains the extension specific protected settings. |
| [`settings`](#parameter-settings) | object | Any object that contains the extension specific settings. |
| [`supressFailures`](#parameter-supressfailures) | bool | Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. |
| [`tags`](#parameter-tags) | object | Tags of the resource. |

### Parameter: `autoUpgradeMinorVersion`

Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.

- Required: Yes
- Type: bool

### Parameter: `enableAutomaticUpgrade`

Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.

- Required: Yes
- Type: bool

### Parameter: `name`

The name of the virtual machine extension.

- Required: Yes
- Type: string

### Parameter: `publisher`

The name of the extension handler publisher.

- Required: Yes
- Type: string

### Parameter: `type`

Specifies the type of the extension; an example is "CustomScriptExtension".

- Required: Yes
- Type: string

### Parameter: `typeHandlerVersion`

Specifies the version of the script handler.

- Required: Yes
- Type: string

### Parameter: `virtualMachineName`

The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment.

- Required: Yes
- Type: string

### Parameter: `enableDefaultTelemetry`

Enable telemetry via a Globally Unique Identifier (GUID).

- Required: No
- Type: bool
- Default: `True`

### Parameter: `forceUpdateTag`

How the extension handler should be forced to update even if the extension configuration has not changed.

- Required: No
- Type: string
- Default: `''`

### Parameter: `location`

The location the extension is deployed to.

- Required: No
- Type: string
- Default: `[resourceGroup().location]`

### Parameter: `protectedSettings`

Any object that contains the extension specific protected settings.

- Required: No
- Type: secureObject
- Default: `{}`

### Parameter: `settings`

Any object that contains the extension specific settings.

- Required: No
- Type: object
- Default: `{}`

### Parameter: `supressFailures`

Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.

- Required: No
- Type: bool
- Default: `False`

### Parameter: `tags`

Tags of the resource.

- Required: No
- Type: object


## Outputs

| Output | Type | Description |
| :-- | :-- | :-- |
| `location` | string | The location the resource was deployed into. |
| `name` | string | The name of the extension. |
| `resourceGroupName` | string | The name of the Resource Group the extension was created in. |
| `resourceId` | string | The resource ID of the extension. |

## Cross-referenced modules

_None_
4 changes: 2 additions & 2 deletions avm/res/compute/virtual-machine/extension/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "9638144716839375831"
"version": "0.23.1.45101",
"templateHash": "5421737065579119324"
},
"name": "Virtual Machine Extensions",
"description": "This module deploys a Virtual Machine Extension.",
Expand Down
7 changes: 0 additions & 7 deletions avm/res/compute/virtual-machine/extension/version.json

This file was deleted.

3 changes: 1 addition & 2 deletions avm/res/compute/virtual-machine/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ module vm_azureDiskEncryptionExtension 'extension/main.bicep' = if (extensionAzu
]
}

module vm_backup 'protected-item/main.bicep' = if (!empty(backupVaultName)) {
module vm_backup 'modules/protected-item.bicep' = if (!empty(backupVaultName)) {
name: '${uniqueString(deployment().name, location)}-VM-Backup'
params: {
name: 'vm;iaasvmcontainerv2;${resourceGroup().name};${vm.name}'
Expand All @@ -645,7 +645,6 @@ module vm_backup 'protected-item/main.bicep' = if (!empty(backupVaultName)) {
protectionContainerName: 'iaasvmcontainer;iaasvmcontainerv2;${resourceGroup().name};${vm.name}'
recoveryVaultName: backupVaultName
sourceResourceId: vm.id
enableDefaultTelemetry: enableReferencedModulesTelemetry
}
scope: az.resourceGroup(backupVaultResourceGroup)
dependsOn: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,6 @@ param policyId string
@description('Required. Resource ID of the resource to back up.')
param sourceResourceId string

@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
param enableDefaultTelemetry bool = true

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

resource protectedItem 'Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems@2023-01-01' = {
name: '${recoveryVaultName}/Azure/${protectionContainerName}/${name}'
location: location
Expand Down
128 changes: 0 additions & 128 deletions avm/res/compute/virtual-machine/protected-item/main.json

This file was deleted.

7 changes: 0 additions & 7 deletions avm/res/compute/virtual-machine/protected-item/version.json

This file was deleted.

0 comments on commit a5e687e

Please sign in to comment.