'
-// Non-required parameters
-param skuName = 'VpnGw2AZ'
```
@@ -2395,6 +2387,203 @@ Specifies one of the following four configurations: Active-Active with (clusterM
- Required: Yes
- Type: object
+- Discriminator: `clusterMode`
+
+The available variants are:
+
+| Variant | Description |
+| :-- | :-- |
+| [`activeActiveNoBgp`](#variant-clustersettingsclustermode-activeactivenobgp) | The type for an active-active no BGP cluster configuration. |
+| [`activeActiveBgp`](#variant-clustersettingsclustermode-activeactivebgp) | The type for an active-active BGP cluster configuration. |
+| [`activePassiveBgp`](#variant-clustersettingsclustermode-activepassivebgp) | The type for an active-passive BGP cluster configuration. |
+| [`activePassiveNoBgp`](#variant-clustersettingsclustermode-activepassivenobgp) | The type for an active-passive no BGP cluster configuration. |
+
+### Variant: `clusterSettings.clusterMode-activeActiveNoBgp`
+The type for an active-active no BGP cluster configuration.
+
+To use this variant, set the property `clusterMode` to `activeActiveNoBgp`.
+
+**Required parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`clusterMode`](#parameter-clustersettingsclustermode-activeactivenobgpclustermode) | string | The cluster mode deciding the configuration. |
+
+**Optional parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`existingSecondaryPublicIPResourceId`](#parameter-clustersettingsclustermode-activeactivenobgpexistingsecondarypublicipresourceid) | string | The secondary Public IP resource ID to associate to the Virtual Network Gateway in the Active-Active mode. If empty, then a new secondary Public IP will be created as part of this module and applied to the Virtual Network Gateway. |
+| [`secondPipName`](#parameter-clustersettingsclustermode-activeactivenobgpsecondpipname) | string | Specifies the name of the secondary Public IP to be created for the Virtual Network Gateway in the Active-Active mode. This will only take effect if no existing secondary Public IP is provided. If neither an existing secondary Public IP nor this parameter is specified, a new secondary Public IP will be created with a default name, using the gateway's name with the '-pip2' suffix. |
+
+### Parameter: `clusterSettings.clusterMode-activeActiveNoBgp.clusterMode`
+
+The cluster mode deciding the configuration.
+
+- Required: Yes
+- Type: string
+- Allowed:
+ ```Bicep
+ [
+ 'activeActiveNoBgp'
+ ]
+ ```
+
+### Parameter: `clusterSettings.clusterMode-activeActiveNoBgp.existingSecondaryPublicIPResourceId`
+
+The secondary Public IP resource ID to associate to the Virtual Network Gateway in the Active-Active mode. If empty, then a new secondary Public IP will be created as part of this module and applied to the Virtual Network Gateway.
+
+- Required: No
+- Type: string
+
+### Parameter: `clusterSettings.clusterMode-activeActiveNoBgp.secondPipName`
+
+Specifies the name of the secondary Public IP to be created for the Virtual Network Gateway in the Active-Active mode. This will only take effect if no existing secondary Public IP is provided. If neither an existing secondary Public IP nor this parameter is specified, a new secondary Public IP will be created with a default name, using the gateway's name with the '-pip2' suffix.
+
+- Required: No
+- Type: string
+
+### Variant: `clusterSettings.clusterMode-activeActiveBgp`
+The type for an active-active BGP cluster configuration.
+
+To use this variant, set the property `clusterMode` to `activeActiveBgp`.
+
+**Required parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`clusterMode`](#parameter-clustersettingsclustermode-activeactivebgpclustermode) | string | The cluster mode deciding the configuration. |
+
+**Optional parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`asn`](#parameter-clustersettingsclustermode-activeactivebgpasn) | int | The Autonomous System Number value. If it's not provided, a default '65515' value will be assigned to the ASN. |
+| [`customBgpIpAddresses`](#parameter-clustersettingsclustermode-activeactivebgpcustombgpipaddresses) | array | The list of custom BGP IP Address (APIPA) peering addresses which belong to IP configuration. |
+| [`existingSecondaryPublicIPResourceId`](#parameter-clustersettingsclustermode-activeactivebgpexistingsecondarypublicipresourceid) | string | The secondary Public IP resource ID to associate to the Virtual Network Gateway in the Active-Active mode. If empty, then a new secondary Public IP will be created as part of this module and applied to the Virtual Network Gateway. |
+| [`secondCustomBgpIpAddresses`](#parameter-clustersettingsclustermode-activeactivebgpsecondcustombgpipaddresses) | array | The list of the second custom BGP IP Address (APIPA) peering addresses which belong to IP configuration. |
+| [`secondPipName`](#parameter-clustersettingsclustermode-activeactivebgpsecondpipname) | string | Specifies the name of the secondary Public IP to be created for the Virtual Network Gateway in the Active-Active mode. This will only take effect if no existing secondary Public IP is provided. If neither an existing secondary Public IP nor this parameter is specified, a new secondary Public IP will be created with a default name, using the gateway's name with the '-pip2' suffix. |
+
+### Parameter: `clusterSettings.clusterMode-activeActiveBgp.clusterMode`
+
+The cluster mode deciding the configuration.
+
+- Required: Yes
+- Type: string
+- Allowed:
+ ```Bicep
+ [
+ 'activeActiveBgp'
+ ]
+ ```
+
+### Parameter: `clusterSettings.clusterMode-activeActiveBgp.asn`
+
+The Autonomous System Number value. If it's not provided, a default '65515' value will be assigned to the ASN.
+
+- Required: No
+- Type: int
+- MinValue: 0
+- MaxValue: 4294967295
+
+### Parameter: `clusterSettings.clusterMode-activeActiveBgp.customBgpIpAddresses`
+
+The list of custom BGP IP Address (APIPA) peering addresses which belong to IP configuration.
+
+- Required: No
+- Type: array
+
+### Parameter: `clusterSettings.clusterMode-activeActiveBgp.existingSecondaryPublicIPResourceId`
+
+The secondary Public IP resource ID to associate to the Virtual Network Gateway in the Active-Active mode. If empty, then a new secondary Public IP will be created as part of this module and applied to the Virtual Network Gateway.
+
+- Required: No
+- Type: string
+
+### Parameter: `clusterSettings.clusterMode-activeActiveBgp.secondCustomBgpIpAddresses`
+
+The list of the second custom BGP IP Address (APIPA) peering addresses which belong to IP configuration.
+
+- Required: No
+- Type: array
+
+### Parameter: `clusterSettings.clusterMode-activeActiveBgp.secondPipName`
+
+Specifies the name of the secondary Public IP to be created for the Virtual Network Gateway in the Active-Active mode. This will only take effect if no existing secondary Public IP is provided. If neither an existing secondary Public IP nor this parameter is specified, a new secondary Public IP will be created with a default name, using the gateway's name with the '-pip2' suffix.
+
+- Required: No
+- Type: string
+
+### Variant: `clusterSettings.clusterMode-activePassiveBgp`
+The type for an active-passive BGP cluster configuration.
+
+To use this variant, set the property `clusterMode` to `activePassiveBgp`.
+
+**Required parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`clusterMode`](#parameter-clustersettingsclustermode-activepassivebgpclustermode) | string | The cluster mode deciding the configuration. |
+
+**Optional parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`asn`](#parameter-clustersettingsclustermode-activepassivebgpasn) | int | The Autonomous System Number value. If it's not provided, a default '65515' value will be assigned to the ASN. |
+| [`customBgpIpAddresses`](#parameter-clustersettingsclustermode-activepassivebgpcustombgpipaddresses) | array | The list of custom BGP IP Address (APIPA) peering addresses which belong to IP configuration. |
+
+### Parameter: `clusterSettings.clusterMode-activePassiveBgp.clusterMode`
+
+The cluster mode deciding the configuration.
+
+- Required: Yes
+- Type: string
+- Allowed:
+ ```Bicep
+ [
+ 'activePassiveBgp'
+ ]
+ ```
+
+### Parameter: `clusterSettings.clusterMode-activePassiveBgp.asn`
+
+The Autonomous System Number value. If it's not provided, a default '65515' value will be assigned to the ASN.
+
+- Required: No
+- Type: int
+- MinValue: 0
+- MaxValue: 4294967295
+
+### Parameter: `clusterSettings.clusterMode-activePassiveBgp.customBgpIpAddresses`
+
+The list of custom BGP IP Address (APIPA) peering addresses which belong to IP configuration.
+
+- Required: No
+- Type: array
+
+### Variant: `clusterSettings.clusterMode-activePassiveNoBgp`
+The type for an active-passive no BGP cluster configuration.
+
+To use this variant, set the property `clusterMode` to `activePassiveNoBgp`.
+
+**Required parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`clusterMode`](#parameter-clustersettingsclustermode-activepassivenobgpclustermode) | string | The cluster mode deciding the configuration. |
+
+### Parameter: `clusterSettings.clusterMode-activePassiveNoBgp.clusterMode`
+
+The cluster mode deciding the configuration.
+
+- Required: Yes
+- Type: string
+- Allowed:
+ ```Bicep
+ [
+ 'activePassiveNoBgp'
+ ]
+ ```
### Parameter: `gatewayType`
@@ -2729,7 +2918,7 @@ NatRules for virtual network gateway. NAT is supported on the the following SKUs
| :-- | :-- | :-- |
| [`externalMappings`](#parameter-natrulesexternalmappings) | array | An address prefix range of destination IPs on the outside network that source IPs will be mapped to. In other words, your post-NAT address prefix range. |
| [`internalMappings`](#parameter-natrulesinternalmappings) | array | An address prefix range of source IPs on the inside network that will be mapped to a set of external IPs. In other words, your pre-NAT address prefix range. |
-| [`ipConfigurationId`](#parameter-natrulesipconfigurationid) | string | A NAT rule must be configured to a specific Virtual Network Gateway instance. This is applicable to Dynamic NAT only. Static NAT rules are automatically applied to both Virtual Network Gateway instances. |
+| [`ipConfigurationResourceId`](#parameter-natrulesipconfigurationresourceid) | string | A NAT rule must be configured to a specific Virtual Network Gateway instance. This is applicable to Dynamic NAT only. Static NAT rules are automatically applied to both Virtual Network Gateway instances. |
| [`mode`](#parameter-natrulesmode) | string | The type of NAT rule for Virtual Network NAT. IngressSnat mode (also known as Ingress Source NAT) is applicable to traffic entering the Azure hub's site-to-site Virtual Network gateway. EgressSnat mode (also known as Egress Source NAT) is applicable to traffic leaving the Azure hub's Site-to-site Virtual Network gateway. |
| [`type`](#parameter-natrulestype) | string | The type of NAT rule for Virtual Network NAT. Static one-to-one NAT establishes a one-to-one relationship between an internal address and an external address while Dynamic NAT assigns an IP and port based on availability. |
@@ -2747,6 +2936,32 @@ An address prefix range of destination IPs on the outside network that source IP
- Required: No
- Type: array
+**Required parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`addressSpace`](#parameter-natrulesexternalmappingsaddressspace) | string | Address space for Vpn NatRule mapping. |
+
+**Optional parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`portRange`](#parameter-natrulesexternalmappingsportrange) | string | Port range for Vpn NatRule mapping. |
+
+### Parameter: `natRules.externalMappings.addressSpace`
+
+Address space for Vpn NatRule mapping.
+
+- Required: Yes
+- Type: string
+
+### Parameter: `natRules.externalMappings.portRange`
+
+Port range for Vpn NatRule mapping.
+
+- Required: No
+- Type: string
+
### Parameter: `natRules.internalMappings`
An address prefix range of source IPs on the inside network that will be mapped to a set of external IPs. In other words, your pre-NAT address prefix range.
@@ -2754,7 +2969,33 @@ An address prefix range of source IPs on the inside network that will be mapped
- Required: No
- Type: array
-### Parameter: `natRules.ipConfigurationId`
+**Required parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`addressSpace`](#parameter-natrulesinternalmappingsaddressspace) | string | Address space for Vpn NatRule mapping. |
+
+**Optional parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`portRange`](#parameter-natrulesinternalmappingsportrange) | string | Port range for Vpn NatRule mapping. |
+
+### Parameter: `natRules.internalMappings.addressSpace`
+
+Address space for Vpn NatRule mapping.
+
+- Required: Yes
+- Type: string
+
+### Parameter: `natRules.internalMappings.portRange`
+
+Port range for Vpn NatRule mapping.
+
+- Required: No
+- Type: string
+
+### Parameter: `natRules.ipConfigurationResourceId`
A NAT rule must be configured to a specific Virtual Network Gateway instance. This is applicable to Dynamic NAT only. Static NAT rules are automatically applied to both Virtual Network Gateway instances.
@@ -3076,7 +3317,7 @@ The SKU of the Gateway.
- Required: No
- Type: string
-- Default: `[if(equals(parameters('gatewayType'), 'VPN'), 'VpnGw1AZ', 'ErGw1AZ')]`
+- Default: `[if(equals(parameters('gatewayType'), 'Vpn'), 'VpnGw1AZ', 'ErGw1AZ')]`
- Allowed:
```Bicep
[
diff --git a/avm/res/network/virtual-network-gateway/main.bicep b/avm/res/network/virtual-network-gateway/main.bicep
index 09f281bcd4..c4edd9d1e3 100644
--- a/avm/res/network/virtual-network-gateway/main.bicep
+++ b/avm/res/network/virtual-network-gateway/main.bicep
@@ -61,7 +61,7 @@ param vpnGatewayGeneration string = 'None'
'ErGw2AZ'
'ErGw3AZ'
])
-param skuName string = (gatewayType == 'VPN') ? 'VpnGw1AZ' : 'ErGw1AZ'
+param skuName string = (gatewayType == 'Vpn') ? 'VpnGw1AZ' : 'ErGw1AZ'
@description('Optional. Specifies the VPN type.')
@allowed([
@@ -420,7 +420,7 @@ module virtualNetworkGateway_natRules 'nat-rule/main.bicep' = [
virtualNetworkGatewayName: virtualNetworkGateway.name
externalMappings: natRule.?externalMappings
internalMappings: natRule.?internalMappings
- ipConfigurationId: natRule.?ipConfigurationId
+ ipConfigurationResourceId: natRule.?ipConfigurationResourceId
mode: natRule.?mode
type: natRule.?type
}
@@ -551,6 +551,8 @@ output secondaryCustomBgpIpAddress string? = join(
// Definitions //
// =============== //
+import { mappingType } from 'nat-rule/main.bicep'
+
@export()
@description('The type for a cluster configuration.')
@discriminator('clusterMode')
@@ -563,13 +565,13 @@ type natRuleType = {
name: string
@description('Optional. An address prefix range of destination IPs on the outside network that source IPs will be mapped to. In other words, your post-NAT address prefix range.')
- externalMappings: array?
+ externalMappings: mappingType[]?
@description('Optional. An address prefix range of source IPs on the inside network that will be mapped to a set of external IPs. In other words, your pre-NAT address prefix range.')
- internalMappings: array?
+ internalMappings: mappingType[]?
@description('Optional. A NAT rule must be configured to a specific Virtual Network Gateway instance. This is applicable to Dynamic NAT only. Static NAT rules are automatically applied to both Virtual Network Gateway instances.')
- ipConfigurationId: string?
+ ipConfigurationResourceId: string?
@description('Optional. The type of NAT rule for Virtual Network NAT. IngressSnat mode (also known as Ingress Source NAT) is applicable to traffic entering the Azure hub\'s site-to-site Virtual Network gateway. EgressSnat mode (also known as Egress Source NAT) is applicable to traffic leaving the Azure hub\'s Site-to-site Virtual Network gateway.')
mode: ('EgressSnat' | 'IngressSnat')?
@@ -580,11 +582,13 @@ type natRuleType = {
@description('The type for an active-passive no BGP cluster configuration.')
type activePassiveNoBgpType = {
+ @description('Required. The cluster mode deciding the configuration.')
clusterMode: 'activePassiveNoBgp'
}
@description('The type for an active-active no BGP cluster configuration.')
type activeActiveNoBgpType = {
+ @description('Required. The cluster mode deciding the configuration.')
clusterMode: 'activeActiveNoBgp'
@description('Optional. The secondary Public IP resource ID to associate to the Virtual Network Gateway in the Active-Active mode. If empty, then a new secondary Public IP will be created as part of this module and applied to the Virtual Network Gateway.')
@@ -596,6 +600,7 @@ type activeActiveNoBgpType = {
@description('The type for an active-passive BGP cluster configuration.')
type activePassiveBgpType = {
+ @description('Required. The cluster mode deciding the configuration.')
clusterMode: 'activePassiveBgp'
@description('Optional. The Autonomous System Number value. If it\'s not provided, a default \'65515\' value will be assigned to the ASN.')
@@ -609,6 +614,7 @@ type activePassiveBgpType = {
@description('The type for an active-active BGP cluster configuration.')
type activeActiveBgpType = {
+ @description('Required. The cluster mode deciding the configuration.')
clusterMode: 'activeActiveBgp'
@description('Optional. The secondary Public IP resource ID to associate to the Virtual Network Gateway in the Active-Active mode. If empty, then a new secondary Public IP will be created as part of this module and applied to the Virtual Network Gateway.')
diff --git a/avm/res/network/virtual-network-gateway/main.json b/avm/res/network/virtual-network-gateway/main.json
index a223d703d2..cf5e3132d3 100644
--- a/avm/res/network/virtual-network-gateway/main.json
+++ b/avm/res/network/virtual-network-gateway/main.json
@@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.33.13.18514",
- "templateHash": "14522435549795935846"
+ "templateHash": "13338018442688780965"
},
"name": "Virtual Network Gateways",
"description": "This module deploys a Virtual Network Gateway."
@@ -47,6 +47,9 @@
},
"externalMappings": {
"type": "array",
+ "items": {
+ "$ref": "#/definitions/mappingType"
+ },
"nullable": true,
"metadata": {
"description": "Optional. An address prefix range of destination IPs on the outside network that source IPs will be mapped to. In other words, your post-NAT address prefix range."
@@ -54,12 +57,15 @@
},
"internalMappings": {
"type": "array",
+ "items": {
+ "$ref": "#/definitions/mappingType"
+ },
"nullable": true,
"metadata": {
"description": "Optional. An address prefix range of source IPs on the inside network that will be mapped to a set of external IPs. In other words, your pre-NAT address prefix range."
}
},
- "ipConfigurationId": {
+ "ipConfigurationResourceId": {
"type": "string",
"nullable": true,
"metadata": {
@@ -101,7 +107,10 @@
"type": "string",
"allowedValues": [
"activePassiveNoBgp"
- ]
+ ],
+ "metadata": {
+ "description": "Required. The cluster mode deciding the configuration."
+ }
}
},
"metadata": {
@@ -115,7 +124,10 @@
"type": "string",
"allowedValues": [
"activeActiveNoBgp"
- ]
+ ],
+ "metadata": {
+ "description": "Required. The cluster mode deciding the configuration."
+ }
},
"existingSecondaryPublicIPResourceId": {
"type": "string",
@@ -143,7 +155,10 @@
"type": "string",
"allowedValues": [
"activePassiveBgp"
- ]
+ ],
+ "metadata": {
+ "description": "Required. The cluster mode deciding the configuration."
+ }
},
"asn": {
"type": "int",
@@ -176,7 +191,10 @@
"type": "string",
"allowedValues": [
"activeActiveBgp"
- ]
+ ],
+ "metadata": {
+ "description": "Required. The cluster mode deciding the configuration."
+ }
},
"existingSecondaryPublicIPResourceId": {
"type": "string",
@@ -378,6 +396,30 @@
}
}
},
+ "mappingType": {
+ "type": "object",
+ "properties": {
+ "addressSpace": {
+ "type": "string",
+ "metadata": {
+ "description": "Required. Address space for Vpn NatRule mapping."
+ }
+ },
+ "portRange": {
+ "type": "string",
+ "nullable": true,
+ "metadata": {
+ "description": "Optional. Port range for Vpn NatRule mapping."
+ }
+ }
+ },
+ "metadata": {
+ "description": "The type for a mapping.",
+ "__bicep_imported_from!": {
+ "sourceTemplate": "nat-rule/main.bicep"
+ }
+ }
+ },
"roleAssignmentType": {
"type": "object",
"properties": {
@@ -531,7 +573,7 @@
},
"skuName": {
"type": "string",
- "defaultValue": "[if(equals(parameters('gatewayType'), 'VPN'), 'VpnGw1AZ', 'ErGw1AZ')]",
+ "defaultValue": "[if(equals(parameters('gatewayType'), 'Vpn'), 'VpnGw1AZ', 'ErGw1AZ')]",
"allowedValues": [
"Basic",
"VpnGw1",
@@ -1582,8 +1624,8 @@
"internalMappings": {
"value": "[tryGet(coalesce(parameters('natRules'), createArray())[copyIndex()], 'internalMappings')]"
},
- "ipConfigurationId": {
- "value": "[tryGet(coalesce(parameters('natRules'), createArray())[copyIndex()], 'ipConfigurationId')]"
+ "ipConfigurationResourceId": {
+ "value": "[tryGet(coalesce(parameters('natRules'), createArray())[copyIndex()], 'ipConfigurationResourceId')]"
},
"mode": {
"value": "[tryGet(coalesce(parameters('natRules'), createArray())[copyIndex()], 'mode')]"
@@ -1600,11 +1642,35 @@
"_generator": {
"name": "bicep",
"version": "0.33.13.18514",
- "templateHash": "12095124880230146699"
+ "templateHash": "14955935266178407034"
},
"name": "VPN Gateway NAT Rules",
"description": "This module deploys a Virtual Network Gateway NAT Rule."
},
+ "definitions": {
+ "mappingType": {
+ "type": "object",
+ "properties": {
+ "addressSpace": {
+ "type": "string",
+ "metadata": {
+ "description": "Required. Address space for Vpn NatRule mapping."
+ }
+ },
+ "portRange": {
+ "type": "string",
+ "nullable": true,
+ "metadata": {
+ "description": "Optional. Port range for Vpn NatRule mapping."
+ }
+ }
+ },
+ "metadata": {
+ "__bicep_export!": true,
+ "description": "The type for a mapping."
+ }
+ }
+ },
"parameters": {
"name": {
"type": "string",
@@ -1620,19 +1686,25 @@
},
"externalMappings": {
"type": "array",
- "defaultValue": [],
+ "items": {
+ "$ref": "#/definitions/mappingType"
+ },
+ "nullable": true,
"metadata": {
"description": "Optional. An address prefix range of destination IPs on the outside network that source IPs will be mapped to. In other words, your post-NAT address prefix range."
}
},
"internalMappings": {
"type": "array",
- "defaultValue": [],
+ "items": {
+ "$ref": "#/definitions/mappingType"
+ },
+ "nullable": true,
"metadata": {
"description": "Optional. An address prefix range of source IPs on the inside network that will be mapped to a set of external IPs. In other words, your pre-NAT address prefix range."
}
},
- "ipConfigurationId": {
+ "ipConfigurationResourceId": {
"type": "string",
"nullable": true,
"metadata": {
@@ -1676,7 +1748,7 @@
"properties": {
"externalMappings": "[parameters('externalMappings')]",
"internalMappings": "[parameters('internalMappings')]",
- "ipConfigurationId": "[parameters('ipConfigurationId')]",
+ "ipConfigurationId": "[parameters('ipConfigurationResourceId')]",
"mode": "[parameters('mode')]",
"type": "[parameters('type')]"
}
diff --git a/avm/res/network/virtual-network-gateway/nat-rule/README.md b/avm/res/network/virtual-network-gateway/nat-rule/README.md
index 70e54512ab..c9ecd7e0a7 100644
--- a/avm/res/network/virtual-network-gateway/nat-rule/README.md
+++ b/avm/res/network/virtual-network-gateway/nat-rule/README.md
@@ -34,7 +34,7 @@ This module deploys a Virtual Network Gateway NAT Rule.
| :-- | :-- | :-- |
| [`externalMappings`](#parameter-externalmappings) | array | An address prefix range of destination IPs on the outside network that source IPs will be mapped to. In other words, your post-NAT address prefix range. |
| [`internalMappings`](#parameter-internalmappings) | array | An address prefix range of source IPs on the inside network that will be mapped to a set of external IPs. In other words, your pre-NAT address prefix range. |
-| [`ipConfigurationId`](#parameter-ipconfigurationid) | string | A NAT rule must be configured to a specific Virtual Network Gateway instance. This is applicable to Dynamic NAT only. Static NAT rules are automatically applied to both Virtual Network Gateway instances. |
+| [`ipConfigurationResourceId`](#parameter-ipconfigurationresourceid) | string | A NAT rule must be configured to a specific Virtual Network Gateway instance. This is applicable to Dynamic NAT only. Static NAT rules are automatically applied to both Virtual Network Gateway instances. |
| [`mode`](#parameter-mode) | string | The type of NAT rule for Virtual Network NAT. IngressSnat mode (also known as Ingress Source NAT) is applicable to traffic entering the Azure hub's site-to-site Virtual Network gateway. EgressSnat mode (also known as Egress Source NAT) is applicable to traffic leaving the Azure hub's Site-to-site Virtual Network gateway. |
| [`type`](#parameter-type) | string | The type of NAT rule for Virtual Network NAT. Static one-to-one NAT establishes a one-to-one relationship between an internal address and an external address while Dynamic NAT assigns an IP and port based on availability. |
@@ -58,7 +58,32 @@ An address prefix range of destination IPs on the outside network that source IP
- Required: No
- Type: array
-- Default: `[]`
+
+**Required parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`addressSpace`](#parameter-externalmappingsaddressspace) | string | Address space for Vpn NatRule mapping. |
+
+**Optional parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`portRange`](#parameter-externalmappingsportrange) | string | Port range for Vpn NatRule mapping. |
+
+### Parameter: `externalMappings.addressSpace`
+
+Address space for Vpn NatRule mapping.
+
+- Required: Yes
+- Type: string
+
+### Parameter: `externalMappings.portRange`
+
+Port range for Vpn NatRule mapping.
+
+- Required: No
+- Type: string
### Parameter: `internalMappings`
@@ -66,9 +91,34 @@ An address prefix range of source IPs on the inside network that will be mapped
- Required: No
- Type: array
-- Default: `[]`
-### Parameter: `ipConfigurationId`
+**Required parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`addressSpace`](#parameter-internalmappingsaddressspace) | string | Address space for Vpn NatRule mapping. |
+
+**Optional parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`portRange`](#parameter-internalmappingsportrange) | string | Port range for Vpn NatRule mapping. |
+
+### Parameter: `internalMappings.addressSpace`
+
+Address space for Vpn NatRule mapping.
+
+- Required: Yes
+- Type: string
+
+### Parameter: `internalMappings.portRange`
+
+Port range for Vpn NatRule mapping.
+
+- Required: No
+- Type: string
+
+### Parameter: `ipConfigurationResourceId`
A NAT rule must be configured to a specific Virtual Network Gateway instance. This is applicable to Dynamic NAT only. Static NAT rules are automatically applied to both Virtual Network Gateway instances.
diff --git a/avm/res/network/virtual-network-gateway/nat-rule/main.bicep b/avm/res/network/virtual-network-gateway/nat-rule/main.bicep
index eaf93f7777..f4f0143811 100644
--- a/avm/res/network/virtual-network-gateway/nat-rule/main.bicep
+++ b/avm/res/network/virtual-network-gateway/nat-rule/main.bicep
@@ -8,13 +8,13 @@ param name string
param virtualNetworkGatewayName string
@description('Optional. An address prefix range of destination IPs on the outside network that source IPs will be mapped to. In other words, your post-NAT address prefix range.')
-param externalMappings array = []
+param externalMappings mappingType[]?
@description('Optional. An address prefix range of source IPs on the inside network that will be mapped to a set of external IPs. In other words, your pre-NAT address prefix range.')
-param internalMappings array = []
+param internalMappings mappingType[]?
@description('Optional. A NAT rule must be configured to a specific Virtual Network Gateway instance. This is applicable to Dynamic NAT only. Static NAT rules are automatically applied to both Virtual Network Gateway instances.')
-param ipConfigurationId string?
+param ipConfigurationResourceId string?
@description('Optional. The type of NAT rule for Virtual Network NAT. IngressSnat mode (also known as Ingress Source NAT) is applicable to traffic entering the Azure hub\'s site-to-site Virtual Network gateway. EgressSnat mode (also known as Egress Source NAT) is applicable to traffic leaving the Azure hub\'s Site-to-site Virtual Network gateway.')
@allowed([
@@ -40,7 +40,7 @@ resource natRule 'Microsoft.Network/virtualNetworkGateways/natRules@2023-04-01'
properties: {
externalMappings: externalMappings
internalMappings: internalMappings
- ipConfigurationId: ipConfigurationId
+ ipConfigurationId: ipConfigurationResourceId
mode: mode
type: type
}
@@ -54,3 +54,17 @@ output resourceId string = natRule.id
@description('The name of the resource group the NAT rule was deployed into.')
output resourceGroupName string = resourceGroup().name
+
+// =============== //
+// Definitions //
+// =============== //
+
+@export()
+@description('The type for a mapping.')
+type mappingType = {
+ @description('Required. Address space for Vpn NatRule mapping.')
+ addressSpace: string
+
+ @description('Optional. Port range for Vpn NatRule mapping.')
+ portRange: string?
+}
diff --git a/avm/res/network/virtual-network-gateway/nat-rule/main.json b/avm/res/network/virtual-network-gateway/nat-rule/main.json
index fe9897b4a8..813d8d56a9 100644
--- a/avm/res/network/virtual-network-gateway/nat-rule/main.json
+++ b/avm/res/network/virtual-network-gateway/nat-rule/main.json
@@ -6,11 +6,35 @@
"_generator": {
"name": "bicep",
"version": "0.33.13.18514",
- "templateHash": "12095124880230146699"
+ "templateHash": "14955935266178407034"
},
"name": "VPN Gateway NAT Rules",
"description": "This module deploys a Virtual Network Gateway NAT Rule."
},
+ "definitions": {
+ "mappingType": {
+ "type": "object",
+ "properties": {
+ "addressSpace": {
+ "type": "string",
+ "metadata": {
+ "description": "Required. Address space for Vpn NatRule mapping."
+ }
+ },
+ "portRange": {
+ "type": "string",
+ "nullable": true,
+ "metadata": {
+ "description": "Optional. Port range for Vpn NatRule mapping."
+ }
+ }
+ },
+ "metadata": {
+ "__bicep_export!": true,
+ "description": "The type for a mapping."
+ }
+ }
+ },
"parameters": {
"name": {
"type": "string",
@@ -26,19 +50,25 @@
},
"externalMappings": {
"type": "array",
- "defaultValue": [],
+ "items": {
+ "$ref": "#/definitions/mappingType"
+ },
+ "nullable": true,
"metadata": {
"description": "Optional. An address prefix range of destination IPs on the outside network that source IPs will be mapped to. In other words, your post-NAT address prefix range."
}
},
"internalMappings": {
"type": "array",
- "defaultValue": [],
+ "items": {
+ "$ref": "#/definitions/mappingType"
+ },
+ "nullable": true,
"metadata": {
"description": "Optional. An address prefix range of source IPs on the inside network that will be mapped to a set of external IPs. In other words, your pre-NAT address prefix range."
}
},
- "ipConfigurationId": {
+ "ipConfigurationResourceId": {
"type": "string",
"nullable": true,
"metadata": {
@@ -82,7 +112,7 @@
"properties": {
"externalMappings": "[parameters('externalMappings')]",
"internalMappings": "[parameters('internalMappings')]",
- "ipConfigurationId": "[parameters('ipConfigurationId')]",
+ "ipConfigurationId": "[parameters('ipConfigurationResourceId')]",
"mode": "[parameters('mode')]",
"type": "[parameters('type')]"
}
diff --git a/avm/res/network/virtual-network-gateway/tests/e2e/defaults/main.test.bicep b/avm/res/network/virtual-network-gateway/tests/e2e/defaults/main.test.bicep
index 6d06f81434..18c4ca1743 100644
--- a/avm/res/network/virtual-network-gateway/tests/e2e/defaults/main.test.bicep
+++ b/avm/res/network/virtual-network-gateway/tests/e2e/defaults/main.test.bicep
@@ -53,7 +53,6 @@ module testDeployment '../../../main.bicep' = [
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
- skuName: 'VpnGw2AZ'
gatewayType: 'Vpn'
virtualNetworkResourceId: nestedDependencies.outputs.vnetResourceId
clusterSettings: {
diff --git a/avm/res/network/virtual-network/README.md b/avm/res/network/virtual-network/README.md
index 8554fbed10..93b9498d50 100644
--- a/avm/res/network/virtual-network/README.md
+++ b/avm/res/network/virtual-network/README.md
@@ -1341,7 +1341,6 @@ Location for all resources.
- Required: No
- Type: string
- Default: `[resourceGroup().location]`
-- MaxValue: 30
### Parameter: `lock`
@@ -1349,7 +1348,6 @@ The lock settings of the service.
- Required: No
- Type: object
-- MaxValue: 30
**Optional parameters**
@@ -1372,7 +1370,6 @@ Specify the type of lock.
'ReadOnly'
]
```
-- MaxValue: 30
### Parameter: `lock.name`
@@ -1380,7 +1377,6 @@ Specify the name of lock.
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `peerings`
@@ -1388,7 +1384,6 @@ Virtual Network Peering configurations.
- Required: No
- Type: array
-- MaxValue: 30
**Required parameters**
@@ -1420,7 +1415,6 @@ The Resource ID of the VNet that is this Local VNet is being peered to. Should b
- Required: Yes
- Type: string
-- MaxValue: 30
### Parameter: `peerings.allowForwardedTraffic`
@@ -1428,7 +1422,6 @@ Whether the forwarded traffic from the VMs in the local virtual network will be
- Required: No
- Type: bool
-- MaxValue: 30
### Parameter: `peerings.allowGatewayTransit`
@@ -1436,7 +1429,6 @@ If gateway links can be used in remote virtual networking to link to this virtua
- Required: No
- Type: bool
-- MaxValue: 30
### Parameter: `peerings.allowVirtualNetworkAccess`
@@ -1444,7 +1436,6 @@ Whether the VMs in the local virtual network space would be able to access the V
- Required: No
- Type: bool
-- MaxValue: 30
### Parameter: `peerings.doNotVerifyRemoteGateways`
@@ -1452,7 +1443,6 @@ Do not verify the provisioning state of the remote gateway. Default is true.
- Required: No
- Type: bool
-- MaxValue: 30
### Parameter: `peerings.name`
@@ -1460,7 +1450,6 @@ The Name of VNET Peering resource. If not provided, default value will be peer-l
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `peerings.remotePeeringAllowForwardedTraffic`
@@ -1468,7 +1457,6 @@ Whether the forwarded traffic from the VMs in the local virtual network will be
- Required: No
- Type: bool
-- MaxValue: 30
### Parameter: `peerings.remotePeeringAllowGatewayTransit`
@@ -1476,7 +1464,6 @@ If gateway links can be used in remote virtual networking to link to this virtua
- Required: No
- Type: bool
-- MaxValue: 30
### Parameter: `peerings.remotePeeringAllowVirtualNetworkAccess`
@@ -1484,7 +1471,6 @@ Whether the VMs in the local virtual network space would be able to access the V
- Required: No
- Type: bool
-- MaxValue: 30
### Parameter: `peerings.remotePeeringDoNotVerifyRemoteGateways`
@@ -1492,7 +1478,6 @@ Do not verify the provisioning state of the remote gateway. Default is true.
- Required: No
- Type: bool
-- MaxValue: 30
### Parameter: `peerings.remotePeeringEnabled`
@@ -1500,7 +1485,6 @@ Deploy the outbound and the inbound peering.
- Required: No
- Type: bool
-- MaxValue: 30
### Parameter: `peerings.remotePeeringName`
@@ -1508,7 +1492,6 @@ The name of the VNET Peering resource in the remove Virtual Network. If not prov
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `peerings.remotePeeringUseRemoteGateways`
@@ -1516,7 +1499,6 @@ If remote gateways can be used on this virtual network. If the flag is set to tr
- Required: No
- Type: bool
-- MaxValue: 30
### Parameter: `peerings.useRemoteGateways`
@@ -1524,7 +1506,6 @@ If remote gateways can be used on this virtual network. If the flag is set to tr
- Required: No
- Type: bool
-- MaxValue: 30
### Parameter: `roleAssignments`
@@ -1532,7 +1513,6 @@ Array of role assignments to create.
- Required: No
- Type: array
-- MaxValue: 30
- Roles configurable by name:
- `'Contributor'`
- `'Network Contributor'`
@@ -1565,7 +1545,6 @@ The principal ID of the principal (user/group/identity) to assign the role to.
- Required: Yes
- Type: string
-- MaxValue: 30
### Parameter: `roleAssignments.roleDefinitionIdOrName`
@@ -1573,7 +1552,6 @@ The role to assign. You can provide either the display name of the role definiti
- Required: Yes
- Type: string
-- MaxValue: 30
### Parameter: `roleAssignments.condition`
@@ -1581,7 +1559,6 @@ The conditions on the role assignment. This limits the resources it can be assig
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `roleAssignments.conditionVersion`
@@ -1595,7 +1572,6 @@ Version of the condition.
'2.0'
]
```
-- MaxValue: 30
### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
@@ -1603,7 +1579,6 @@ The Resource Id of the delegated managed identity resource.
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `roleAssignments.description`
@@ -1611,7 +1586,6 @@ The description of the role assignment.
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `roleAssignments.name`
@@ -1619,7 +1593,6 @@ The name (as GUID) of the role assignment. If not provided, a GUID will be gener
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `roleAssignments.principalType`
@@ -1637,7 +1610,6 @@ The principal type of the assigned principal ID.
'User'
]
```
-- MaxValue: 30
### Parameter: `subnets`
@@ -1645,7 +1617,6 @@ An Array of subnets to deploy to the Virtual Network.
- Required: No
- Type: array
-- MaxValue: 30
**Required parameters**
@@ -1683,7 +1654,6 @@ The Name of the subnet resource.
- Required: Yes
- Type: string
-- MaxValue: 30
### Parameter: `subnets.addressPrefix`
@@ -1691,7 +1661,6 @@ The address prefix for the subnet. Required if `addressPrefixes` is empty.
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `subnets.addressPrefixes`
@@ -1699,7 +1668,6 @@ List of address prefixes for the subnet. Required if `addressPrefix` is empty.
- Required: No
- Type: array
-- MaxValue: 30
### Parameter: `subnets.applicationGatewayIPConfigurations`
@@ -1707,7 +1675,6 @@ Application gateway IP configurations of virtual network resource.
- Required: No
- Type: array
-- MaxValue: 30
### Parameter: `subnets.defaultOutboundAccess`
@@ -1715,7 +1682,6 @@ Set this property to false to disable default outbound connectivity for all VMs
- Required: No
- Type: bool
-- MaxValue: 30
### Parameter: `subnets.delegation`
@@ -1723,7 +1689,6 @@ The delegation to enable on the subnet.
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `subnets.natGatewayResourceId`
@@ -1731,7 +1696,6 @@ The resource ID of the NAT Gateway to use for the subnet.
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `subnets.networkSecurityGroupResourceId`
@@ -1739,7 +1703,6 @@ The resource ID of the network security group to assign to the subnet.
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `subnets.privateEndpointNetworkPolicies`
@@ -1756,7 +1719,6 @@ enable or disable apply network policies on private endpoint in the subnet.
'RouteTableEnabled'
]
```
-- MaxValue: 30
### Parameter: `subnets.privateLinkServiceNetworkPolicies`
@@ -1771,7 +1733,6 @@ enable or disable apply network policies on private link service in the subnet.
'Enabled'
]
```
-- MaxValue: 30
### Parameter: `subnets.roleAssignments`
@@ -1779,7 +1740,6 @@ Array of role assignments to create.
- Required: No
- Type: array
-- MaxValue: 30
- Roles configurable by name:
- `'Contributor'`
- `'Network Contributor'`
@@ -1812,7 +1772,6 @@ The principal ID of the principal (user/group/identity) to assign the role to.
- Required: Yes
- Type: string
-- MaxValue: 30
### Parameter: `subnets.roleAssignments.roleDefinitionIdOrName`
@@ -1820,7 +1779,6 @@ The role to assign. You can provide either the display name of the role definiti
- Required: Yes
- Type: string
-- MaxValue: 30
### Parameter: `subnets.roleAssignments.condition`
@@ -1828,7 +1786,6 @@ The conditions on the role assignment. This limits the resources it can be assig
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `subnets.roleAssignments.conditionVersion`
@@ -1842,7 +1799,6 @@ Version of the condition.
'2.0'
]
```
-- MaxValue: 30
### Parameter: `subnets.roleAssignments.delegatedManagedIdentityResourceId`
@@ -1850,7 +1806,6 @@ The Resource Id of the delegated managed identity resource.
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `subnets.roleAssignments.description`
@@ -1858,7 +1813,6 @@ The description of the role assignment.
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `subnets.roleAssignments.name`
@@ -1866,7 +1820,6 @@ The name (as GUID) of the role assignment. If not provided, a GUID will be gener
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `subnets.roleAssignments.principalType`
@@ -1884,7 +1837,6 @@ The principal type of the assigned principal ID.
'User'
]
```
-- MaxValue: 30
### Parameter: `subnets.routeTableResourceId`
@@ -1892,7 +1844,6 @@ The resource ID of the route table to assign to the subnet.
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `subnets.serviceEndpointPolicies`
@@ -1900,7 +1851,6 @@ An array of service endpoint policies.
- Required: No
- Type: array
-- MaxValue: 30
### Parameter: `subnets.serviceEndpoints`
@@ -1908,7 +1858,6 @@ The service endpoints to enable on the subnet.
- Required: No
- Type: array
-- MaxValue: 30
### Parameter: `subnets.sharingScope`
@@ -1923,7 +1872,6 @@ Set this property to Tenant to allow sharing subnet with other subscriptions in
'Tenant'
]
```
-- MaxValue: 30
### Parameter: `tags`
@@ -1931,7 +1879,6 @@ Tags of the resource.
- Required: No
- Type: object
-- MaxValue: 30
### Parameter: `virtualNetworkBgpCommunity`
@@ -1939,7 +1886,6 @@ The BGP community associated with the virtual network.
- Required: No
- Type: string
-- MaxValue: 30
### Parameter: `vnetEncryption`
@@ -1948,7 +1894,6 @@ Indicates if encryption is enabled on virtual network and if VM without encrypti
- Required: No
- Type: bool
- Default: `False`
-- MaxValue: 30
### Parameter: `vnetEncryptionEnforcement`
@@ -1964,7 +1909,6 @@ If the encrypted VNet allows VM that does not support encryption. Can only be us
'DropUnencrypted'
]
```
-- MaxValue: 30
## Outputs
diff --git a/avm/res/operational-insights/workspace/README.md b/avm/res/operational-insights/workspace/README.md
index 1d86fc74b0..6fef3968e0 100644
--- a/avm/res/operational-insights/workspace/README.md
+++ b/avm/res/operational-insights/workspace/README.md
@@ -2650,7 +2650,6 @@ LAW data export instances to be deployed.
- Required: No
- Type: array
-- MinValue: -1
**Required parameters**
@@ -2672,7 +2671,6 @@ Name of the data export.
- Required: Yes
- Type: string
-- MinValue: -1
### Parameter: `dataExports.tableNames`
@@ -2680,7 +2678,6 @@ The list of table names to export.
- Required: Yes
- Type: array
-- MinValue: -1
### Parameter: `dataExports.destination`
@@ -2688,7 +2685,6 @@ The destination of the data export.
- Required: No
- Type: object
-- MinValue: -1
**Required parameters**
@@ -2708,7 +2704,6 @@ The destination resource ID.
- Required: Yes
- Type: string
-- MinValue: -1
### Parameter: `dataExports.destination.metaData`
@@ -2716,7 +2711,6 @@ The destination metadata.
- Required: No
- Type: object
-- MinValue: -1
**Optional parameters**
@@ -2730,7 +2724,6 @@ Allows to define an Event Hub name. Not applicable when destination is Storage A
- Required: No
- Type: string
-- MinValue: -1
### Parameter: `dataExports.enable`
@@ -2738,7 +2731,6 @@ Enable or disable the data export.
- Required: No
- Type: bool
-- MinValue: -1
### Parameter: `dataRetention`
@@ -2756,8 +2748,6 @@ LAW data sources to configure.
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 730
**Required parameters**
@@ -2789,8 +2779,6 @@ The kind of data source.
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `dataSources.name`
@@ -2798,8 +2786,6 @@ Name of the data source.
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `dataSources.counterName`
@@ -2807,8 +2793,6 @@ Counter name to configure when kind is WindowsPerformanceCounter.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `dataSources.eventLogName`
@@ -2816,8 +2800,6 @@ The name of the event log to configure when kind is WindowsEvent.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `dataSources.eventTypes`
@@ -2825,8 +2807,6 @@ The event types to configure when kind is WindowsEvent.
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 730
### Parameter: `dataSources.instanceName`
@@ -2834,8 +2814,6 @@ Name of the instance to configure when kind is WindowsPerformanceCounter or Linu
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `dataSources.intervalSeconds`
@@ -2843,8 +2821,6 @@ Interval in seconds to configure when kind is WindowsPerformanceCounter or Linux
- Required: No
- Type: int
-- MinValue: 0
-- MaxValue: 730
### Parameter: `dataSources.linkedResourceId`
@@ -2852,8 +2828,6 @@ The resource id of the resource that will be linked to the workspace.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `dataSources.objectName`
@@ -2861,8 +2835,6 @@ Name of the object to configure when kind is WindowsPerformanceCounter or LinuxP
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `dataSources.performanceCounters`
@@ -2870,8 +2842,6 @@ List of counters to configure when the kind is LinuxPerformanceObject.
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 730
### Parameter: `dataSources.state`
@@ -2879,8 +2849,6 @@ State to configure when kind is IISLogs or LinuxSyslogCollection or LinuxPerform
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `dataSources.syslogName`
@@ -2888,8 +2856,6 @@ System log to configure when kind is LinuxSyslog.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `dataSources.syslogSeverities`
@@ -2897,8 +2863,6 @@ Severities to configure when kind is LinuxSyslog.
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 730
### Parameter: `dataSources.tags`
@@ -2906,8 +2870,6 @@ Tags to configure in the resource.
- Required: No
- Type: object
-- MinValue: 0
-- MaxValue: 730
### Parameter: `diagnosticSettings`
@@ -2915,8 +2877,6 @@ The diagnostic settings of the service.
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 730
**Optional parameters**
@@ -2939,8 +2899,6 @@ Resource ID of the diagnostic event hub authorization rule for the Event Hubs na
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `diagnosticSettings.eventHubName`
@@ -2948,8 +2906,6 @@ Name of the diagnostic event hub within the namespace to which logs are streamed
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
@@ -2964,8 +2920,6 @@ A string indicating whether the export to Log Analytics should use the default d
'Dedicated'
]
```
-- MinValue: 0
-- MaxValue: 730
### Parameter: `diagnosticSettings.logCategoriesAndGroups`
@@ -2973,8 +2927,6 @@ The name of logs that will be streamed. "allLogs" includes all possible logs for
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 730
**Optional parameters**
@@ -2990,8 +2942,6 @@ Name of a Diagnostic Log category for a resource type this setting is applied to
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `diagnosticSettings.logCategoriesAndGroups.categoryGroup`
@@ -2999,8 +2949,6 @@ Name of a Diagnostic Log category group for a resource type this setting is appl
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `diagnosticSettings.logCategoriesAndGroups.enabled`
@@ -3008,8 +2956,6 @@ Enable or disable the category explicitly. Default is `true`.
- Required: No
- Type: bool
-- MinValue: 0
-- MaxValue: 730
### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
@@ -3017,8 +2963,6 @@ The full ARM resource ID of the Marketplace resource to which you would like to
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `diagnosticSettings.metricCategories`
@@ -3026,8 +2970,6 @@ The name of metrics that will be streamed. "allMetrics" includes all possible me
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 730
**Required parameters**
@@ -3047,8 +2989,6 @@ Name of a Diagnostic Metric category for a resource type this setting is applied
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `diagnosticSettings.metricCategories.enabled`
@@ -3056,8 +2996,6 @@ Enable or disable the category explicitly. Default is `true`.
- Required: No
- Type: bool
-- MinValue: 0
-- MaxValue: 730
### Parameter: `diagnosticSettings.name`
@@ -3065,8 +3003,6 @@ The name of diagnostic setting.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `diagnosticSettings.storageAccountResourceId`
@@ -3074,8 +3010,6 @@ Resource ID of the diagnostic storage account. For security reasons, it is recom
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `diagnosticSettings.useThisWorkspace`
@@ -3083,8 +3017,6 @@ Instead of using an external reference, use the deployed instance as the target
- Required: No
- Type: bool
-- MinValue: 0
-- MaxValue: 730
### Parameter: `diagnosticSettings.workspaceResourceId`
@@ -3092,8 +3024,6 @@ Resource ID of the diagnostic log analytics workspace. For security reasons, it
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `enableTelemetry`
@@ -3102,8 +3032,6 @@ Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default: `True`
-- MinValue: 0
-- MaxValue: 730
### Parameter: `features`
@@ -3111,8 +3039,6 @@ The workspace features.
- Required: No
- Type: object
-- MinValue: 0
-- MaxValue: 730
**Optional parameters**
@@ -3129,8 +3055,6 @@ Disable Non-EntraID based Auth. Default is true.
- Required: No
- Type: bool
-- MinValue: 0
-- MaxValue: 730
### Parameter: `features.enableDataExport`
@@ -3138,8 +3062,6 @@ Flag that indicate if data should be exported.
- Required: No
- Type: bool
-- MinValue: 0
-- MaxValue: 730
### Parameter: `features.enableLogAccessUsingOnlyResourcePermissions`
@@ -3147,8 +3069,6 @@ Enable log access using only resource permissions. Default is false.
- Required: No
- Type: bool
-- MinValue: 0
-- MaxValue: 730
### Parameter: `features.immediatePurgeDataOn30Days`
@@ -3156,8 +3076,6 @@ Flag that describes if we want to remove the data after 30 days.
- Required: No
- Type: bool
-- MinValue: 0
-- MaxValue: 730
### Parameter: `forceCmkForQuery`
@@ -3166,8 +3084,6 @@ Indicates whether customer managed storage is mandatory for query management.
- Required: No
- Type: bool
- Default: `True`
-- MinValue: 0
-- MaxValue: 730
### Parameter: `gallerySolutions`
@@ -3175,8 +3091,6 @@ List of gallerySolutions to be created in the log analytics workspace.
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 730
**Required parameters**
@@ -3191,8 +3105,6 @@ Name of the solution.For solutions authored by Microsoft, the name must be in
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `gallerySolutions.plan`
@@ -3200,8 +3112,6 @@ Plan for solution object supported by the OperationsManagement resource provider
- Required: Yes
- Type: object
-- MinValue: 0
-- MaxValue: 730
**Required parameters**
@@ -3222,8 +3132,6 @@ The product name of the deployed solution.
For Microsoft published gallery sol
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `gallerySolutions.plan.name`
@@ -3231,8 +3139,6 @@ Name of the solution to be created.
For solutions authored by Microsoft, the n
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `gallerySolutions.plan.publisher`
@@ -3240,8 +3146,6 @@ The publisher name of the deployed solution. For Microsoft published gallery sol
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `linkedServices`
@@ -3249,8 +3153,6 @@ List of services to be linked.
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 730
**Required parameters**
@@ -3271,8 +3173,6 @@ Name of the linked service.
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `linkedServices.resourceId`
@@ -3280,8 +3180,6 @@ The resource id of the resource that will be linked to the workspace. This shoul
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `linkedServices.writeAccessResourceId`
@@ -3289,8 +3187,6 @@ The resource id of the resource that will be linked to the workspace. This shoul
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `location`
@@ -3299,8 +3195,6 @@ Location for all resources.
- Required: No
- Type: string
- Default: `[resourceGroup().location]`
-- MinValue: 0
-- MaxValue: 730
### Parameter: `lock`
@@ -3308,8 +3202,6 @@ The lock settings of the service.
- Required: No
- Type: object
-- MinValue: 0
-- MaxValue: 730
**Optional parameters**
@@ -3332,8 +3224,6 @@ Specify the type of lock.
'ReadOnly'
]
```
-- MinValue: 0
-- MaxValue: 730
### Parameter: `lock.name`
@@ -3341,8 +3231,6 @@ Specify the name of lock.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `managedIdentities`
@@ -3350,8 +3238,6 @@ The managed identity definition for this resource. Only one type of identity is
- Required: No
- Type: object
-- MinValue: 0
-- MaxValue: 730
**Optional parameters**
@@ -3366,8 +3252,6 @@ Enables system assigned managed identity on the resource.
- Required: No
- Type: bool
-- MinValue: 0
-- MaxValue: 730
### Parameter: `managedIdentities.userAssignedResourceIds`
@@ -3375,8 +3259,6 @@ The resource ID(s) to assign to the resource. Required if a user assigned identi
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 730
### Parameter: `onboardWorkspaceToSentinel`
@@ -3385,8 +3267,6 @@ Onboard the Log Analytics Workspace to Sentinel. Requires 'SecurityInsights' sol
- Required: No
- Type: bool
- Default: `False`
-- MinValue: 0
-- MaxValue: 730
### Parameter: `publicNetworkAccessForIngestion`
@@ -3402,8 +3282,6 @@ The network access type for accessing Log Analytics ingestion.
'Enabled'
]
```
-- MinValue: 0
-- MaxValue: 730
### Parameter: `publicNetworkAccessForQuery`
@@ -3419,8 +3297,6 @@ The network access type for accessing Log Analytics query.
'Enabled'
]
```
-- MinValue: 0
-- MaxValue: 730
### Parameter: `roleAssignments`
@@ -3428,8 +3304,6 @@ Array of role assignments to create.
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 730
- Roles configurable by name:
- `'Contributor'`
- `'Log Analytics Contributor'`
@@ -3467,8 +3341,6 @@ The principal ID of the principal (user/group/identity) to assign the role to.
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `roleAssignments.roleDefinitionIdOrName`
@@ -3476,8 +3348,6 @@ The role to assign. You can provide either the display name of the role definiti
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `roleAssignments.condition`
@@ -3485,8 +3355,6 @@ The conditions on the role assignment. This limits the resources it can be assig
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `roleAssignments.conditionVersion`
@@ -3500,8 +3368,6 @@ Version of the condition.
'2.0'
]
```
-- MinValue: 0
-- MaxValue: 730
### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
@@ -3509,8 +3375,6 @@ The Resource Id of the delegated managed identity resource.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `roleAssignments.description`
@@ -3518,8 +3382,6 @@ The description of the role assignment.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `roleAssignments.name`
@@ -3527,8 +3389,6 @@ The name (as GUID) of the role assignment. If not provided, a GUID will be gener
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `roleAssignments.principalType`
@@ -3546,8 +3406,6 @@ The principal type of the assigned principal ID.
'User'
]
```
-- MinValue: 0
-- MaxValue: 730
### Parameter: `savedSearches`
@@ -3555,8 +3413,6 @@ Kusto Query Language searches to save.
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 730
**Required parameters**
@@ -3583,8 +3439,6 @@ The category of the saved search. This helps the user to find a saved search fas
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `savedSearches.displayName`
@@ -3592,8 +3446,6 @@ Display name for the search.
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `savedSearches.name`
@@ -3601,8 +3453,6 @@ Name of the saved search.
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `savedSearches.query`
@@ -3610,8 +3460,6 @@ The query expression for the saved search.
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `savedSearches.etag`
@@ -3619,8 +3467,6 @@ The ETag of the saved search. To override an existing saved search, use "*" or s
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `savedSearches.functionAlias`
@@ -3628,8 +3474,6 @@ The function alias if query serves as a function.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `savedSearches.functionParameters`
@@ -3637,8 +3481,6 @@ The optional function parameters if query serves as a function. Value should be
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 730
### Parameter: `savedSearches.tags`
@@ -3646,8 +3488,6 @@ The tags attached to the saved search.
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 730
### Parameter: `savedSearches.version`
@@ -3655,8 +3495,6 @@ The version number of the query language. The current version is 2 and is the de
- Required: No
- Type: int
-- MinValue: 0
-- MaxValue: 730
### Parameter: `skuCapacityReservationLevel`
@@ -3688,8 +3526,6 @@ The name of the SKU.
'Standard'
]
```
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `storageInsightsConfigs`
@@ -3697,8 +3533,6 @@ List of storage accounts to be read by the workspace.
- Required: No
- Type: array
-- MinValue: 100
-- MaxValue: 5000
**Required parameters**
@@ -3719,8 +3553,6 @@ Resource ID of the storage account to be linked.
- Required: Yes
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `storageInsightsConfigs.containers`
@@ -3728,8 +3560,6 @@ The names of the blob containers that the workspace should read.
- Required: No
- Type: array
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `storageInsightsConfigs.tables`
@@ -3737,8 +3567,6 @@ List of tables to be read by the workspace.
- Required: No
- Type: array
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables`
@@ -3746,8 +3574,6 @@ LAW custom tables to be deployed.
- Required: No
- Type: array
-- MinValue: 100
-- MaxValue: 5000
**Required parameters**
@@ -3773,8 +3599,6 @@ The name of the table.
- Required: Yes
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.plan`
@@ -3782,8 +3606,6 @@ The plan for the table.
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.restoredLogs`
@@ -3791,8 +3613,6 @@ The restored logs for the table.
- Required: No
- Type: object
-- MinValue: 100
-- MaxValue: 5000
**Optional parameters**
@@ -3808,8 +3628,6 @@ The timestamp to end the restore by (UTC).
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.restoredLogs.sourceTable`
@@ -3817,8 +3635,6 @@ The table to restore data from.
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.restoredLogs.startRestoreTime`
@@ -3826,8 +3642,6 @@ The timestamp to start the restore from (UTC).
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.retentionInDays`
@@ -3835,8 +3649,6 @@ The retention in days for the table.
- Required: No
- Type: int
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.roleAssignments`
@@ -3844,8 +3656,6 @@ The role assignments for the table.
- Required: No
- Type: array
-- MinValue: 100
-- MaxValue: 5000
- Roles configurable by name:
- `'Contributor'`
- `'Log Analytics Contributor'`
@@ -3881,8 +3691,6 @@ The principal ID of the principal (user/group/identity) to assign the role to.
- Required: Yes
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.roleAssignments.roleDefinitionIdOrName`
@@ -3890,8 +3698,6 @@ The role to assign. You can provide either the display name of the role definiti
- Required: Yes
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.roleAssignments.condition`
@@ -3899,8 +3705,6 @@ The conditions on the role assignment. This limits the resources it can be assig
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.roleAssignments.conditionVersion`
@@ -3914,8 +3718,6 @@ Version of the condition.
'2.0'
]
```
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.roleAssignments.delegatedManagedIdentityResourceId`
@@ -3923,8 +3725,6 @@ The Resource Id of the delegated managed identity resource.
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.roleAssignments.description`
@@ -3932,8 +3732,6 @@ The description of the role assignment.
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.roleAssignments.name`
@@ -3941,8 +3739,6 @@ The name (as GUID) of the role assignment. If not provided, a GUID will be gener
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.roleAssignments.principalType`
@@ -3960,8 +3756,6 @@ The principal type of the assigned principal ID.
'User'
]
```
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.schema`
@@ -3969,8 +3763,6 @@ The schema for the table.
- Required: No
- Type: object
-- MinValue: 100
-- MaxValue: 5000
**Required parameters**
@@ -3992,8 +3784,6 @@ A list of table custom columns.
- Required: Yes
- Type: array
-- MinValue: 100
-- MaxValue: 5000
**Required parameters**
@@ -4016,8 +3806,6 @@ The column name.
- Required: Yes
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.schema.columns.type`
@@ -4038,8 +3826,6 @@ The column type.
'string'
]
```
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.schema.columns.dataTypeHint`
@@ -4056,8 +3842,6 @@ The column data type logical hint.
'uri'
]
```
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.schema.columns.description`
@@ -4065,8 +3849,6 @@ The column description.
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.schema.columns.displayName`
@@ -4074,8 +3856,6 @@ Column display name.
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.schema.name`
@@ -4083,8 +3863,6 @@ The table name.
- Required: Yes
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.schema.description`
@@ -4092,8 +3870,6 @@ The table description.
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.schema.displayName`
@@ -4101,8 +3877,6 @@ The table display name.
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.searchResults`
@@ -4110,8 +3884,6 @@ The search results for the table.
- Required: No
- Type: object
-- MinValue: 100
-- MaxValue: 5000
**Required parameters**
@@ -4134,8 +3906,6 @@ The search job query.
- Required: Yes
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.searchResults.description`
@@ -4143,8 +3913,6 @@ The search description.
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.searchResults.endSearchTime`
@@ -4152,8 +3920,6 @@ The timestamp to end the search by (UTC).
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.searchResults.limit`
@@ -4161,8 +3927,6 @@ Limit the search job to return up to specified number of rows.
- Required: No
- Type: int
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.searchResults.startSearchTime`
@@ -4170,8 +3934,6 @@ The timestamp to start the search from (UTC).
- Required: No
- Type: string
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tables.totalRetentionInDays`
@@ -4179,8 +3941,6 @@ The total retention in days for the table.
- Required: No
- Type: int
-- MinValue: 100
-- MaxValue: 5000
### Parameter: `tags`
@@ -4188,8 +3948,6 @@ Tags of the resource.
- Required: No
- Type: object
-- MinValue: 100
-- MaxValue: 5000
## Outputs
diff --git a/avm/res/operational-insights/workspace/table/README.md b/avm/res/operational-insights/workspace/table/README.md
index 32a0f782c8..31cf3685b3 100644
--- a/avm/res/operational-insights/workspace/table/README.md
+++ b/avm/res/operational-insights/workspace/table/README.md
@@ -123,8 +123,6 @@ Array of role assignments to create.
- Required: No
- Type: array
-- MinValue: -1
-- MaxValue: 730
- Roles configurable by name:
- `'Contributor'`
- `'Log Analytics Contributor'`
@@ -160,8 +158,6 @@ The principal ID of the principal (user/group/identity) to assign the role to.
- Required: Yes
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `roleAssignments.roleDefinitionIdOrName`
@@ -169,8 +165,6 @@ The role to assign. You can provide either the display name of the role definiti
- Required: Yes
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `roleAssignments.condition`
@@ -178,8 +172,6 @@ The conditions on the role assignment. This limits the resources it can be assig
- Required: No
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `roleAssignments.conditionVersion`
@@ -193,8 +185,6 @@ Version of the condition.
'2.0'
]
```
-- MinValue: -1
-- MaxValue: 730
### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
@@ -202,8 +192,6 @@ The Resource Id of the delegated managed identity resource.
- Required: No
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `roleAssignments.description`
@@ -211,8 +199,6 @@ The description of the role assignment.
- Required: No
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `roleAssignments.name`
@@ -220,8 +206,6 @@ The name (as GUID) of the role assignment. If not provided, a GUID will be gener
- Required: No
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `roleAssignments.principalType`
@@ -239,8 +223,6 @@ The principal type of the assigned principal ID.
'User'
]
```
-- MinValue: -1
-- MaxValue: 730
### Parameter: `schema`
@@ -248,8 +230,6 @@ Table's schema.
- Required: No
- Type: object
-- MinValue: -1
-- MaxValue: 730
**Required parameters**
@@ -271,8 +251,6 @@ A list of table custom columns.
- Required: Yes
- Type: array
-- MinValue: -1
-- MaxValue: 730
**Required parameters**
@@ -295,8 +273,6 @@ The column name.
- Required: Yes
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `schema.columns.type`
@@ -317,8 +293,6 @@ The column type.
'string'
]
```
-- MinValue: -1
-- MaxValue: 730
### Parameter: `schema.columns.dataTypeHint`
@@ -335,8 +309,6 @@ The column data type logical hint.
'uri'
]
```
-- MinValue: -1
-- MaxValue: 730
### Parameter: `schema.columns.description`
@@ -344,8 +316,6 @@ The column description.
- Required: No
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `schema.columns.displayName`
@@ -353,8 +323,6 @@ Column display name.
- Required: No
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `schema.name`
@@ -362,8 +330,6 @@ The table name.
- Required: Yes
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `schema.description`
@@ -371,8 +337,6 @@ The table description.
- Required: No
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `schema.displayName`
@@ -380,8 +344,6 @@ The table display name.
- Required: No
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `searchResults`
@@ -389,8 +351,6 @@ Parameters of the search job that initiated this table.
- Required: No
- Type: object
-- MinValue: -1
-- MaxValue: 730
**Required parameters**
@@ -413,8 +373,6 @@ The search job query.
- Required: Yes
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `searchResults.description`
@@ -422,8 +380,6 @@ The search description.
- Required: No
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `searchResults.endSearchTime`
@@ -431,8 +387,6 @@ The timestamp to end the search by (UTC).
- Required: No
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `searchResults.limit`
@@ -440,8 +394,6 @@ Limit the search job to return up to specified number of rows.
- Required: No
- Type: int
-- MinValue: -1
-- MaxValue: 730
### Parameter: `searchResults.startSearchTime`
@@ -449,8 +401,6 @@ The timestamp to start the search from (UTC).
- Required: No
- Type: string
-- MinValue: -1
-- MaxValue: 730
### Parameter: `totalRetentionInDays`
diff --git a/avm/res/search/search-service/README.md b/avm/res/search/search-service/README.md
index 152d7bd1b0..6c8c2fec06 100644
--- a/avm/res/search/search-service/README.md
+++ b/avm/res/search/search-service/README.md
@@ -1372,8 +1372,6 @@ Configuration details for private endpoints. For security reasons, it is recomme
- Required: No
- Type: array
-- MinValue: 1
-- MaxValue: 12
**Required parameters**
@@ -1408,8 +1406,6 @@ Resource ID of the subnet where the endpoint needs to be created.
- Required: Yes
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
@@ -1417,8 +1413,6 @@ Application security groups in which the Private Endpoint IP configuration is in
- Required: No
- Type: array
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.customDnsConfigs`
@@ -1426,8 +1420,6 @@ Custom DNS configurations.
- Required: No
- Type: array
-- MinValue: 1
-- MaxValue: 12
**Required parameters**
@@ -1447,8 +1439,6 @@ A list of private IP addresses of the private endpoint.
- Required: Yes
- Type: array
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.customDnsConfigs.fqdn`
@@ -1456,8 +1446,6 @@ FQDN that resolves to private endpoint IP address.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.customNetworkInterfaceName`
@@ -1465,8 +1453,6 @@ The custom name of the network interface attached to the Private Endpoint.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.enableTelemetry`
@@ -1474,8 +1460,6 @@ Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.ipConfigurations`
@@ -1483,8 +1467,6 @@ A list of IP configurations of the Private Endpoint. This will be used to map to
- Required: No
- Type: array
-- MinValue: 1
-- MaxValue: 12
**Required parameters**
@@ -1499,8 +1481,6 @@ The name of the resource that is unique within a resource group.
- Required: Yes
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.ipConfigurations.properties`
@@ -1508,8 +1488,6 @@ Properties of private endpoint IP configurations.
- Required: Yes
- Type: object
-- MinValue: 1
-- MaxValue: 12
**Required parameters**
@@ -1525,8 +1503,6 @@ The ID of a group obtained from the remote resource that this private endpoint s
- Required: Yes
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.ipConfigurations.properties.memberName`
@@ -1534,8 +1510,6 @@ The member name of a group obtained from the remote resource that this private e
- Required: Yes
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.ipConfigurations.properties.privateIPAddress`
@@ -1543,8 +1517,6 @@ A private IP address obtained from the private endpoint's subnet.
- Required: Yes
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.isManualConnection`
@@ -1552,8 +1524,6 @@ If Manual Private Link Connection is required.
- Required: No
- Type: bool
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.location`
@@ -1561,8 +1531,6 @@ The location to deploy the Private Endpoint to.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.lock`
@@ -1570,8 +1538,6 @@ Specify the type of lock.
- Required: No
- Type: object
-- MinValue: 1
-- MaxValue: 12
**Optional parameters**
@@ -1594,8 +1560,6 @@ Specify the type of lock.
'ReadOnly'
]
```
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.lock.name`
@@ -1603,8 +1567,6 @@ Specify the name of lock.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.manualConnectionRequestMessage`
@@ -1612,8 +1574,6 @@ A message passed to the owner of the remote resource with the manual connection
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.name`
@@ -1621,8 +1581,6 @@ The name of the Private Endpoint.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.privateDnsZoneGroup`
@@ -1630,8 +1588,6 @@ The private DNS Zone Group to configure for the Private Endpoint.
- Required: No
- Type: object
-- MinValue: 1
-- MaxValue: 12
**Required parameters**
@@ -1651,8 +1607,6 @@ The private DNS Zone Groups to associate the Private Endpoint. A DNS Zone Group
- Required: Yes
- Type: array
-- MinValue: 1
-- MaxValue: 12
**Required parameters**
@@ -1672,8 +1626,6 @@ The resource id of the private DNS zone.
- Required: Yes
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.privateDnsZoneGroup.privateDnsZoneGroupConfigs.name`
@@ -1681,8 +1633,6 @@ The name of the private DNS Zone Group config.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.privateDnsZoneGroup.name`
@@ -1690,8 +1640,6 @@ The name of the Private DNS Zone Group.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.privateLinkServiceConnectionName`
@@ -1699,8 +1647,6 @@ The name of the private link connection to create.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.resourceGroupName`
@@ -1708,8 +1654,6 @@ Specify if you want to deploy the Private Endpoint into a different Resource Gro
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.roleAssignments`
@@ -1717,8 +1661,6 @@ Array of role assignments to create.
- Required: No
- Type: array
-- MinValue: 1
-- MaxValue: 12
- Roles configurable by name:
- `'Contributor'`
- `'DNS Resolver Contributor'`
@@ -1755,8 +1697,6 @@ The principal ID of the principal (user/group/identity) to assign the role to.
- Required: Yes
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
@@ -1764,8 +1704,6 @@ The role to assign. You can provide either the display name of the role definiti
- Required: Yes
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.roleAssignments.condition`
@@ -1773,8 +1711,6 @@ The conditions on the role assignment. This limits the resources it can be assig
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
@@ -1788,8 +1724,6 @@ Version of the condition.
'2.0'
]
```
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
@@ -1797,8 +1731,6 @@ The Resource Id of the delegated managed identity resource.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.roleAssignments.description`
@@ -1806,8 +1738,6 @@ The description of the role assignment.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.roleAssignments.name`
@@ -1815,8 +1745,6 @@ The name (as GUID) of the role assignment. If not provided, a GUID will be gener
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.roleAssignments.principalType`
@@ -1834,8 +1762,6 @@ The principal type of the assigned principal ID.
'User'
]
```
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.service`
@@ -1843,8 +1769,6 @@ The subresource to deploy the Private Endpoint for. For example "vault" for a Ke
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `privateEndpoints.tags`
@@ -1852,8 +1776,6 @@ Tags to be applied on all resources/Resource Groups in this deployment.
- Required: No
- Type: object
-- MinValue: 1
-- MaxValue: 12
### Parameter: `publicNetworkAccess`
@@ -1869,8 +1791,6 @@ This value can be set to 'Enabled' to avoid breaking changes on existing custome
'Enabled'
]
```
-- MinValue: 1
-- MaxValue: 12
### Parameter: `replicaCount`
@@ -1888,8 +1808,6 @@ Array of role assignments to create.
- Required: No
- Type: array
-- MinValue: 1
-- MaxValue: 12
- Roles configurable by name:
- `'Contributor'`
- `'Owner'`
@@ -1924,8 +1842,6 @@ The principal ID of the principal (user/group/identity) to assign the role to.
- Required: Yes
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `roleAssignments.roleDefinitionIdOrName`
@@ -1933,8 +1849,6 @@ The role to assign. You can provide either the display name of the role definiti
- Required: Yes
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `roleAssignments.condition`
@@ -1942,8 +1856,6 @@ The conditions on the role assignment. This limits the resources it can be assig
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `roleAssignments.conditionVersion`
@@ -1957,8 +1869,6 @@ Version of the condition.
'2.0'
]
```
-- MinValue: 1
-- MaxValue: 12
### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
@@ -1966,8 +1876,6 @@ The Resource Id of the delegated managed identity resource.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `roleAssignments.description`
@@ -1975,8 +1883,6 @@ The description of the role assignment.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `roleAssignments.name`
@@ -1984,8 +1890,6 @@ The name (as GUID) of the role assignment. If not provided, a GUID will be gener
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `roleAssignments.principalType`
@@ -2003,8 +1907,6 @@ The principal type of the assigned principal ID.
'User'
]
```
-- MinValue: 1
-- MaxValue: 12
### Parameter: `secretsExportConfiguration`
@@ -2012,8 +1914,6 @@ Key vault reference and secret settings for the module's secrets export.
- Required: No
- Type: object
-- MinValue: 1
-- MaxValue: 12
**Required parameters**
@@ -2034,8 +1934,6 @@ The key vault name where to store the API Admin keys generated by the modules.
- Required: Yes
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `secretsExportConfiguration.primaryAdminKeyName`
@@ -2043,8 +1941,6 @@ The primaryAdminKey secret name to create.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `secretsExportConfiguration.secondaryAdminKeyName`
@@ -2052,8 +1948,6 @@ The secondaryAdminKey secret name to create.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 12
### Parameter: `semanticSearch`
@@ -2069,8 +1963,6 @@ Sets options that control the availability of semantic search. This configuratio
'standard'
]
```
-- MinValue: 1
-- MaxValue: 12
### Parameter: `sharedPrivateLinkResources`
@@ -2079,8 +1971,6 @@ The sharedPrivateLinkResources to create as part of the search Service.
- Required: No
- Type: array
- Default: `[]`
-- MinValue: 1
-- MaxValue: 12
### Parameter: `sku`
@@ -2101,8 +1991,6 @@ Defines the SKU of an Azure Cognitive Search Service, which determines price tie
'storage_optimized_l2'
]
```
-- MinValue: 1
-- MaxValue: 12
### Parameter: `tags`
@@ -2110,8 +1998,6 @@ Tags to help categorize the resource in the Azure portal.
- Required: No
- Type: object
-- MinValue: 1
-- MaxValue: 12
## Outputs
diff --git a/avm/res/storage/storage-account/blob-service/README.md b/avm/res/storage/storage-account/blob-service/README.md
index 831df721ec..ec23310a3f 100644
--- a/avm/res/storage/storage-account/blob-service/README.md
+++ b/avm/res/storage/storage-account/blob-service/README.md
@@ -88,8 +88,6 @@ This property when set to true allows deletion of the soft deleted blob versions
- Required: No
- Type: bool
- Default: `False`
-- MinValue: 1
-- MaxValue: 146000
### Parameter: `containerDeleteRetentionPolicyDays`
@@ -107,8 +105,6 @@ The blob service properties for container soft delete. Indicates whether DeleteR
- Required: No
- Type: bool
- Default: `True`
-- MinValue: 1
-- MaxValue: 365
### Parameter: `containers`
@@ -116,8 +112,6 @@ Blob containers to create.
- Required: No
- Type: array
-- MinValue: 1
-- MaxValue: 365
### Parameter: `corsRules`
@@ -125,8 +119,6 @@ The List of CORS rules. You can include up to five CorsRule elements in the requ
- Required: No
- Type: array
-- MinValue: 1
-- MaxValue: 365
**Required parameters**
@@ -144,8 +136,6 @@ A list of headers allowed to be part of the cross-origin request.
- Required: Yes
- Type: array
-- MinValue: 1
-- MaxValue: 365
### Parameter: `corsRules.allowedMethods`
@@ -168,8 +158,6 @@ A list of HTTP methods that are allowed to be executed by the origin.
'TRACE'
]
```
-- MinValue: 1
-- MaxValue: 365
### Parameter: `corsRules.allowedOrigins`
@@ -177,8 +165,6 @@ A list of origin domains that will be allowed via CORS, or "*" to allow all doma
- Required: Yes
- Type: array
-- MinValue: 1
-- MaxValue: 365
### Parameter: `corsRules.exposedHeaders`
@@ -186,8 +172,6 @@ A list of response headers to expose to CORS clients.
- Required: Yes
- Type: array
-- MinValue: 1
-- MaxValue: 365
### Parameter: `corsRules.maxAgeInSeconds`
@@ -195,8 +179,6 @@ The number of seconds that the client/browser should cache a preflight response.
- Required: Yes
- Type: int
-- MinValue: 1
-- MaxValue: 365
### Parameter: `defaultServiceVersion`
@@ -205,8 +187,6 @@ Indicates the default version to use for requests to the Blob service if an inco
- Required: No
- Type: string
- Default: `''`
-- MinValue: 1
-- MaxValue: 365
### Parameter: `deleteRetentionPolicyAllowPermanentDelete`
@@ -215,8 +195,6 @@ This property when set to true allows deletion of the soft deleted blob versions
- Required: No
- Type: bool
- Default: `False`
-- MinValue: 1
-- MaxValue: 365
### Parameter: `deleteRetentionPolicyDays`
@@ -235,8 +213,6 @@ The blob service properties for blob soft delete.
- Required: No
- Type: bool
- Default: `True`
-- MinValue: 1
-- MaxValue: 365
### Parameter: `diagnosticSettings`
@@ -244,8 +220,6 @@ The diagnostic settings of the service.
- Required: No
- Type: array
-- MinValue: 1
-- MaxValue: 365
**Optional parameters**
@@ -267,8 +241,6 @@ Resource ID of the diagnostic event hub authorization rule for the Event Hubs na
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 365
### Parameter: `diagnosticSettings.eventHubName`
@@ -276,8 +248,6 @@ Name of the diagnostic event hub within the namespace to which logs are streamed
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 365
### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
@@ -292,8 +262,6 @@ A string indicating whether the export to Log Analytics should use the default d
'Dedicated'
]
```
-- MinValue: 1
-- MaxValue: 365
### Parameter: `diagnosticSettings.logCategoriesAndGroups`
@@ -301,8 +269,6 @@ The name of logs that will be streamed. "allLogs" includes all possible logs for
- Required: No
- Type: array
-- MinValue: 1
-- MaxValue: 365
**Optional parameters**
@@ -318,8 +284,6 @@ Name of a Diagnostic Log category for a resource type this setting is applied to
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 365
### Parameter: `diagnosticSettings.logCategoriesAndGroups.categoryGroup`
@@ -327,8 +291,6 @@ Name of a Diagnostic Log category group for a resource type this setting is appl
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 365
### Parameter: `diagnosticSettings.logCategoriesAndGroups.enabled`
@@ -336,8 +298,6 @@ Enable or disable the category explicitly. Default is `true`.
- Required: No
- Type: bool
-- MinValue: 1
-- MaxValue: 365
### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
@@ -345,8 +305,6 @@ The full ARM resource ID of the Marketplace resource to which you would like to
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 365
### Parameter: `diagnosticSettings.metricCategories`
@@ -354,8 +312,6 @@ The name of metrics that will be streamed. "allMetrics" includes all possible me
- Required: No
- Type: array
-- MinValue: 1
-- MaxValue: 365
**Required parameters**
@@ -375,8 +331,6 @@ Name of a Diagnostic Metric category for a resource type this setting is applied
- Required: Yes
- Type: string
-- MinValue: 1
-- MaxValue: 365
### Parameter: `diagnosticSettings.metricCategories.enabled`
@@ -384,8 +338,6 @@ Enable or disable the category explicitly. Default is `true`.
- Required: No
- Type: bool
-- MinValue: 1
-- MaxValue: 365
### Parameter: `diagnosticSettings.name`
@@ -393,8 +345,6 @@ The name of the diagnostic setting.
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 365
### Parameter: `diagnosticSettings.storageAccountResourceId`
@@ -402,8 +352,6 @@ Resource ID of the diagnostic storage account. For security reasons, it is recom
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 365
### Parameter: `diagnosticSettings.workspaceResourceId`
@@ -411,8 +359,6 @@ Resource ID of the diagnostic log analytics workspace. For security reasons, it
- Required: No
- Type: string
-- MinValue: 1
-- MaxValue: 365
### Parameter: `isVersioningEnabled`
@@ -421,8 +367,6 @@ Use versioning to automatically maintain previous versions of your blobs.
- Required: No
- Type: bool
- Default: `False`
-- MinValue: 1
-- MaxValue: 365
### Parameter: `lastAccessTimeTrackingPolicyEnabled`
@@ -431,8 +375,6 @@ The blob service property to configure last access time based tracking policy. W
- Required: No
- Type: bool
- Default: `False`
-- MinValue: 1
-- MaxValue: 365
### Parameter: `restorePolicyDays`
@@ -442,7 +384,6 @@ How long this blob can be restored. It should be less than DeleteRetentionPolicy
- Type: int
- Default: `7`
- MinValue: 1
-- MaxValue: 365
### Parameter: `restorePolicyEnabled`
@@ -451,8 +392,6 @@ The blob service properties for blob restore policy. If point-in-time restore is
- Required: No
- Type: bool
- Default: `False`
-- MinValue: 1
-- MaxValue: 365
## Outputs
diff --git a/avm/res/virtual-machine-images/image-template/README.md b/avm/res/virtual-machine-images/image-template/README.md
index c411e4fe7d..63126d6638 100644
--- a/avm/res/virtual-machine-images/image-template/README.md
+++ b/avm/res/virtual-machine-images/image-template/README.md
@@ -791,6 +791,239 @@ The distribution targets where the image output needs to go to.
- Required: Yes
- Type: array
+- Discriminator: `type`
+
+
The available variants are:
+
+| Variant | Description |
+| :-- | :-- |
+| [`SharedImage`](#variant-distributionstype-sharedimage) | |
+| [`ManagedImage`](#variant-distributionstype-managedimage) | |
+| [`VHD`](#variant-distributionstype-vhd) | |
+
+### Variant: `distributions.type-SharedImage`
+
+
+To use this variant, set the property `type` to `SharedImage`.
+
+**Required parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`sharedImageGalleryImageDefinitionResourceId`](#parameter-distributionstype-sharedimagesharedimagegalleryimagedefinitionresourceid) | string | Resource ID of Compute Gallery Image Definition to distribute image to, e.g.: /subscriptions//resourceGroups//providers/Microsoft.Compute/galleries//images/. |
+| [`type`](#parameter-distributionstype-sharedimagetype) | string | The type of distribution. |
+
+**Optional parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`artifactTags`](#parameter-distributionstype-sharedimageartifacttags) | object | Tags that will be applied to the artifact once it has been created/updated by the distributor. If not provided will set tags based on the provided image source. |
+| [`excludeFromLatest`](#parameter-distributionstype-sharedimageexcludefromlatest) | bool | The exclude from latest flag of the image. Defaults to [false]. |
+| [`replicationRegions`](#parameter-distributionstype-sharedimagereplicationregions) | array | The replication regions of the image. Defaults to the value of the 'location' parameter. |
+| [`runOutputName`](#parameter-distributionstype-sharedimagerunoutputname) | string | The name to be used for the associated RunOutput. If not provided, a name will be calculated. |
+| [`sharedImageGalleryImageDefinitionTargetVersion`](#parameter-distributionstype-sharedimagesharedimagegalleryimagedefinitiontargetversion) | string | Version of the Compute Gallery Image. Supports the following Version Syntax: Major.Minor.Build (i.e., '1.1.1' or '10.1.2'). If not provided, a version will be calculated. |
+| [`storageAccountType`](#parameter-distributionstype-sharedimagestorageaccounttype) | string | The storage account type of the image. Defaults to [Standard_LRS]. |
+
+### Parameter: `distributions.type-SharedImage.sharedImageGalleryImageDefinitionResourceId`
+
+Resource ID of Compute Gallery Image Definition to distribute image to, e.g.: /subscriptions//resourceGroups//providers/Microsoft.Compute/galleries//images/.
+
+- Required: Yes
+- Type: string
+
+### Parameter: `distributions.type-SharedImage.type`
+
+The type of distribution.
+
+- Required: Yes
+- Type: string
+- Allowed:
+ ```Bicep
+ [
+ 'SharedImage'
+ ]
+ ```
+
+### Parameter: `distributions.type-SharedImage.artifactTags`
+
+Tags that will be applied to the artifact once it has been created/updated by the distributor. If not provided will set tags based on the provided image source.
+
+- Required: No
+- Type: object
+
+### Parameter: `distributions.type-SharedImage.excludeFromLatest`
+
+The exclude from latest flag of the image. Defaults to [false].
+
+- Required: No
+- Type: bool
+
+### Parameter: `distributions.type-SharedImage.replicationRegions`
+
+The replication regions of the image. Defaults to the value of the 'location' parameter.
+
+- Required: No
+- Type: array
+
+### Parameter: `distributions.type-SharedImage.runOutputName`
+
+The name to be used for the associated RunOutput. If not provided, a name will be calculated.
+
+- Required: No
+- Type: string
+
+### Parameter: `distributions.type-SharedImage.sharedImageGalleryImageDefinitionTargetVersion`
+
+Version of the Compute Gallery Image. Supports the following Version Syntax: Major.Minor.Build (i.e., '1.1.1' or '10.1.2'). If not provided, a version will be calculated.
+
+- Required: No
+- Type: string
+
+### Parameter: `distributions.type-SharedImage.storageAccountType`
+
+The storage account type of the image. Defaults to [Standard_LRS].
+
+- Required: No
+- Type: string
+- Allowed:
+ ```Bicep
+ [
+ 'Standard_LRS'
+ 'Standard_ZRS'
+ ]
+ ```
+
+### Variant: `distributions.type-ManagedImage`
+
+
+To use this variant, set the property `type` to `ManagedImage`.
+
+**Required parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`imageResourceId`](#parameter-distributionstype-managedimageimageresourceid) | string | The resource ID of the managed image. Defaults to a compute image with name 'imageName-baseTime' in the current resource group. |
+| [`type`](#parameter-distributionstype-managedimagetype) | string | The type of distribution. |
+
+**Conditional parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`imageName`](#parameter-distributionstype-managedimageimagename) | string | Name of the managed or unmanaged image that will be created. |
+
+**Optional parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`artifactTags`](#parameter-distributionstype-managedimageartifacttags) | object | Tags that will be applied to the artifact once it has been created/updated by the distributor. If not provided will set tags based on the provided image source. |
+| [`location`](#parameter-distributionstype-managedimagelocation) | string | Azure location for the image, should match if image already exists. Defaults to the value of the 'location' parameter. |
+| [`runOutputName`](#parameter-distributionstype-managedimagerunoutputname) | string | The name to be used for the associated RunOutput. If not provided, a name will be calculated. |
+
+### Parameter: `distributions.type-ManagedImage.imageResourceId`
+
+The resource ID of the managed image. Defaults to a compute image with name 'imageName-baseTime' in the current resource group.
+
+- Required: No
+- Type: string
+
+### Parameter: `distributions.type-ManagedImage.type`
+
+The type of distribution.
+
+- Required: Yes
+- Type: string
+- Allowed:
+ ```Bicep
+ [
+ 'ManagedImage'
+ ]
+ ```
+
+### Parameter: `distributions.type-ManagedImage.imageName`
+
+Name of the managed or unmanaged image that will be created.
+
+- Required: Yes
+- Type: string
+
+### Parameter: `distributions.type-ManagedImage.artifactTags`
+
+Tags that will be applied to the artifact once it has been created/updated by the distributor. If not provided will set tags based on the provided image source.
+
+- Required: No
+- Type: object
+
+### Parameter: `distributions.type-ManagedImage.location`
+
+Azure location for the image, should match if image already exists. Defaults to the value of the 'location' parameter.
+
+- Required: No
+- Type: string
+
+### Parameter: `distributions.type-ManagedImage.runOutputName`
+
+The name to be used for the associated RunOutput. If not provided, a name will be calculated.
+
+- Required: No
+- Type: string
+
+### Variant: `distributions.type-VHD`
+
+
+To use this variant, set the property `type` to `VHD`.
+
+**Required parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`type`](#parameter-distributionstype-vhdtype) | string | The type of distribution. |
+
+**Conditional parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`imageName`](#parameter-distributionstype-vhdimagename) | string | Name of the managed or unmanaged image that will be created. |
+
+**Optional parameters**
+
+| Parameter | Type | Description |
+| :-- | :-- | :-- |
+| [`artifactTags`](#parameter-distributionstype-vhdartifacttags) | object | Tags that will be applied to the artifact once it has been created/updated by the distributor. If not provided will set tags based on the provided image source. |
+| [`runOutputName`](#parameter-distributionstype-vhdrunoutputname) | string | The name to be used for the associated RunOutput. If not provided, a name will be calculated. |
+
+### Parameter: `distributions.type-VHD.type`
+
+The type of distribution.
+
+- Required: Yes
+- Type: string
+- Allowed:
+ ```Bicep
+ [
+ 'VHD'
+ ]
+ ```
+
+### Parameter: `distributions.type-VHD.imageName`
+
+Name of the managed or unmanaged image that will be created.
+
+- Required: Yes
+- Type: string
+
+### Parameter: `distributions.type-VHD.artifactTags`
+
+Tags that will be applied to the artifact once it has been created/updated by the distributor. If not provided will set tags based on the provided image source.
+
+- Required: No
+- Type: object
+
+### Parameter: `distributions.type-VHD.runOutputName`
+
+The name to be used for the associated RunOutput. If not provided, a name will be calculated.
+
+- Required: No
+- Type: string
### Parameter: `imageSource`
@@ -857,8 +1090,6 @@ Customization steps to be run when building the VM image.
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 960
### Parameter: `enableTelemetry`
@@ -867,8 +1098,6 @@ Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default: `True`
-- MinValue: 0
-- MaxValue: 960
### Parameter: `errorHandlingOnCustomizerError`
@@ -884,8 +1113,6 @@ If there is a customizer error and this field is set to 'cleanup', the build VM
'cleanup'
]
```
-- MinValue: 0
-- MaxValue: 960
### Parameter: `errorHandlingOnValidationError`
@@ -901,8 +1128,6 @@ If there is a validation error and this field is set to 'cleanup', the build VM
'cleanup'
]
```
-- MinValue: 0
-- MaxValue: 960
### Parameter: `location`
@@ -911,8 +1136,6 @@ Location for all resources.
- Required: No
- Type: string
- Default: `[resourceGroup().location]`
-- MinValue: 0
-- MaxValue: 960
### Parameter: `lock`
@@ -920,8 +1143,6 @@ The lock settings of the service.
- Required: No
- Type: object
-- MinValue: 0
-- MaxValue: 960
**Optional parameters**
@@ -944,8 +1165,6 @@ Specify the type of lock.
'ReadOnly'
]
```
-- MinValue: 0
-- MaxValue: 960
### Parameter: `lock.name`
@@ -953,8 +1172,6 @@ Specify the name of lock.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `managedResourceTags`
@@ -962,8 +1179,6 @@ Tags that will be applied to the resource group and/or resources created by the
- Required: No
- Type: object
-- MinValue: 0
-- MaxValue: 960
### Parameter: `optimizeVmBoot`
@@ -978,8 +1193,6 @@ The optimize property can be enabled while creating a VM image and allows VM opt
'Enabled'
]
```
-- MinValue: 0
-- MaxValue: 960
### Parameter: `osDiskSizeGB`
@@ -988,8 +1201,6 @@ Specifies the size of OS disk.
- Required: No
- Type: int
- Default: `128`
-- MinValue: 0
-- MaxValue: 960
### Parameter: `roleAssignments`
@@ -997,8 +1208,6 @@ Array of role assignments to create.
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 960
- Roles configurable by name:
- `'Contributor'`
- `'Owner'`
@@ -1030,8 +1239,6 @@ The principal ID of the principal (user/group/identity) to assign the role to.
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `roleAssignments.roleDefinitionIdOrName`
@@ -1039,8 +1246,6 @@ The role to assign. You can provide either the display name of the role definiti
- Required: Yes
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `roleAssignments.condition`
@@ -1048,8 +1253,6 @@ The conditions on the role assignment. This limits the resources it can be assig
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `roleAssignments.conditionVersion`
@@ -1063,8 +1266,6 @@ Version of the condition.
'2.0'
]
```
-- MinValue: 0
-- MaxValue: 960
### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
@@ -1072,8 +1273,6 @@ The Resource Id of the delegated managed identity resource.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `roleAssignments.description`
@@ -1081,8 +1280,6 @@ The description of the role assignment.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `roleAssignments.name`
@@ -1090,8 +1287,6 @@ The name (as GUID) of the role assignment. If not provided, a GUID will be gener
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `roleAssignments.principalType`
@@ -1109,8 +1304,6 @@ The principal type of the assigned principal ID.
'User'
]
```
-- MinValue: 0
-- MaxValue: 960
### Parameter: `stagingResourceGroupResourceId`
@@ -1118,8 +1311,6 @@ Resource ID of the staging resource group in the same subscription and location
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `subnetResourceId`
@@ -1127,8 +1318,6 @@ Resource ID of an already existing subnet, e.g.: /subscriptions/
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `tags`
@@ -1136,8 +1325,6 @@ Tags of the resource.
- Required: No
- Type: object
-- MinValue: 0
-- MaxValue: 960
### Parameter: `validationProcess`
@@ -1145,8 +1332,6 @@ Configuration options and list of validations to be performed on the resulting i
- Required: No
- Type: object
-- MinValue: 0
-- MaxValue: 960
**Optional parameters**
@@ -1162,8 +1347,6 @@ If validation fails and this field is set to false, output image(s) will not be
- Required: No
- Type: bool
-- MinValue: 0
-- MaxValue: 960
### Parameter: `validationProcess.inVMValidations`
@@ -1171,8 +1354,6 @@ A list of validators that will be performed on the image. Azure Image Builder su
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 960
**Required parameters**
@@ -1208,8 +1389,6 @@ The type of validation.
'Shell'
]
```
-- MinValue: 0
-- MaxValue: 960
### Parameter: `validationProcess.inVMValidations.destination`
@@ -1217,8 +1396,6 @@ Destination of the file.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `validationProcess.inVMValidations.inline`
@@ -1226,8 +1403,6 @@ Array of commands to be run, separated by commas.
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 960
### Parameter: `validationProcess.inVMValidations.name`
@@ -1235,8 +1410,6 @@ Friendly Name to provide context on what this validation step does.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `validationProcess.inVMValidations.runAsSystem`
@@ -1244,8 +1417,6 @@ If specified, the PowerShell script will be run with elevated privileges using t
- Required: No
- Type: bool
-- MinValue: 0
-- MaxValue: 960
### Parameter: `validationProcess.inVMValidations.runElevated`
@@ -1253,8 +1424,6 @@ If specified, the PowerShell script will be run with elevated privileges.
- Required: No
- Type: bool
-- MinValue: 0
-- MaxValue: 960
### Parameter: `validationProcess.inVMValidations.scriptUri`
@@ -1262,8 +1431,6 @@ URI of the PowerShell script to be run for validation. It can be a github link,
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `validationProcess.inVMValidations.sha256Checksum`
@@ -1271,8 +1438,6 @@ Value of sha256 checksum of the file, you generate this locally, and then Image
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `validationProcess.inVMValidations.sourceUri`
@@ -1280,8 +1445,6 @@ The source URI of the file.
- Required: No
- Type: string
-- MinValue: 0
-- MaxValue: 960
### Parameter: `validationProcess.inVMValidations.validExitCodes`
@@ -1289,8 +1452,6 @@ Valid codes that can be returned from the script/inline command, this avoids rep
- Required: No
- Type: array
-- MinValue: 0
-- MaxValue: 960
### Parameter: `validationProcess.sourceValidationOnly`
@@ -1298,8 +1459,6 @@ If this field is set to true, the image specified in the 'source' section will d
- Required: No
- Type: bool
-- MinValue: 0
-- MaxValue: 960
### Parameter: `vmSize`
@@ -1308,8 +1467,6 @@ Specifies the size for the VM.
- Required: No
- Type: string
- Default: `'Standard_D2s_v3'`
-- MinValue: 0
-- MaxValue: 960
### Parameter: `vmUserAssignedIdentities`
@@ -1318,8 +1475,6 @@ List of User-Assigned Identities associated to the Build VM for accessing Azure
- Required: No
- Type: array
- Default: `[]`
-- MinValue: 0
-- MaxValue: 960
### Parameter: `baseTime`
@@ -1328,8 +1483,6 @@ Do not provide a value! This date is used to generate a unique image template na
- Required: No
- Type: string
- Default: `[utcNow('yyyy-MM-dd-HH-mm-ss')]`
-- MinValue: 0
-- MaxValue: 960
## Outputs
diff --git a/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 b/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1
index 6d594c0a2d..ec6445d45c 100644
--- a/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1
+++ b/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1
@@ -195,6 +195,32 @@ function Set-ParametersSection {
return $updatedFileContent
}
+<#
+.SYNOPSIS
+Reformat a given string to a markdown-compatible header reference
+
+.DESCRIPTION
+This function removes characters that are not part of a markdown header and adds a header reference to the front
+
+.PARAMETER StringToFormat
+Mandatory. The string to format
+
+.EXAMPLE
+Get-MarkdownHeaderReferenceFormattedString 'Parameter: dataCollectionRuleProperties.kind-AgentSettings.description'
+
+The given string is reformatted to: '#parameter-datacollectionrulepropertieskind-agentsettingsdescription'.
+#>
+function Get-MarkdownHeaderReferenceFormattedString {
+
+ [CmdletBinding()]
+ param (
+ [Parameter()]
+ [string] $StringToFormat
+ )
+
+ return ('#{0}' -f ($StringToFormat -replace '^#+ ', '' -replace '\s', '-' -replace '`|\:|\.', '').ToLower())
+}
+
<#
.SYNOPSIS
Update parts of the 'parameters' section of the given readme file, if user defined types are used
@@ -211,9 +237,6 @@ Optional. Hashtable of the user defined properties
.PARAMETER ParentName
Optional. Name of the parameter, that has the user defined types
-.PARAMETER ParentIdentifierLink
-Optional. Link of the parameter, that has the user defined types
-
.PARAMETER ColumnsInOrder
Optional. The order of parameter categories to show in the readme parameters section.
@@ -223,7 +246,7 @@ Set-DefinitionSection -TemplateFileContent @{ resource = @{}; ... } -ColumnsInOr
Top-level invocation. Will start from the TemplateFile's parameters object and recursively crawl through all children. Tables will be ordered by 'Required' first and 'Optional' after.
.EXAMPLE
-Set-DefinitionSection -TemplateFileContent @{ resource = @{}; ... } -Properties @{ @{ name = @{ type = 'string'; 'allowedValues' = @('A1','A2','A3','A4','A5','A6'); 'nullable' = $true; (...) } -ParentName 'diagnosticSettings' -ParentIdentifierLink '#parameter-diagnosticsettings'
+Set-DefinitionSection -TemplateFileContent @{ resource = @{}; ... } -Properties @{ @{ name = @{ type = 'string'; 'allowedValues' = @('A1','A2','A3','A4','A5','A6'); 'nullable' = $true; (...) } -ParentName 'diagnosticSettings'
Child-level invocation during recursion.
@@ -241,9 +264,6 @@ function Set-DefinitionSection {
[Parameter(Mandatory = $false)]
[string] $ParentName,
- [Parameter(Mandatory = $false)]
- [string] $ParentIdentifierLink,
-
[Parameter(Mandatory = $false)]
[string[]] $ColumnsInOrder = @('Required', 'Conditional', 'Optional', 'Generated')
)
@@ -263,6 +283,7 @@ function Set-DefinitionSection {
if ($paramsWithoutCategory = $TemplateFileContent.parameters.Values | Where-Object { $_.metadata.description -notmatch '^\w+?\.' }) {
$formattedParam = $paramsWithoutCategory | ForEach-Object { [PSCustomObject]@{ name = $_.name; description = $_.metadata.description } } | ConvertTo-Json -Compress
Write-Error ("Each parameter description should start with a category like [Required. / Optional. / Conditional. ]. The following parameters are missing such a category: `n$formattedParam`n")
+ return
}
} else {
$descriptions = $Properties.Values.metadata.description
@@ -273,6 +294,7 @@ function Set-DefinitionSection {
if ($paramsWithoutCategory = $Properties.Values | Where-Object { $_.metadata.description -notmatch '^\w+?\.' }) {
$formattedParam = $paramsWithoutCategory | ForEach-Object { [PSCustomObject]@{ name = $_.name; description = $_.metadata.description } } | ConvertTo-Json -Compress
Write-Error ("Each parameter description should start with a category like [Required. / Optional. / Conditional. ]. The following parameters are missing such a category: `n$formattedParam`n")
+ return
}
}
@@ -313,7 +335,7 @@ function Set-DefinitionSection {
$paramIdentifier = (-not [String]::IsNullOrEmpty($ParentName)) ? '{0}.{1}' -f $ParentName, $parameter.name : $parameter.name
$paramHeader = '### Parameter: `{0}`' -f $paramIdentifier
- $paramIdentifierLink = (-not [String]::IsNullOrEmpty($ParentIdentifierLink)) ? ('{0}{1}' -f $ParentIdentifierLink, $parameter.name).ToLower() : ('#{0}' -f $paramHeader.TrimStart('#').Trim().ToLower()) -replace '[:|`]' -replace ' ', '-'
+ $paramIdentifierLink = Get-MarkdownHeaderReferenceFormattedString $paramHeader
# definition type (if any)
if ($parameter.Keys -contains '$ref') {
@@ -424,11 +446,16 @@ function Set-DefinitionSection {
}
# add MinValue and maxValue to the description
- if ($parameter.ContainsKey('minValue')) {
+ if ($parameter.Keys -contains 'minValue') {
$formattedMinValue = "- MinValue: $($parameter['minValue'])"
+ } else {
+ $formattedMinValue = $null # Reset value for future iterations
}
- if ($parameter.ContainsKey('maxValue')) {
+
+ if ($parameter.Keys -contains 'maxValue') {
$formattedMaxValue = "- MaxValue: $($parameter['maxValue'])"
+ } else {
+ $formattedMaxValue = $null # Reset value for future iterations
}
# Special case for 'roleAssignments' parameter
@@ -493,6 +520,7 @@ function Set-DefinitionSection {
((-not [String]::IsNullOrEmpty($formattedMaxValue)) ? $formattedMaxValue : $null),
((-not [String]::IsNullOrEmpty($formattedRoleNames)) ? $formattedRoleNames : $null),
((-not [String]::IsNullOrEmpty($formattedExample)) ? $formattedExample : $null),
+ (($definition.discriminator.propertyName) ? ('- Discriminator: `{0}`' -f $definition.discriminator.propertyName) : $null),
''
) | Where-Object { $null -ne $_ }
@@ -503,27 +531,75 @@ function Set-DefinitionSection {
if ($definition.Keys -contains 'items' -and ($definition.items.properties.Keys -or $definition.items.additionalProperties.Keys)) {
if ($definition.items.properties.Keys) {
$childProperties = $definition.items.properties
- $sectionContent = Set-DefinitionSection -TemplateFileContent $TemplateFileContent -Properties $childProperties -ParentName $paramIdentifier -ParentIdentifierLink $paramIdentifierLink -ColumnsInOrder $ColumnsInOrder
+ $sectionContent = Set-DefinitionSection -TemplateFileContent $TemplateFileContent -Properties $childProperties -ParentName $paramIdentifier -ColumnsInOrder $ColumnsInOrder
$listSectionContent += $sectionContent
}
if ($definition.items.additionalProperties.Keys) {
$childProperties = $definition.items.additionalProperties
$formattedProperties = @{ '>Any_other_property<' = $childProperties }
- $sectionContent = Set-DefinitionSection -TemplateFileContent $TemplateFileContent -Properties $formattedProperties -ParentName $paramIdentifier -ParentIdentifierLink $paramIdentifierLink -ColumnsInOrder $ColumnsInOrder
+ $sectionContent = Set-DefinitionSection -TemplateFileContent $TemplateFileContent -Properties $formattedProperties -ParentName $paramIdentifier -ColumnsInOrder $ColumnsInOrder
$listSectionContent += $sectionContent
}
- } elseif ($definition.type -eq 'object' -and ($definition.properties.Keys -or $definition.additionalProperties.Keys)) {
+ } elseif ($definition.type -in @('object', 'secureObject') -and ($definition.properties.Keys -or $definition.additionalProperties.Keys)) {
if ($definition.properties.Keys) {
$childProperties = $definition.properties
- $sectionContent = Set-DefinitionSection -TemplateFileContent $TemplateFileContent -Properties $childProperties -ParentName $paramIdentifier -ParentIdentifierLink $paramIdentifierLink -ColumnsInOrder $ColumnsInOrder
+ $sectionContent = Set-DefinitionSection -TemplateFileContent $TemplateFileContent -Properties $childProperties -ParentName $paramIdentifier -ColumnsInOrder $ColumnsInOrder
$listSectionContent += $sectionContent
}
if ($definition.additionalProperties.Keys) {
$childProperties = $definition.additionalProperties
$formattedProperties = @{ '>Any_other_property<' = $childProperties }
- $sectionContent = Set-DefinitionSection -TemplateFileContent $TemplateFileContent -Properties $formattedProperties -ParentName $paramIdentifier -ParentIdentifierLink $paramIdentifierLink -ColumnsInOrder $ColumnsInOrder
+ $sectionContent = Set-DefinitionSection -TemplateFileContent $TemplateFileContent -Properties $formattedProperties -ParentName $paramIdentifier -ColumnsInOrder $ColumnsInOrder
$listSectionContent += $sectionContent
}
+ } elseif ($definition.type -in @('object', 'secureObject') -and $definition.keys -contains 'discriminator') {
+ <#
+ Discriminator type. E.g.,
+
+ @discriminator('kind')
+ type mainType = subTypeA | subTypeB | subTypeC
+ #>
+
+ $variantTableSectionContent += @(
+ 'The available variants are:
',
+ ''
+ '| Variant | Description |',
+ '| :-- | :-- |'
+ )
+
+ $variantContent = @()
+ foreach ($typeVariantName in $definition.discriminator.mapping.Keys) {
+ $typeVariant = $definition.discriminator.mapping[$typeVariantName]
+ $resolvedTypeVariant = $TemplateFileContent.definitions[(Split-Path $typeVariant.'$ref' -Leaf)]
+ $variantDescription = ($resolvedTypeVariant.metadata.description ?? '').Replace("`r`n", '').Replace("`n", '
')
+
+ $variantIdentifier = '{0}.{1}-{2}' -f $paramIdentifier, $definition.discriminator.propertyName, $typeVariantName
+ $variantIdentifierHeader = "### Variant: ``$variantIdentifier``"
+ $variantIdentifierLink = Get-MarkdownHeaderReferenceFormattedString $variantIdentifierHeader
+
+ $variantContent += @(
+ $variantIdentifierHeader,
+ $variantDescription,
+ '',
+ ('To use this variant, set the property `{0}` to `{1}`.' -f $definition.discriminator.propertyName, $typeVariantName),
+ ''
+ )
+
+ $variantTableSectionContent += ('| [`{0}`]({1}) | {2} |' -f $typeVariantName, $variantIdentifierLink, $variantDescription)
+
+ $definitionSectionInputObject = @{
+ TemplateFileContent = $TemplateFileContent
+ Properties = $resolvedTypeVariant.properties
+ ParentName = $variantIdentifier
+ ColumnsInOrder = $ColumnsInOrder
+ }
+ $sectionContent = Set-DefinitionSection @definitionSectionInputObject
+ $variantContent += $sectionContent
+ }
+
+ $variantTableSectionContent += ''
+ $listSectionContent += $variantTableSectionContent
+ $listSectionContent += $variantContent
}
}
}
diff --git a/utilities/pipelines/staticValidation/compliance/helper/helper.psm1 b/utilities/pipelines/staticValidation/compliance/helper/helper.psm1
index a59a90968a..b19604d111 100644
--- a/utilities/pipelines/staticValidation/compliance/helper/helper.psm1
+++ b/utilities/pipelines/staticValidation/compliance/helper/helper.psm1
@@ -36,21 +36,21 @@ Get the index of the '# Parameters' header in the given markdown array @('# Para
#>
function Get-MarkdownSectionStartIndex {
- [CmdletBinding()]
- param (
- [Parameter(Mandatory = $true)]
- [array] $ReadMeContent,
-
- [Parameter(Mandatory = $true)]
- [string] $MarkdownSectionIdentifier
- )
-
- $sectionStartIndex = 0
- while ($ReadMeContent[$sectionStartIndex] -notlike $MarkdownSectionIdentifier -and -not ($sectionStartIndex -ge $ReadMeContent.count)) {
- $sectionStartIndex++
- }
+ [CmdletBinding()]
+ param (
+ [Parameter(Mandatory = $true)]
+ [array] $ReadMeContent,
+
+ [Parameter(Mandatory = $true)]
+ [string] $MarkdownSectionIdentifier
+ )
+
+ $sectionStartIndex = 0
+ while ($ReadMeContent[$sectionStartIndex] -notlike $MarkdownSectionIdentifier -and -not ($sectionStartIndex -ge $ReadMeContent.count)) {
+ $sectionStartIndex++
+ }
- return $sectionStartIndex
+ return $sectionStartIndex
}
<#
@@ -73,21 +73,21 @@ Search for the end index of the section starting in index 2 in array @('somrthin
#>
function Get-MarkdownSectionEndIndex {
- [CmdletBinding()]
- param (
- [Parameter(Mandatory = $true)]
- [array] $ReadMeContent,
+ [CmdletBinding()]
+ param (
+ [Parameter(Mandatory = $true)]
+ [array] $ReadMeContent,
- [Parameter(Mandatory = $true)]
- [int] $SectionStartIndex
- )
+ [Parameter(Mandatory = $true)]
+ [int] $SectionStartIndex
+ )
- $sectionEndIndex = $sectionStartIndex + 1
- while ($readMeContent[$sectionEndIndex] -notlike '*# *' -and -not ($sectionEndIndex -ge $ReadMeContent.count)) {
- $sectionEndIndex++
- }
+ $sectionEndIndex = $sectionStartIndex + 1
+ while ($readMeContent[$sectionEndIndex] -notlike '*# *' -and -not ($sectionEndIndex -ge $ReadMeContent.count)) {
+ $sectionEndIndex++
+ }
- return $sectionEndIndex
+ return $sectionEndIndex
}
<#
@@ -110,28 +110,28 @@ Get the start & end index of the table in section '# Parameters' in the given Re
#>
function Get-TableStartAndEndIndex {
- [CmdletBinding()]
- param (
- [Parameter(Mandatory = $true)]
- [array] $ReadMeContent,
+ [CmdletBinding()]
+ param (
+ [Parameter(Mandatory = $true)]
+ [array] $ReadMeContent,
- [Parameter(Mandatory = $true)]
- [string] $MarkdownSectionIdentifier
- )
+ [Parameter(Mandatory = $true)]
+ [string] $MarkdownSectionIdentifier
+ )
- $sectionStartIndex = Get-MarkdownSectionStartIndex -ReadMeContent $ReadMeContent -MarkdownSectionIdentifier $MarkdownSectionIdentifier
+ $sectionStartIndex = Get-MarkdownSectionStartIndex -ReadMeContent $ReadMeContent -MarkdownSectionIdentifier $MarkdownSectionIdentifier
- $tableStartIndex = $sectionStartIndex + 1
- while ($readMeContent[$tableStartIndex] -notlike '*|*' -and -not ($tableStartIndex -ge $readMeContent.count)) {
- $tableStartIndex++
- }
+ $tableStartIndex = $sectionStartIndex + 1
+ while ($readMeContent[$tableStartIndex] -notlike '*|*' -and -not ($tableStartIndex -ge $readMeContent.count)) {
+ $tableStartIndex++
+ }
- $tableEndIndex = $tableStartIndex + 2
- while ($readMeContent[$tableEndIndex] -like '|*' -and -not ($tableEndIndex -ge $readMeContent.count)) {
- $tableEndIndex++
- }
+ $tableEndIndex = $tableStartIndex + 2
+ while ($readMeContent[$tableEndIndex] -like '|*' -and -not ($tableEndIndex -ge $readMeContent.count)) {
+ $tableEndIndex++
+ }
- return $tableStartIndex, $tableEndIndex
+ return $tableStartIndex, $tableEndIndex
}
<#
@@ -151,32 +151,32 @@ Returns @{ b = 'b' }
#>
function Remove-JSONMetadata {
- [CmdletBinding()]
- param (
- [Parameter(Mandatory = $true)]
- [hashtable] $TemplateObject
- )
- $TemplateObject.Remove('metadata')
-
- # Differantiate case: With user defined types (resources property is hashtable) vs without user defined types (resources property is array)
- if ($TemplateObject.resources.GetType().BaseType.Name -eq 'Hashtable') {
- # Case: Hashtable
- $resourceIdentifiers = $TemplateObject.resources.Keys
- for ($index = 0; $index -lt $resourceIdentifiers.Count; $index++) {
- if ($TemplateObject.resources[$resourceIdentifiers[$index]].type -eq 'Microsoft.Resources/deployments' -and $TemplateObject.resources[$resourceIdentifiers[$index]].properties.template.GetType().BaseType.Name -eq 'Hashtable') {
- $TemplateObject.resources[$resourceIdentifiers[$index]] = Remove-JSONMetadata -TemplateObject $TemplateObject.resources[$resourceIdentifiers[$index]].properties.template
- }
- }
- } else {
- # Case: Array
- for ($index = 0; $index -lt $TemplateObject.resources.Count; $index++) {
- if ($TemplateObject.resources[$index].type -eq 'Microsoft.Resources/deployments' -and $TemplateObject.resources[$index].properties.template.GetType().BaseType.Name -eq 'Hashtable') {
- $TemplateObject.resources[$index] = Remove-JSONMetadata -TemplateObject $TemplateObject.resources[$index].properties.template
- }
+ [CmdletBinding()]
+ param (
+ [Parameter(Mandatory = $true)]
+ [hashtable] $TemplateObject
+ )
+ $TemplateObject.Remove('metadata')
+
+ # Differantiate case: With user defined types (resources property is hashtable) vs without user defined types (resources property is array)
+ if ($TemplateObject.resources.GetType().BaseType.Name -eq 'Hashtable') {
+ # Case: Hashtable
+ $resourceIdentifiers = $TemplateObject.resources.Keys
+ for ($index = 0; $index -lt $resourceIdentifiers.Count; $index++) {
+ if ($TemplateObject.resources[$resourceIdentifiers[$index]].type -eq 'Microsoft.Resources/deployments' -and $TemplateObject.resources[$resourceIdentifiers[$index]].properties.template.GetType().BaseType.Name -eq 'Hashtable') {
+ $TemplateObject.resources[$resourceIdentifiers[$index]] = Remove-JSONMetadata -TemplateObject $TemplateObject.resources[$resourceIdentifiers[$index]].properties.template
+ }
+ }
+ } else {
+ # Case: Array
+ for ($index = 0; $index -lt $TemplateObject.resources.Count; $index++) {
+ if ($TemplateObject.resources[$index].type -eq 'Microsoft.Resources/deployments' -and $TemplateObject.resources[$index].properties.template.GetType().BaseType.Name -eq 'Hashtable') {
+ $TemplateObject.resources[$index] = Remove-JSONMetadata -TemplateObject $TemplateObject.resources[$index].properties.template
+ }
+ }
}
- }
- return $TemplateObject
+ return $TemplateObject
}
<#
@@ -209,76 +209,90 @@ Child-level invocation during recursion.
The function is recursive and will also output grand, great grand children, ... .
#>
function Resolve-ReadMeParameterList {
- param (
- [Parameter(Mandatory = $true)]
- [hashtable] $TemplateFileContent,
-
- [Parameter(Mandatory = $false)]
- [hashtable] $Properties,
-
- [Parameter(Mandatory = $false)]
- [string] $ParentName
- )
-
- $parameterSet = @{}
-
- if (-not $Properties -and -not $TemplateFileContent.parameters) {
- # no Parameters / properties on this level or in the template
- return $parameterSet
- } elseif (-not $Properties) {
- # Top-level invocation
- # Add name as property for later reference
- $TemplateFileContent.parameters.Keys | ForEach-Object { $TemplateFileContent.parameters[$_]['name'] = $_ }
- [array] $parameters = $TemplateFileContent.parameters.Values | Sort-Object -Property 'Name' -Culture 'en-US'
- } else {
- # Add name as property for later reference
- $Properties.Keys | ForEach-Object { $Properties[$_]['name'] = $_ }
- $parameters = $Properties.Values | Sort-Object -Property 'Name' -Culture 'en-US'
- }
-
- foreach ($parameter in $parameters) {
-
- ######################
- # Gather details #
- ######################
-
- $paramIdentifier = (-not [String]::IsNullOrEmpty($ParentName)) ? '{0}.{1}' -f $ParentName, $parameter.name : $parameter.name
-
- # definition type (if any)
- if ($parameter.Keys -contains '$ref') {
- $identifier = Split-Path $parameter.'$ref' -Leaf
- $definition = $TemplateFileContent.definitions[$identifier]
- # $type = $definition['type']
- } elseif ($parameter.Keys -contains 'items' -and $parameter.items.type -in @('object', 'array') -or $parameter.type -eq 'object') {
- # Array has nested non-primitive type (array/object) - and if array, the the UDT itself is declared as the array
- $definition = $parameter
- } elseif ($parameter.Keys -contains 'items' -and $parameter.items.keys -contains '$ref') {
- # Array has nested non-primitive type (array) - and the parameter is defined as an array of the UDT
- $identifier = Split-Path $parameter.items.'$ref' -Leaf
- $definition = $TemplateFileContent.definitions[$identifier]
+ param (
+ [Parameter(Mandatory = $true)]
+ [hashtable] $TemplateFileContent,
+
+ [Parameter(Mandatory = $false)]
+ [hashtable] $Properties,
+
+ [Parameter(Mandatory = $false)]
+ [string] $ParentName
+ )
+
+ $parameterSet = @{}
+
+ if (-not $Properties -and -not $TemplateFileContent.parameters) {
+ # no Parameters / properties on this level or in the template
+ return $parameterSet
+ } elseif (-not $Properties) {
+ # Top-level invocation
+ # Add name as property for later reference
+ $TemplateFileContent.parameters.Keys | ForEach-Object { $TemplateFileContent.parameters[$_]['name'] = $_ }
+ [array] $parameters = $TemplateFileContent.parameters.Values | Sort-Object -Property 'Name' -Culture 'en-US'
} else {
- $definition = $null
+ # Add name as property for later reference
+ $Properties.Keys | ForEach-Object { $Properties[$_]['name'] = $_ }
+ $parameters = $Properties.Values | Sort-Object -Property 'Name' -Culture 'en-US'
}
- $parameterSet[$paramIdentifier] = $parameter
-
- #recursive call for children
- if ($definition) {
- if ($definition.ContainsKey('items') -and $definition['items'].ContainsKey('properties')) {
- $childProperties = $definition['items']['properties']
- } elseif ($definition.type -eq 'object' -and $definition['properties']) {
- $childProperties = $definition['properties']
- } else {
- $childProperties = $null
- }
-
- if ($childProperties) {
- $parameterSet += Resolve-ReadMeParameterList -TemplateFileContent $TemplateFileContent -Properties $childProperties -ParentName $paramIdentifier
- }
+ foreach ($parameter in $parameters) {
+
+ ######################
+ # Gather details #
+ ######################
+
+ $paramIdentifier = (-not [String]::IsNullOrEmpty($ParentName)) ? '{0}.{1}' -f $ParentName, $parameter.name : $parameter.name
+
+ # definition type (if any)
+ if ($parameter.Keys -contains '$ref') {
+ $identifier = Split-Path $parameter.'$ref' -Leaf
+ $definition = $TemplateFileContent.definitions[$identifier]
+ # $type = $definition['type']
+ } elseif ($parameter.Keys -contains 'items' -and $parameter.items.type -in @('object', 'array') -or $parameter.type -eq 'object') {
+ # Array has nested non-primitive type (array/object) - and if array, the the UDT itself is declared as the array
+ $definition = $parameter
+ } elseif ($parameter.Keys -contains 'items' -and $parameter.items.keys -contains '$ref') {
+ # Array has nested non-primitive type (array) - and the parameter is defined as an array of the UDT
+ $identifier = Split-Path $parameter.items.'$ref' -Leaf
+ $definition = $TemplateFileContent.definitions[$identifier]
+ } else {
+ $definition = $null
+ }
+
+ $parameterSet[$paramIdentifier] = $parameter
+
+ #recursive call for children
+ if ($definition -and $definition.keys -notcontains 'discriminator') {
+ if ($definition.ContainsKey('items') -and $definition['items'].ContainsKey('properties')) {
+ $childProperties = $definition['items']['properties']
+ } elseif ($definition.type -in @('object', 'secureObject') -and $definition['properties']) {
+ $childProperties = $definition['properties']
+ } else {
+ $childProperties = $null
+ }
+
+ if ($childProperties) {
+ $parameterSet += Resolve-ReadMeParameterList -TemplateFileContent $TemplateFileContent -Properties $childProperties -ParentName $paramIdentifier
+ }
+ } elseif ($definition -and $definition.keys -contains 'discriminator') {
+
+ $variants = $definition.discriminator.mapping.values.'$ref' | ForEach-Object {
+ $variantName = Split-Path $_ -Leaf
+ @{
+ name = $variantName
+ properties = $TemplateFileContent.definitions[$variantName].properties
+ }
+ }
+
+ foreach ($variant in $variants) {
+ $paramIdentifier = (-not [String]::IsNullOrEmpty($ParentName)) ? '{0}.{1}.{2}' -f $ParentName, $parameter.name, $variant.name : '{0}.{1}' -f $parameter.name, $variant.name
+ $parameterSet += Resolve-ReadMeParameterList -TemplateFileContent $TemplateFileContent -Properties $variant.properties -ParentName $paramIdentifier
+ }
+ }
}
- }
- return $parameterSet
+ return $parameterSet
}
<#
@@ -297,33 +311,33 @@ Get the environment variables from the given workflow
#>
function Get-WorkflowEnvVariablesAsObject {
- [CmdletBinding()]
- param (
- [Parameter(Mandatory)]
- [string] $WorkflowPath
- )
-
- $contentFileContent = Get-Content -Path $workflowPath
+ [CmdletBinding()]
+ param (
+ [Parameter(Mandatory)]
+ [string] $WorkflowPath
+ )
- $envStartIndex = $contentFileContent.IndexOf('env:')
+ $contentFileContent = Get-Content -Path $workflowPath
- if (-not $envStartIndex) {
- # No env variables defined in the given workflow
- return @{}
- }
+ $envStartIndex = $contentFileContent.IndexOf('env:')
- $searchIndex = $envStartIndex + 1
- $envVars = @{}
+ if (-not $envStartIndex) {
+ # No env variables defined in the given workflow
+ return @{}
+ }
- while ($searchIndex -lt $contentFileContent.Count) {
- $line = $contentFileContent[$searchIndex]
- if ($line -match "^\s+(\w+): (?:`"|')*([^`"'\s]+)(?:`"|')*$") {
- $envVars[($Matches[1])] = $Matches[2]
- } else {
- break
+ $searchIndex = $envStartIndex + 1
+ $envVars = @{}
+
+ while ($searchIndex -lt $contentFileContent.Count) {
+ $line = $contentFileContent[$searchIndex]
+ if ($line -match "^\s+(\w+): (?:`"|')*([^`"'\s]+)(?:`"|')*$") {
+ $envVars[($Matches[1])] = $Matches[2]
+ } else {
+ break
+ }
+ $searchIndex++
}
- $searchIndex++
- }
- return $envVars
+ return $envVars
}
diff --git a/utilities/pipelines/staticValidation/compliance/module.tests.ps1 b/utilities/pipelines/staticValidation/compliance/module.tests.ps1
index 1fc0499c62..4517668803 100644
--- a/utilities/pipelines/staticValidation/compliance/module.tests.ps1
+++ b/utilities/pipelines/staticValidation/compliance/module.tests.ps1
@@ -395,10 +395,14 @@ Describe 'Module tests' -Tag 'Module' {
. (Join-Path $repoRootPath 'utilities' 'pipelines' 'sharedScripts' 'Set-ModuleReadMe.ps1')
# Apply update with already compiled template content
- Set-ModuleReadMe -TemplateFilePath $templateFilePath -PreLoadedContent @{
- TemplateFileContent = $templateFileContent
- CrossReferencedModuleList = $crossReferencedModuleList
- TelemetryFileContent = $telemetryFileContent
+ try {
+ Set-ModuleReadMe -TemplateFilePath $templateFilePath -PreLoadedContent @{
+ TemplateFileContent = $templateFileContent
+ CrossReferencedModuleList = $crossReferencedModuleList
+ TelemetryFileContent = $telemetryFileContent
+ } -ErrorAction 'Stop' -ErrorVariable 'InvocationError'
+ } catch {
+ $InvocationError[-1] | Should -BeNullOrEmpty -Because "Failed to apply the `Set-ModuleReadMe` function due to an error during the function's execution. Please review the inner error(s)."
}
# Get hash after 'update'