Skip to content
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 @@ -109,8 +109,7 @@ jobs:
- name: 'Using test file [${{ matrix.moduleTestFilePaths }}]'
uses: ./.github/actions/templates/validateModuleDeployment
with:
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
parameterFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}'
templateFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}'
location: '${{ env.location }}'
resourceGroupName: '${{ env.resourceGroupName }}'
subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
targetScope = 'managementGroup'

// ========== //
// Parameters //
// ========== //
@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 = 'apsdmgcom'

// ============== //
// Test Execution //
// ============== //

module testDeployment '../../managementGroup/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: '<<namePrefix>>${serviceShort}001'
policyDefinitions: [
{
groupNames: [
'ARM'
]
parameters: {
listOfAllowedLocations: {
value: [
'australiaeast'
]
}
}
policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c'
policyDefinitionReferenceId: 'Allowed locations_1'
}
{
groupNames: [
'ARM'
]
parameters: {
listOfAllowedLocations: {
value: [
'australiaeast'
]
}
}
policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e765b5de-1225-4ba3-bd56-1ac6695af988'
policyDefinitionReferenceId: 'Allowed locations for resource groups_1'
}
]
// Non-required parameters
description: '[Description] This policy set definition is deployed at management group scope'
displayName: '[DisplayName] This policy set definition is deployed at management group scope'
managementGroupId: last(split(managementGroup().id, '/'))
metadata: {
category: 'Security'
version: '1'
}
policyDefinitionGroups: [
{
name: 'Network'
}
{
name: 'ARM'
}
]
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
targetScope = 'managementGroup'

// ========== //
// Parameters //
// ========== //
@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 = 'apsdmgmin'

// ============== //
// Test Execution //
// ============== //

module testDeployment '../../managementGroup/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: '<<namePrefix>>${serviceShort}001'
policyDefinitions: [
{
parameters: {
listOfAllowedLocations: {
value: [
'australiaeast'
]
}
}
policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c'
}
]
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
targetScope = 'subscription'

// ========== //
// Parameters //
// ========== //
@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 = 'apsdsubcom'

// ============== //
// Test Execution //
// ============== //

module testDeployment '../../subscription/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: '<<namePrefix>>${serviceShort}001'
policyDefinitions: [
{
groupNames: [
'ARM'
]
parameters: {
listOfAllowedLocations: {
value: [
'australiaeast'
]
}
}
policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c'
policyDefinitionReferenceId: 'Allowed locations_1'
}
{
groupNames: [
'ARM'
]
parameters: {
listOfAllowedLocations: {
value: [
'australiaeast'
]
}
}
policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e765b5de-1225-4ba3-bd56-1ac6695af988'
policyDefinitionReferenceId: 'Allowed locations for resource groups_1'
}
]
// Non-required parameters
description: '[Description] This policy set definition is deployed at subscription scope'
displayName: '[DisplayName] This policy set definition is deployed at subscription scope'
metadata: {
category: 'Security'
version: '1'
}
policyDefinitionGroups: [
{
name: 'Network'
}
{
name: 'ARM'
}
]
subscriptionId: subscription().subscriptionId
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
targetScope = 'subscription'

// ========== //
// Parameters //
// ========== //
@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 = 'apsdsubmin'

// ============== //
// Test Execution //
// ============== //

module testDeployment '../../subscription/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: '<<namePrefix>>${serviceShort}001'
policyDefinitions: [
{
parameters: {
listOfAllowedLocations: {
value: [
'australiaeast'
]
}
}
policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c'
}
]
// Non-required parameters
subscriptionId: '<<subscriptionId>>'
}
}

This file was deleted.

Loading