diff --git a/tools/pipeline-witness/infrastructure/bicep/appResourceGroup.bicep b/tools/pipeline-witness/infrastructure/bicep/appResourceGroup.bicep index 1a5faffd34b7..1ad73a302ac5 100644 --- a/tools/pipeline-witness/infrastructure/bicep/appResourceGroup.bicep +++ b/tools/pipeline-witness/infrastructure/bicep/appResourceGroup.bicep @@ -6,6 +6,8 @@ param appStorageAccountName string param aspEnvironment string param cosmosAccountName string param location string +param vnetPrefix string +param subnetPrefix string var cosmosContributorRoleId = '00000000-0000-0000-0000-000000000002' // Built-in Contributor role @@ -23,7 +25,7 @@ resource vnet 'Microsoft.Network/virtualNetworks@2023-11-01' = { properties: { addressSpace: { addressPrefixes: [ - '10.8.0.0/16' + vnetPrefix ] } virtualNetworkPeerings: [] @@ -35,7 +37,7 @@ resource subnet 'Microsoft.Network/virtualNetworks/subnets@2023-11-01' = { parent: vnet name: 'default' properties: { - addressPrefix: '10.8.0.0/24' + addressPrefix: subnetPrefix networkSecurityGroup: { id: networkSecurityGroup.id } diff --git a/tools/pipeline-witness/infrastructure/bicep/parameters.production.json b/tools/pipeline-witness/infrastructure/bicep/parameters.production.json index d722a4090c35..4032347b4ded 100644 --- a/tools/pipeline-witness/infrastructure/bicep/parameters.production.json +++ b/tools/pipeline-witness/infrastructure/bicep/parameters.production.json @@ -40,6 +40,12 @@ }, "vnetName": { "value": "pipelinewitnessprod" + }, + "vnetPrefix": { + "value": "10.9.0.0/16" + }, + "subnet": { + "value": "10.9.0.0/24" } } } \ No newline at end of file diff --git a/tools/pipeline-witness/infrastructure/bicep/parameters.staging.json b/tools/pipeline-witness/infrastructure/bicep/parameters.staging.json index 3fb27183a7d4..29b352339c5e 100644 --- a/tools/pipeline-witness/infrastructure/bicep/parameters.staging.json +++ b/tools/pipeline-witness/infrastructure/bicep/parameters.staging.json @@ -40,6 +40,12 @@ }, "vnetName": { "value": "pipelinewitnessstaging" + }, + "vnetPrefix": { + "value": "10.8.0.0/16" + }, + "subnet": { + "value": "10.8.0.0/24" } } } \ No newline at end of file diff --git a/tools/pipeline-witness/infrastructure/bicep/parameters.test.json b/tools/pipeline-witness/infrastructure/bicep/parameters.test.json index ebfac490dc77..222471a15664 100644 --- a/tools/pipeline-witness/infrastructure/bicep/parameters.test.json +++ b/tools/pipeline-witness/infrastructure/bicep/parameters.test.json @@ -40,6 +40,12 @@ }, "vnetName": { "value": "pipelinewitnesstest" + }, + "vnetPrefix": { + "value": "10.7.0.0/16" + }, + "subnet": { + "value": "10.7.0.0/24" } } } \ No newline at end of file diff --git a/tools/pipeline-witness/infrastructure/bicep/resourceGroups.bicep b/tools/pipeline-witness/infrastructure/bicep/resourceGroups.bicep index a0c76732cbf2..845f495c162e 100644 --- a/tools/pipeline-witness/infrastructure/bicep/resourceGroups.bicep +++ b/tools/pipeline-witness/infrastructure/bicep/resourceGroups.bicep @@ -7,6 +7,8 @@ param appServicePlanName string param webAppName string param networkSecurityGroupName string param vnetName string +param vnetPrefix string +param subnetPrefix string param cosmosAccountName string param appStorageAccountName string param aspEnvironment string @@ -28,6 +30,8 @@ module pipelineWitness 'appResourceGroup.bicep' = { params: { location: location appServicePlanName: appServicePlanName + vnetPrefix: vnetPrefix + subnetPrefix: subnetPrefix webAppName: webAppName cosmosAccountName: cosmosAccountName appStorageAccountName: appStorageAccountName