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

[Modules] Updated the NetworkManager module to the newest API #3442

Merged
merged 2 commits into from
Jul 21, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var builtInRoleNames = {
'Windows Admin Center Administrator Login': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a6333a3e-0164-44c3-b281-7a577aff287f')
}

resource networkManager 'Microsoft.Network/networkManagers@2022-07-01' existing = {
resource networkManager 'Microsoft.Network/networkManagers@2023-02-01' existing = {
name: last(split(resourceId, '/'))!
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ param virtualNetworkSpoke2Name string
@description('Optional. The location to deploy resources to.')
param location string = resourceGroup().location

resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
name: managedIdentityName
location: location
}
Expand All @@ -23,7 +23,7 @@ var addressPrefixSpoke1 = '172.16.0.0/12'
var addressPrefixSpoke2 = '192.168.0.0/16'
var subnetName = 'defaultSubnet'

resource virtualNetworkHub 'Microsoft.Network/virtualNetworks@2022-01-01' = {
resource virtualNetworkHub 'Microsoft.Network/virtualNetworks@2023-02-01' = {
name: virtualNetworkHubName
location: location
properties: {
Expand All @@ -43,7 +43,7 @@ resource virtualNetworkHub 'Microsoft.Network/virtualNetworks@2022-01-01' = {
}
}

resource virtualNetworkSpoke1 'Microsoft.Network/virtualNetworks@2022-01-01' = {
resource virtualNetworkSpoke1 'Microsoft.Network/virtualNetworks@2023-02-01' = {
name: virtualNetworkSpoke1Name
location: location
properties: {
Expand All @@ -63,7 +63,7 @@ resource virtualNetworkSpoke1 'Microsoft.Network/virtualNetworks@2022-01-01' = {
}
}

resource virtualNetworkSpoke2 'Microsoft.Network/virtualNetworks@2022-01-01' = {
resource virtualNetworkSpoke2 'Microsoft.Network/virtualNetworks@2023-02-01' = {
name: virtualNetworkSpoke2Name
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ param namePrefix string = '[[namePrefix]]'

// General resources
// =================
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
name: resourceGroupName
location: location
}
Expand Down
16 changes: 8 additions & 8 deletions modules/network/network-managers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ This module deploys a Network Manager.
| :-- | :-- |
| `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.Network/networkManagers` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-07-01/networkManagers) |
| `Microsoft.Network/networkManagers/connectivityConfigurations` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-07-01/networkManagers/connectivityConfigurations) |
| `Microsoft.Network/networkManagers/networkGroups` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-07-01/networkManagers/networkGroups) |
| `Microsoft.Network/networkManagers/networkGroups/staticMembers` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-07-01/networkManagers/networkGroups/staticMembers) |
| `Microsoft.Network/networkManagers/scopeConnections` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-07-01/networkManagers/scopeConnections) |
| `Microsoft.Network/networkManagers/securityAdminConfigurations` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-07-01/networkManagers/securityAdminConfigurations) |
| `Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-07-01/networkManagers/securityAdminConfigurations/ruleCollections) |
| `Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections/rules` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-07-01/networkManagers/securityAdminConfigurations/ruleCollections/rules) |
| `Microsoft.Network/networkManagers` | [2023-02-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-02-01/networkManagers) |
| `Microsoft.Network/networkManagers/connectivityConfigurations` | [2023-02-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-02-01/networkManagers/connectivityConfigurations) |
| `Microsoft.Network/networkManagers/networkGroups` | [2023-02-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-02-01/networkManagers/networkGroups) |
| `Microsoft.Network/networkManagers/networkGroups/staticMembers` | [2023-02-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-02-01/networkManagers/networkGroups/staticMembers) |
| `Microsoft.Network/networkManagers/scopeConnections` | [2023-02-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-02-01/networkManagers/scopeConnections) |
| `Microsoft.Network/networkManagers/securityAdminConfigurations` | [2023-02-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-02-01/networkManagers/securityAdminConfigurations) |
| `Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections` | [2023-02-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-02-01/networkManagers/securityAdminConfigurations/ruleCollections) |
| `Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections/rules` | [2023-02-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-02-01/networkManagers/securityAdminConfigurations/ruleCollections/rules) |

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Connectivity configurations define hub-and-spoke or mesh topologies applied to o

| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.Network/networkManagers/connectivityConfigurations` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-07-01/networkManagers/connectivityConfigurations) |
| `Microsoft.Network/networkManagers/connectivityConfigurations` | [2023-02-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-02-01/networkManagers/connectivityConfigurations) |

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ param isGlobal string = 'False'
@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
properties: {
mode: 'Incremental'
Expand All @@ -51,11 +51,11 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}
}

resource networkManager 'Microsoft.Network/networkManagers@2022-07-01' existing = {
resource networkManager 'Microsoft.Network/networkManagers@2023-02-01' existing = {
name: networkManagerName
}

resource connectivityConfiguration 'Microsoft.Network/networkManagers/connectivityConfigurations@2022-07-01' = {
resource connectivityConfiguration 'Microsoft.Network/networkManagers/connectivityConfigurations@2023-02-01' = {
name: name
parent: networkManager
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.18.4.5664",
"templateHash": "16667559174627826583"
"templateHash": "2027184094485121627"
}
},
"parameters": {
Expand Down Expand Up @@ -88,7 +88,7 @@
{
"condition": "[parameters('enableDefaultTelemetry')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2021-04-01",
"apiVersion": "2022-09-01",
"name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
"properties": {
"mode": "Incremental",
Expand All @@ -101,7 +101,7 @@
},
{
"type": "Microsoft.Network/networkManagers/connectivityConfigurations",
"apiVersion": "2022-07-01",
"apiVersion": "2023-02-01",
"name": "[format('{0}/{1}', parameters('networkManagerName'), parameters('name'))]",
"properties": {
"appliesToGroups": "[parameters('appliesToGroups')]",
Expand Down
4 changes: 2 additions & 2 deletions modules/network/network-managers/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ param enableDefaultTelemetry bool = true

var enableReferencedModulesTelemetry = false

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
properties: {
mode: 'Incremental'
Expand All @@ -59,7 +59,7 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}
}

resource networkManager 'Microsoft.Network/networkManagers@2022-07-01' = {
resource networkManager 'Microsoft.Network/networkManagers@2023-02-01' = {
name: name
location: location
tags: tags
Expand Down
50 changes: 25 additions & 25 deletions modules/network/network-managers/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.18.4.5664",
"templateHash": "16703336352641395900"
"templateHash": "4892863970159068528"
}
},
"parameters": {
Expand Down Expand Up @@ -113,7 +113,7 @@
{
"condition": "[parameters('enableDefaultTelemetry')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2021-04-01",
"apiVersion": "2022-09-01",
"name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
"properties": {
"mode": "Incremental",
Expand All @@ -126,7 +126,7 @@
},
{
"type": "Microsoft.Network/networkManagers",
"apiVersion": "2022-07-01",
"apiVersion": "2023-02-01",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",
Expand Down Expand Up @@ -183,7 +183,7 @@
"_generator": {
"name": "bicep",
"version": "0.18.4.5664",
"templateHash": "7805292700491577010"
"templateHash": "17774741753143440188"
}
},
"parameters": {
Expand Down Expand Up @@ -230,7 +230,7 @@
{
"condition": "[parameters('enableDefaultTelemetry')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2021-04-01",
"apiVersion": "2022-09-01",
"name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
"properties": {
"mode": "Incremental",
Expand All @@ -243,7 +243,7 @@
},
{
"type": "Microsoft.Network/networkManagers/networkGroups",
"apiVersion": "2022-07-01",
"apiVersion": "2023-02-01",
"name": "[format('{0}/{1}', parameters('networkManagerName'), parameters('name'))]",
"properties": {
"description": "[parameters('description')]"
Expand Down Expand Up @@ -286,7 +286,7 @@
"_generator": {
"name": "bicep",
"version": "0.18.4.5664",
"templateHash": "16074472044760493"
"templateHash": "11795370987355550158"
}
},
"parameters": {
Expand Down Expand Up @@ -326,7 +326,7 @@
{
"condition": "[parameters('enableDefaultTelemetry')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2021-04-01",
"apiVersion": "2022-09-01",
"name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
"properties": {
"mode": "Incremental",
Expand All @@ -339,7 +339,7 @@
},
{
"type": "Microsoft.Network/networkManagers/networkGroups/staticMembers",
"apiVersion": "2022-07-01",
"apiVersion": "2023-02-01",
"name": "[format('{0}/{1}/{2}', parameters('networkManagerName'), parameters('networkGroupName'), parameters('name'))]",
"properties": {
"resourceId": "[parameters('resourceId')]"
Expand Down Expand Up @@ -446,7 +446,7 @@
"_generator": {
"name": "bicep",
"version": "0.18.4.5664",
"templateHash": "16667559174627826583"
"templateHash": "2027184094485121627"
}
},
"parameters": {
Expand Down Expand Up @@ -529,7 +529,7 @@
{
"condition": "[parameters('enableDefaultTelemetry')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2021-04-01",
"apiVersion": "2022-09-01",
"name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
"properties": {
"mode": "Incremental",
Expand All @@ -542,7 +542,7 @@
},
{
"type": "Microsoft.Network/networkManagers/connectivityConfigurations",
"apiVersion": "2022-07-01",
"apiVersion": "2023-02-01",
"name": "[format('{0}/{1}', parameters('networkManagerName'), parameters('name'))]",
"properties": {
"appliesToGroups": "[parameters('appliesToGroups')]",
Expand Down Expand Up @@ -622,7 +622,7 @@
"_generator": {
"name": "bicep",
"version": "0.18.4.5664",
"templateHash": "7001380639317342407"
"templateHash": "17379310063637329732"
}
},
"parameters": {
Expand Down Expand Up @@ -671,7 +671,7 @@
{
"condition": "[parameters('enableDefaultTelemetry')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2021-04-01",
"apiVersion": "2022-09-01",
"name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
"properties": {
"mode": "Incremental",
Expand All @@ -684,7 +684,7 @@
},
{
"type": "Microsoft.Network/networkManagers/scopeConnections",
"apiVersion": "2022-07-01",
"apiVersion": "2023-02-01",
"name": "[format('{0}/{1}', parameters('networkManagerName'), parameters('name'))]",
"properties": {
"description": "[parameters('description')]",
Expand Down Expand Up @@ -758,7 +758,7 @@
"_generator": {
"name": "bicep",
"version": "0.18.4.5664",
"templateHash": "6958244438160245757"
"templateHash": "15682992238467195973"
}
},
"parameters": {
Expand Down Expand Up @@ -819,7 +819,7 @@
{
"condition": "[parameters('enableDefaultTelemetry')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2021-04-01",
"apiVersion": "2022-09-01",
"name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
"properties": {
"mode": "Incremental",
Expand All @@ -832,7 +832,7 @@
},
{
"type": "Microsoft.Network/networkManagers/securityAdminConfigurations",
"apiVersion": "2022-07-01",
"apiVersion": "2023-02-01",
"name": "[format('{0}/{1}', parameters('networkManagerName'), parameters('name'))]",
"properties": {
"description": "[parameters('description')]",
Expand Down Expand Up @@ -877,7 +877,7 @@
"_generator": {
"name": "bicep",
"version": "0.18.4.5664",
"templateHash": "14871283848922516549"
"templateHash": "2265382529605229791"
}
},
"parameters": {
Expand Down Expand Up @@ -935,7 +935,7 @@
{
"condition": "[parameters('enableDefaultTelemetry')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2021-04-01",
"apiVersion": "2022-09-01",
"name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
"properties": {
"mode": "Incremental",
Expand All @@ -948,7 +948,7 @@
},
{
"type": "Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections",
"apiVersion": "2022-07-01",
"apiVersion": "2023-02-01",
"name": "[format('{0}/{1}/{2}', parameters('networkManagerName'), parameters('securityAdminConfigurationName'), parameters('name'))]",
"properties": {
"description": "[parameters('description')]",
Expand Down Expand Up @@ -1009,7 +1009,7 @@
"_generator": {
"name": "bicep",
"version": "0.18.4.5664",
"templateHash": "11792808555690600356"
"templateHash": "8294086787341170610"
}
},
"parameters": {
Expand Down Expand Up @@ -1129,7 +1129,7 @@
{
"condition": "[parameters('enableDefaultTelemetry')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2021-04-01",
"apiVersion": "2022-09-01",
"name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
"properties": {
"mode": "Incremental",
Expand All @@ -1142,7 +1142,7 @@
},
{
"type": "Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections/rules",
"apiVersion": "2022-07-01",
"apiVersion": "2023-02-01",
"name": "[format('{0}/{1}/{2}/{3}', parameters('networkManagerName'), parameters('securityAdminConfigurationName'), parameters('ruleCollectionName'), parameters('name'))]",
"kind": "Custom",
"properties": {
Expand Down Expand Up @@ -1453,7 +1453,7 @@
"metadata": {
"description": "The location the resource was deployed into."
},
"value": "[reference(resourceId('Microsoft.Network/networkManagers', parameters('name')), '2022-07-01', 'full').location]"
"value": "[reference(resourceId('Microsoft.Network/networkManagers', parameters('name')), '2023-02-01', 'full').location]"
}
}
}
4 changes: 2 additions & 2 deletions modules/network/network-managers/network-groups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ A network group is a collection of same-type network resources that you can asso

| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.Network/networkManagers/networkGroups` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-07-01/networkManagers/networkGroups) |
| `Microsoft.Network/networkManagers/networkGroups/staticMembers` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-07-01/networkManagers/networkGroups/staticMembers) |
| `Microsoft.Network/networkManagers/networkGroups` | [2023-02-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-02-01/networkManagers/networkGroups) |
| `Microsoft.Network/networkManagers/networkGroups/staticMembers` | [2023-02-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-02-01/networkManagers/networkGroups/staticMembers) |

## Parameters

Expand Down
Loading
Loading