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
3 changes: 1 addition & 2 deletions .github/workflows/ms.authorization.roledefinitions.yml
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,31 @@
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 = 'ardmgcom'

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

module testDeployment '../../managementGroup/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
roleName: '<<namePrefix>>-testRole-${serviceShort}'
actions: [
'Microsoft.Compute/galleries/*'
'Microsoft.Network/virtualNetworks/read'
]
assignableScopes: [
managementGroup().id
]
description: 'Test Custom Role Definition Standard (management group scope)'
notActions: [
'Microsoft.Compute/images/delete'
'Microsoft.Compute/images/write'
'Microsoft.Network/virtualNetworks/subnets/join/action'
]
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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 = 'ardmgmin'

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

module testDeployment '../../managementGroup/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
roleName: '<<namePrefix>>-testRole-${serviceShort}'
actions: [
'Microsoft.Compute/galleries/images/read'
'Microsoft.Compute/galleries/read'
]
}
}

This file was deleted.

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

// ========== //
// Parameters //
// ========== //
@description('Optional. The name of the resource group to deploy for testing purposes.')
@maxLength(90)
param resourceGroupName string = 'ms.authorization.roledefinitions-${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 = 'ardrgcom'

// =========== //
// Deployments //
// =========== //

// General resources
// =================
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: resourceGroupName
location: location
}

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

module testDeployment '../../resourceGroup/deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
roleName: '<<namePrefix>>-testRole-${serviceShort}'
actions: [
'Microsoft.Compute/galleries/*'
'Microsoft.Network/virtualNetworks/read'
]
assignableScopes: [
resourceGroup.id
]
dataActions: [
'Microsoft.Storage/storageAccounts/blobServices/*/read'
]
description: 'Test Custom Role Definition Standard (resource group scope)'
notActions: [
'Microsoft.Compute/images/delete'
'Microsoft.Compute/images/write'
'Microsoft.Network/virtualNetworks/subnets/join/action'
]
notDataActions: [
'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read'
]
}
}

This file was deleted.

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

// ========== //
// Parameters //
// ========== //
@description('Optional. The name of the resource group to deploy for testing purposes.')
@maxLength(90)
param resourceGroupName string = 'ms.authorization.roledefinitions-${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 = 'ardrgmin'

// =========== //
// Deployments //
// =========== //

// General resources
// =================
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: resourceGroupName
location: location
}

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

module testDeployment '../../resourceGroup/deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
roleName: '<<namePrefix>>-testRole-${serviceShort}'
actions: [
'Microsoft.Compute/galleries/images/read'
'Microsoft.Compute/galleries/read'
]
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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 = 'ardsubcom'

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

module testDeployment '../../subscription/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
roleName: '<<namePrefix>>-testRole-${serviceShort}'
actions: [
'Microsoft.Compute/galleries/*'
'Microsoft.Network/virtualNetworks/read'
]
assignableScopes: [
subscription().id
]
dataActions: [
'Microsoft.Storage/storageAccounts/blobServices/*/read'
]
description: 'Test Custom Role Definition Standard (subscription scope)'
notActions: [
'Microsoft.Compute/images/delete'
'Microsoft.Compute/images/write'
'Microsoft.Network/virtualNetworks/subnets/join/action'
]
notDataActions: [
'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read'
]
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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 = 'ardsubmin'

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

module testDeployment '../../subscription/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
roleName: '<<namePrefix>>-testRole-${serviceShort}'
actions: [
'Microsoft.Compute/galleries/images/read'
'Microsoft.Compute/galleries/read'
]
subscriptionId: subscription().subscriptionId
}
}
Loading