Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: additional parameters, including CMK, for avm/res/net-app/net-app-account #2089

Merged
merged 10 commits into from
Jun 10, 2024
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