Skip to content

Commit

Permalink
updating resource location params
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Box committed Apr 25, 2024
1 parent c4d1125 commit ebae713
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with default parameters
param resourceGroupName string = 'dep-${namePrefix}-security.azureSecurityCenter-${serviceShort}-rg'

@description('Optional. The location to deploy resources to.')
param location string = deployment().location
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 = 'sascmin'
Expand All @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#'
// =================
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: resourceGroupName
location: location
location: resourceLocation
}

module nestedDependencies 'dependencies.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-nestedDependencies'
name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies'
params: {
location: location
location: resourceLocation
logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
}
}
Expand All @@ -47,11 +47,11 @@ module nestedDependencies 'dependencies.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
scope: '/subscriptions/${subscription().subscriptionId}'
workspaceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
location: location
location: resourceLocation
}
}
]
12 changes: 6 additions & 6 deletions avm/ptn/security/security-center/tests/e2e/max/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with default parameters
param resourceGroupName string = 'dep-${namePrefix}-security.azureSecurityCenter-${serviceShort}-rg'

@description('Optional. The location to deploy resources to.')
param location string = deployment().location
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 = 'sascmax'
Expand All @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#'
// =================
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: resourceGroupName
location: location
location: resourceLocation
}

module nestedDependencies 'dependencies.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-nestedDependencies'
name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies'
params: {
location: location
location: resourceLocation
logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
}
}
Expand All @@ -47,11 +47,11 @@ module nestedDependencies 'dependencies.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
scope: '/subscriptions/${subscription().subscriptionId}'
workspaceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
location: location
location: resourceLocation
securityContactProperties: {
alertNotifications: 'Off'
alertsToAdmins: 'Off'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b
param resourceGroupName string = 'dep-${namePrefix}-security.azureSecurityCenter-${serviceShort}-rg'

@description('Optional. The location to deploy resources to.')
param location string = deployment().location
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 = 'sascwaf'
Expand All @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#'
// =================
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: resourceGroupName
location: location
location: resourceLocation
}

module nestedDependencies 'dependencies.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-nestedDependencies'
name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies'
params: {
logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
location: location
location: resourceLocation
}
}

Expand All @@ -47,11 +47,11 @@ module nestedDependencies 'dependencies.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
scope: '/subscriptions/${subscription().subscriptionId}'
workspaceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
location: location
location: resourceLocation
}
}
]

0 comments on commit ebae713

Please sign in to comment.