Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: avm.res.network.virtual-network upgrade types and fix description #3657

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions avm/res/network/virtual-network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ This module deploys a Virtual Network (vNet).
| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
| `Microsoft.Network/virtualNetworks` | [2024-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/virtualNetworks) |
| `Microsoft.Network/virtualNetworks/subnets` | [2024-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/virtualNetworks/subnets) |
| `Microsoft.Network/virtualNetworks/virtualNetworkPeerings` | [2024-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/virtualNetworks/virtualNetworkPeerings) |
| `Microsoft.Network/virtualNetworks` | [2024-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2024-01-01/virtualNetworks) |
| `Microsoft.Network/virtualNetworks/subnets` | [2024-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2024-01-01/virtualNetworks/subnets) |
| `Microsoft.Network/virtualNetworks/virtualNetworkPeerings` | [2024-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2024-01-01/virtualNetworks/virtualNetworkPeerings) |

## Usage examples

Expand Down
6 changes: 3 additions & 3 deletions avm/res/network/virtual-network/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ param vnetEncryptionEnforcement string = 'AllowUnencrypted'
@description('Optional. The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between 4 and 30 minutes. Default value 0 will set the property to null.')
param flowTimeoutInMinutes int = 0

import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.1.0'
import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. The diagnostic settings of the service.')
param diagnosticSettings diagnosticSettingFullType[]?

import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.1.0'
import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. The lock settings of the service.')
param lock lockType?

import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.1.0'
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. Array of role assignments to create.')
param roleAssignments roleAssignmentType[]?

Expand Down
14 changes: 7 additions & 7 deletions avm/res/network/virtual-network/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "14315915542626804458"
"templateHash": "17189690206142535748"
},
"name": "Virtual Networks",
"description": "This module deploys a Virtual Network (vNet).",
Expand Down Expand Up @@ -371,7 +371,7 @@
"metadata": {
"description": "An AVM-aligned type for a diagnostic setting. To be used if both logs & metrics are supported by the resource provider.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -401,7 +401,7 @@
"metadata": {
"description": "An AVM-aligned type for a lock.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -476,7 +476,7 @@
"metadata": {
"description": "An AVM-aligned type for a role assignment.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
}
Expand Down Expand Up @@ -827,7 +827,7 @@
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "6411714881793832751"
"templateHash": "6385219422012602265"
},
"name": "Virtual Network Subnets",
"description": "This module deploys a Virtual Network Subnet.",
Expand Down Expand Up @@ -905,7 +905,7 @@
"metadata": {
"description": "An AVM-aligned type for a role assignment.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
}
Expand All @@ -914,7 +914,7 @@
"name": {
"type": "string",
"metadata": {
"description": "Requird. The Name of the subnet resource."
"description": "Required. The Name of the subnet resource."
}
},
"virtualNetworkName": {
Expand Down
24 changes: 12 additions & 12 deletions avm/res/network/virtual-network/subnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ This module deploys a Virtual Network Subnet.
| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
| `Microsoft.Network/virtualNetworks/subnets` | [2024-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/virtualNetworks/subnets) |
| `Microsoft.Network/virtualNetworks/subnets` | [2024-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2024-01-01/virtualNetworks/subnets) |

## Parameters

**Required parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`name`](#parameter-name) | string | The Name of the subnet resource. |

**Conditional parameters**

| Parameter | Type | Description |
Expand All @@ -43,11 +49,12 @@ This module deploys a Virtual Network Subnet.
| [`serviceEndpoints`](#parameter-serviceendpoints) | array | The service endpoints to enable on the subnet. |
| [`sharingScope`](#parameter-sharingscope) | string | Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant. This property can only be set if defaultOutboundAccess is set to false, both properties can only be set if subnet is empty. |

**Requird parameters**
### Parameter: `name`

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`name`](#parameter-name) | string | The Name of the subnet resource. |
The Name of the subnet resource.

- Required: Yes
- Type: string

### Parameter: `addressPrefix`

Expand Down Expand Up @@ -277,13 +284,6 @@ Set this property to Tenant to allow sharing subnet with other subscriptions in
]
```

### Parameter: `name`

The Name of the subnet resource.

- Required: Yes
- Type: string

## Outputs

| Output | Type | Description |
Expand Down
4 changes: 2 additions & 2 deletions avm/res/network/virtual-network/subnet/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ metadata name = 'Virtual Network Subnets'
metadata description = 'This module deploys a Virtual Network Subnet.'
metadata owner = 'Azure/module-maintainers'

@description('Requird. The Name of the subnet resource.')
@description('Required. The Name of the subnet resource.')
param name string

@description('Conditional. The name of the parent virtual network. Required if the template is used in a standalone deployment.')
Expand Down Expand Up @@ -57,7 +57,7 @@ param applicationGatewayIPConfigurations array = []
@description('Optional. An array of service endpoint policies.')
param serviceEndpointPolicies array = []

import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.1.0'
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. Array of role assignments to create.')
param roleAssignments roleAssignmentType[]?

Expand Down
6 changes: 3 additions & 3 deletions avm/res/network/virtual-network/subnet/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "6411714881793832751"
"templateHash": "6385219422012602265"
},
"name": "Virtual Network Subnets",
"description": "This module deploys a Virtual Network Subnet.",
Expand Down Expand Up @@ -84,7 +84,7 @@
"metadata": {
"description": "An AVM-aligned type for a role assignment.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
}
Expand All @@ -93,7 +93,7 @@
"name": {
"type": "string",
"metadata": {
"description": "Requird. The Name of the subnet resource."
"description": "Required. The Name of the subnet resource."
}
},
"virtualNetworkName": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This module deploys a Virtual Network Peering.

| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.Network/virtualNetworks/virtualNetworkPeerings` | [2024-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/virtualNetworks/virtualNetworkPeerings) |
| `Microsoft.Network/virtualNetworks/virtualNetworkPeerings` | [2024-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2024-01-01/virtualNetworks/virtualNetworkPeerings) |

## Parameters

Expand Down