-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Modules] Express-route-gateway: Updated RBAC handling & added min te…
…st (#3927) * Updated RBAC handling & added min test * Added ref * Added missing lock implementation * Updated JSON
- Loading branch information
1 parent
bf8ca74
commit 07869c8
Showing
9 changed files
with
446 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
modules/network/express-route-gateway/.test/min/dependencies.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@description('Required. The name of the virtual WAN to create.') | ||
param virtualWANName string | ||
|
||
@description('Required. The name of the virtual Hub to create.') | ||
param virtualHubName string | ||
|
||
@description('Optional. The location to deploy resources to.') | ||
param location string = resourceGroup().location | ||
|
||
resource virtualWan 'Microsoft.Network/virtualWans@2023-04-01' = { | ||
name: virtualWANName | ||
location: location | ||
} | ||
|
||
resource virtualHub 'Microsoft.Network/virtualHubs@2023-04-01' = { | ||
name: virtualHubName | ||
location: location | ||
properties: { | ||
addressPrefix: '10.0.0.0/16' | ||
virtualWan: { | ||
id: virtualWan.id | ||
} | ||
} | ||
} | ||
|
||
@description('The resource ID of the created Virtual Hub.') | ||
output virtualHubResourceId string = virtualHub.id |
55 changes: 55 additions & 0 deletions
55
modules/network/express-route-gateway/.test/min/main.test.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
targetScope = 'subscription' | ||
|
||
// ========== // | ||
// Parameters // | ||
// ========== // | ||
|
||
@description('Optional. The name of the resource group to deploy for testing purposes.') | ||
@maxLength(90) | ||
param resourceGroupName string = 'ms.network.expressRouteGateway-${serviceShort}-rg' | ||
|
||
@description('Optional. The location to deploy resources to.') | ||
param location string = deployment().location | ||
|
||
@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') | ||
param serviceShort string = 'nergmin' | ||
|
||
@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') | ||
param enableDefaultTelemetry bool = true | ||
|
||
@description('Optional. A token to inject into the name of each resource.') | ||
param namePrefix string = '[[namePrefix]]' | ||
|
||
// ============ // | ||
// Dependencies // | ||
// ============ // | ||
|
||
// General resources | ||
// ================= | ||
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { | ||
name: resourceGroupName | ||
location: location | ||
} | ||
|
||
module nestedDependencies 'dependencies.bicep' = { | ||
scope: resourceGroup | ||
name: '${uniqueString(deployment().name, location)}-nestedDependencies' | ||
params: { | ||
virtualWANName: 'dep-${namePrefix}-vwan-${serviceShort}' | ||
virtualHubName: 'dep-${namePrefix}-hub-${serviceShort}' | ||
} | ||
} | ||
// ============== // | ||
// Test Execution // | ||
// ============== // | ||
|
||
module testDeployment '../../main.bicep' = { | ||
scope: resourceGroup | ||
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' | ||
params: { | ||
enableDefaultTelemetry: enableDefaultTelemetry | ||
name: '${namePrefix}${serviceShort}001' | ||
virtualHubId: nestedDependencies.outputs.virtualHubResourceId | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.