Skip to content

Commit

Permalink
feat: additional parameters, including CMK, for `avm/res/net-app/net-…
Browse files Browse the repository at this point in the history
…app-account` (Azure#2089)

## Description

<!--
Added support for CMK.

Closes Azure#2089 
-->

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.net-app.net-app-account](https://github.com/bobmclane999/bicep-registry-modules/actions/workflows/avm.res.net-app.net-app-account.yml/badge.svg)](https://github.com/bobmclane999/bicep-registry-modules/actions/workflows/avm.res.net-app.net-app-account.yml)
|

See this run:
https://github.com/bobmclane999/bicep-registry-modules/actions/runs/9418453527

## Type of Change

<!-- Use the check-boxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utlities (Non-module effecting
changes)
- [ ] Azure Verified Module updates:
- [ ] Bugfix containing backwards compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation

## Checklist

- [ ] I'm sure there are no other open Pull Requests for the same
update/change
- [ ] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [ ] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to day with the contribution guide at
https://aka.ms/avm/contribute/bicep -->

---------

Co-authored-by: Jack Tracey <[email protected]>
Co-authored-by: Erika Gressi <[email protected]>
  • Loading branch information
3 people authored Jun 10, 2024
1 parent b095b06 commit 305f9a5
Show file tree
Hide file tree
Showing 9 changed files with 285 additions and 70 deletions.
74 changes: 71 additions & 3 deletions avm/res/net-app/net-app-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ This module deploys an Azure NetApp File.
| :-- | :-- |
| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
| `Microsoft.NetApp/netAppAccounts` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2022-11-01/netAppAccounts) |
| `Microsoft.NetApp/netAppAccounts/capacityPools` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2022-11-01/netAppAccounts/capacityPools) |
| `Microsoft.NetApp/netAppAccounts/capacityPools/volumes` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2022-11-01/netAppAccounts/capacityPools/volumes) |
| `Microsoft.NetApp/netAppAccounts` | [2023-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/netAppAccounts) |
| `Microsoft.NetApp/netAppAccounts/capacityPools` | [2023-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/netAppAccounts/capacityPools) |
| `Microsoft.NetApp/netAppAccounts/capacityPools/volumes` | [2023-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/netAppAccounts/capacityPools/volumes) |

## Usage examples

Expand Down Expand Up @@ -645,13 +645,16 @@ module netAppAccount 'br/public:avm/res/net-app/net-app-account:<version>' = {

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`aesEncryption`](#parameter-aesencryption) | bool | Enable AES encryption on the SMB Server. |
| [`capacityPools`](#parameter-capacitypools) | array | Capacity pools to create. |
| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition. |
| [`dnsServers`](#parameter-dnsservers) | string | Required if domainName is specified. Comma separated list of DNS server IP addresses (IPv4 only) required for the Active Directory (AD) domain join and SMB authentication operations to succeed. |
| [`domainJoinOU`](#parameter-domainjoinou) | string | Used only if domainName is specified. LDAP Path for the Organization Unit (OU) where SMB Server machine accounts will be created (i.e. 'OU=SecondLevel,OU=FirstLevel'). |
| [`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'). |
| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable/Disable usage telemetry for module. |
| [`ldapSigning`](#parameter-ldapsigning) | bool | Specifies whether or not the LDAP traffic needs to be signed. |
| [`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. |
Expand All @@ -666,6 +669,14 @@ The name of the NetApp account.
- Required: Yes
- Type: string

### Parameter: `aesEncryption`

Enable AES encryption on the SMB Server.

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

### Parameter: `capacityPools`

Capacity pools to create.
Expand All @@ -674,6 +685,55 @@ Capacity pools to create.
- Type: array
- Default: `[]`

### Parameter: `customerManagedKey`

The customer managed key definition.

- Required: No
- Type: object

**Required parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`keyName`](#parameter-customermanagedkeykeyname) | string | The name of the customer managed key to use for encryption. |
| [`keyVaultResourceId`](#parameter-customermanagedkeykeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |

**Optional parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeyuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use. |

### Parameter: `customerManagedKey.keyName`

The name of the customer managed key to use for encryption.

- Required: Yes
- Type: string

### Parameter: `customerManagedKey.keyVaultResourceId`

The resource ID of a key vault to reference a customer managed key for encryption from.

- Required: Yes
- Type: string

### Parameter: `customerManagedKey.keyVersion`

The version of the customer managed key to reference for encryption. If not provided, using 'latest'.

- Required: No
- Type: string

### Parameter: `customerManagedKey.userAssignedIdentityResourceId`

User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.

- Required: No
- Type: string

### Parameter: `dnsServers`

Required if domainName is specified. Comma separated list of DNS server IP addresses (IPv4 only) required for the Active Directory (AD) domain join and SMB authentication operations to succeed.
Expand Down Expand Up @@ -722,6 +782,14 @@ Enable/Disable usage telemetry for module.
- Type: bool
- Default: `True`

### Parameter: `ldapSigning`

Specifies whether or not the LDAP traffic needs to be signed.

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

### Parameter: `location`

Location for all resources.
Expand Down
4 changes: 2 additions & 2 deletions avm/res/net-app/net-app-account/capacity-pool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ This module deploys an Azure NetApp Files Capacity Pool.
| 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.NetApp/netAppAccounts/capacityPools` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2022-11-01/netAppAccounts/capacityPools) |
| `Microsoft.NetApp/netAppAccounts/capacityPools/volumes` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2022-11-01/netAppAccounts/capacityPools/volumes) |
| `Microsoft.NetApp/netAppAccounts/capacityPools` | [2023-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/netAppAccounts/capacityPools) |
| `Microsoft.NetApp/netAppAccounts/capacityPools/volumes` | [2023-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/netAppAccounts/capacityPools/volumes) |

## Parameters

Expand Down
4 changes: 2 additions & 2 deletions avm/res/net-app/net-app-account/capacity-pool/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ var builtInRoleNames = {
)
}

resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2022-11-01' existing = {
resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2023-11-01' existing = {
name: netAppAccountName
}

resource capacityPool 'Microsoft.NetApp/netAppAccounts/capacityPools@2022-11-01' = {
resource capacityPool 'Microsoft.NetApp/netAppAccounts/capacityPools@2023-11-01' = {
name: name
parent: netAppAccount
location: location
Expand Down
22 changes: 11 additions & 11 deletions avm/res/net-app/net-app-account/capacity-pool/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "9491401922190427460"
"version": "0.27.1.19265",
"templateHash": "16622075120254910820"
},
"name": "Azure NetApp Files Capacity Pools",
"description": "This module deploys an Azure NetApp Files Capacity Pool.",
Expand Down Expand Up @@ -182,12 +182,12 @@
"netAppAccount": {
"existing": true,
"type": "Microsoft.NetApp/netAppAccounts",
"apiVersion": "2022-11-01",
"apiVersion": "2023-11-01",
"name": "[parameters('netAppAccountName')]"
},
"capacityPool": {
"type": "Microsoft.NetApp/netAppAccounts/capacityPools",
"apiVersion": "2022-11-01",
"apiVersion": "2023-11-01",
"name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('name'))]",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",
Expand Down Expand Up @@ -273,8 +273,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "9587584861242006945"
"version": "0.27.1.19265",
"templateHash": "8316026534353601275"
},
"name": "Azure NetApp Files Capacity Pool Volumes",
"description": "This module deploys an Azure NetApp Files Capacity Pool Volume.",
Expand Down Expand Up @@ -440,7 +440,7 @@
"netAppAccount::capacityPool": {
"existing": true,
"type": "Microsoft.NetApp/netAppAccounts/capacityPools",
"apiVersion": "2022-11-01",
"apiVersion": "2023-11-01",
"name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('capacityPoolName'))]",
"dependsOn": [
"netAppAccount"
Expand All @@ -449,12 +449,12 @@
"netAppAccount": {
"existing": true,
"type": "Microsoft.NetApp/netAppAccounts",
"apiVersion": "2022-11-01",
"apiVersion": "2023-11-01",
"name": "[parameters('netAppAccountName')]"
},
"volume": {
"type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
"apiVersion": "2022-11-01",
"apiVersion": "2023-11-01",
"name": "[format('{0}/{1}/{2}', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name'))]",
"location": "[parameters('location')]",
"properties": {
Expand Down Expand Up @@ -519,7 +519,7 @@
"metadata": {
"description": "The location the resource was deployed into."
},
"value": "[reference('volume', '2022-11-01', 'full').location]"
"value": "[reference('volume', '2023-11-01', 'full').location]"
}
}
}
Expand Down Expand Up @@ -557,7 +557,7 @@
"metadata": {
"description": "The location the resource was deployed into."
},
"value": "[reference('capacityPool', '2022-11-01', 'full').location]"
"value": "[reference('capacityPool', '2023-11-01', 'full').location]"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This module deploys an Azure NetApp Files Capacity Pool Volume.
| 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.NetApp/netAppAccounts/capacityPools/volumes` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2022-11-01/netAppAccounts/capacityPools/volumes) |
| `Microsoft.NetApp/netAppAccounts/capacityPools/volumes` | [2023-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/netAppAccounts/capacityPools/volumes) |

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ var builtInRoleNames = {
)
}

resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2022-11-01' existing = {
resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2023-11-01' existing = {
name: netAppAccountName

resource capacityPool 'capacityPools@2022-11-01' existing = {
resource capacityPool 'capacityPools@2023-11-01' existing = {
name: capacityPoolName
}
}

resource volume 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes@2022-11-01' = {
resource volume 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes@2023-11-01' = {
name: name
parent: netAppAccount::capacityPool
location: location
Expand Down
12 changes: 6 additions & 6 deletions avm/res/net-app/net-app-account/capacity-pool/volume/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "9587584861242006945"
"version": "0.27.1.19265",
"templateHash": "8316026534353601275"
},
"name": "Azure NetApp Files Capacity Pool Volumes",
"description": "This module deploys an Azure NetApp Files Capacity Pool Volume.",
Expand Down Expand Up @@ -172,7 +172,7 @@
"netAppAccount::capacityPool": {
"existing": true,
"type": "Microsoft.NetApp/netAppAccounts/capacityPools",
"apiVersion": "2022-11-01",
"apiVersion": "2023-11-01",
"name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('capacityPoolName'))]",
"dependsOn": [
"netAppAccount"
Expand All @@ -181,12 +181,12 @@
"netAppAccount": {
"existing": true,
"type": "Microsoft.NetApp/netAppAccounts",
"apiVersion": "2022-11-01",
"apiVersion": "2023-11-01",
"name": "[parameters('netAppAccountName')]"
},
"volume": {
"type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
"apiVersion": "2022-11-01",
"apiVersion": "2023-11-01",
"name": "[format('{0}/{1}/{2}', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name'))]",
"location": "[parameters('location')]",
"properties": {
Expand Down Expand Up @@ -251,7 +251,7 @@
"metadata": {
"description": "The location the resource was deployed into."
},
"value": "[reference('volume', '2022-11-01', 'full').location]"
"value": "[reference('volume', '2023-11-01', 'full').location]"
}
}
}
Loading

0 comments on commit 305f9a5

Please sign in to comment.