-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PE Update kusto cluster, appgw, purview
- Loading branch information
Showing
13 changed files
with
412 additions
and
96 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
@description('Optional. The location to deploy to.') | ||
param location string = resourceGroup().location | ||
|
||
@description('Required. The name of the Virtual Network to create.') | ||
param virtualNetworkName string | ||
|
||
var addressPrefix = '10.0.0.0/16' | ||
|
||
resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = { | ||
name: virtualNetworkName | ||
location: location | ||
properties: { | ||
addressSpace: { | ||
addressPrefixes: [ | ||
addressPrefix | ||
] | ||
} | ||
subnets: [ | ||
{ | ||
name: 'defaultSubnet' | ||
properties: { | ||
addressPrefix: cidrSubnet(addressPrefix, 24, 0) | ||
serviceEndpoints: [ | ||
{ | ||
service: 'Microsoft.KeyVault' | ||
} | ||
] | ||
} | ||
} | ||
{ | ||
name: 'peTestSubnet' | ||
properties: { | ||
addressPrefix: cidrSubnet(addressPrefix, 24, 1) | ||
serviceEndpoints: [ | ||
{ | ||
service: 'Microsoft.KeyVault' | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
|
||
resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = { | ||
name: 'privatelink.digitaltwins.azure.net' | ||
location: 'global' | ||
|
||
resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = { | ||
name: '${virtualNetwork.name}-vnetlink' | ||
location: 'global' | ||
properties: { | ||
virtualNetwork: { | ||
id: virtualNetwork.id | ||
} | ||
registrationEnabled: false | ||
} | ||
} | ||
} | ||
|
||
@description('The resource ID of the created Virtual Network Subnet.') | ||
output defaultSubnetResourceId string = virtualNetwork.properties.subnets[0].id | ||
|
||
@description('The resource ID of the created Virtual Network Subnet.') | ||
output pepTestSubnetResourceId string = virtualNetwork.properties.subnets[1].id | ||
|
||
@description('The resource ID of the created Private DNS Zone.') | ||
output privateDNSZoneResourceId string = privateDNSZone.id |
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,90 @@ | ||
targetScope = 'subscription' | ||
|
||
metadata name = 'Private endpoint-enabled deployment' | ||
metadata description = 'This instance deploys the module with private endpoints.' | ||
|
||
// ========== // | ||
// Parameters // | ||
// ========== // | ||
|
||
@description('Optional. The name of the resource group to deploy for testing purposes.') | ||
@maxLength(90) | ||
param resourceGroupName string = 'dep-${namePrefix}-search.searchservices-${serviceShort}-rg' | ||
|
||
@description('Optional. The location to deploy resources to.') | ||
param resourceLocation 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 = 'akcpe' | ||
|
||
@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: resourceLocation | ||
} | ||
|
||
module nestedDependencies 'dependencies.bicep' = { | ||
scope: resourceGroup | ||
name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' | ||
params: { | ||
location: resourceLocation | ||
virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' | ||
} | ||
} | ||
|
||
// ============== // | ||
// Test Execution // | ||
// ============== // | ||
|
||
@batchSize(1) | ||
module testDeployment '../../../main.bicep' = [ | ||
for iteration in ['init', 'idem']: { | ||
scope: resourceGroup | ||
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' | ||
params: { | ||
name: '${namePrefix}${serviceShort}0001' | ||
location: resourceLocation | ||
sku: 'Standard_E2ads_v5' | ||
privateEndpoints: [ | ||
{ | ||
privateDnsZoneGroup: { | ||
privateDnsZoneGroupConfigs: [ | ||
{ | ||
privateDnsZoneResourceId: nestedDependencies.outputs.privateDNSZoneResourceId | ||
} | ||
] | ||
} | ||
subnetResourceId: nestedDependencies.outputs.defaultSubnetResourceId | ||
service: 'cluster' | ||
} | ||
{ | ||
privateDnsZoneGroup: { | ||
privateDnsZoneGroupConfigs: [ | ||
{ | ||
privateDnsZoneResourceId: nestedDependencies.outputs.privateDNSZoneResourceId | ||
} | ||
] | ||
} | ||
subnetResourceId: nestedDependencies.outputs.pepTestSubnetResourceId | ||
service: 'cluster' | ||
} | ||
] | ||
tags: { | ||
'hidden-title': 'This is visible in the resource name' | ||
Environment: 'Non-Prod' | ||
Role: 'DeploymentValidation' | ||
} | ||
} | ||
dependsOn: [ | ||
nestedDependencies | ||
] | ||
} | ||
] |
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
Oops, something went wrong.