Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2805960
[Modules] Updated Authorization/RoleAssignments to new dependency app…
AlexanderSehr Aug 30, 2022
2cc6133
Update to latest
AlexanderSehr Sep 1, 2022
a28c8e8
Merge branch 'main' into users/alsehr/1791_Authorization_RoleAssignments
AlexanderSehr Sep 1, 2022
7f1a59f
Update to latest
AlexanderSehr Sep 1, 2022
12fbae2
Merge branch 'main' into users/alsehr/1791_Authorization_RoleAssignments
AlexanderSehr Sep 2, 2022
4ed81c0
Updated folder default to common.
AlexanderSehr Sep 8, 2022
4095c21
Merge branch 'main' into users/alsehr/1791_Authorization_RoleAssignments
AlexanderSehr Sep 9, 2022
609412e
Update to latest
AlexanderSehr Sep 9, 2022
e44c837
Update to latest
AlexanderSehr Sep 9, 2022
98a1638
Merge branch 'main' into users/alsehr/1791_Authorization_RoleAssignments
AlexanderSehr Sep 18, 2022
934ad89
Update to latest
AlexanderSehr Sep 18, 2022
631e92b
Update to latest
AlexanderSehr Oct 5, 2022
87f57e3
Update modules/Microsoft.Authorization/roleAssignments/.test/mg/depen…
AlexanderSehr Oct 22, 2022
5f47919
Update modules/Microsoft.Authorization/roleAssignments/.test/mg.min/i…
AlexanderSehr Oct 22, 2022
4cf4e1e
Update modules/Microsoft.Authorization/roleAssignments/.test/sub/depe…
AlexanderSehr Oct 22, 2022
c781b00
Update modules/Microsoft.Authorization/roleAssignments/.test/sub/depe…
AlexanderSehr Oct 22, 2022
b1b0e08
Update modules/Microsoft.Authorization/roleAssignments/.test/sub.min/…
AlexanderSehr Oct 22, 2022
8d6c0d1
Update modules/Microsoft.Authorization/roleAssignments/.test/mg/inter…
AlexanderSehr Oct 22, 2022
fb272c0
Update modules/Microsoft.Authorization/roleAssignments/.test/sub.min/…
AlexanderSehr Oct 22, 2022
c127527
Update modules/Microsoft.Authorization/roleAssignments/.test/mg/inter…
AlexanderSehr Oct 22, 2022
0a9f071
Update modules/Microsoft.Authorization/roleAssignments/.test/mg.min/i…
AlexanderSehr Oct 22, 2022
05f4505
Update modules/Microsoft.Authorization/roleAssignments/.test/mg.min/d…
AlexanderSehr Oct 22, 2022
d034d95
Update modules/Microsoft.Authorization/roleAssignments/.test/mg.min/d…
AlexanderSehr Oct 22, 2022
20a3612
Update modules/Microsoft.Authorization/roleAssignments/.test/mg.min/i…
AlexanderSehr Oct 22, 2022
839cd85
Update modules/Microsoft.Authorization/roleAssignments/.test/mg.min/i…
AlexanderSehr Oct 22, 2022
afb32eb
Update modules/Microsoft.Authorization/roleAssignments/.test/mg/depen…
AlexanderSehr Oct 22, 2022
1a0abd0
Update modules/Microsoft.Authorization/roleAssignments/.test/mg/inter…
AlexanderSehr Oct 22, 2022
a0c06a4
Update modules/Microsoft.Authorization/roleAssignments/.test/mg/inter…
AlexanderSehr Oct 22, 2022
3db19f3
Update modules/Microsoft.Authorization/roleAssignments/.test/rg.min/d…
AlexanderSehr Oct 22, 2022
c0409d8
Update modules/Microsoft.Authorization/roleAssignments/.test/rg/depen…
AlexanderSehr Oct 22, 2022
474192c
Update modules/Microsoft.Authorization/roleAssignments/.test/rg/depen…
AlexanderSehr Oct 22, 2022
0b9696c
Update modules/Microsoft.Authorization/roleAssignments/.test/mg.min/d…
AlexanderSehr Oct 22, 2022
8752598
Update modules/Microsoft.Authorization/roleAssignments/.test/mg/deplo…
AlexanderSehr Oct 22, 2022
52152b3
Renamed files to patch comment
AlexanderSehr Oct 22, 2022
2fc2ab2
Renamed folders
AlexanderSehr Oct 22, 2022
dfdf18f
Update modules/Microsoft.Authorization/roleAssignments/.test/rg.min/d…
AlexanderSehr Oct 24, 2022
ebde0ae
Update modules/Microsoft.Authorization/roleAssignments/.test/rg.min/d…
AlexanderSehr Oct 24, 2022
66713cb
Updated nameprefix
AlexanderSehr Oct 24, 2022
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.roleassignments.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,13 @@
@description('Optional. The location to deploy resources to.')
param location string = resourceGroup().location

@description('Required. The name of the Managed Identity to create.')
param managedIdentityName string

resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
name: managedIdentityName
location: location
}

@description('The principal ID of the created Managed Identity.')
output managedIdentityPrincipalId string = managedIdentity.properties.principalId
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
targetScope = 'managementGroup'

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

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

// General resources
// =================
module resourceGroupResources 'interim.dependencies.bicep' = {
scope: subscription('<<subscriptionId>>')
name: '${uniqueString(deployment().name, location)}-paramNested'
params: {
managedIdentityName: 'dep-<<namePrefix>>-msi-${serviceShort}'
resourceGroupName: resourceGroupName
location: location
}
}

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

module testDeployment '../../managementGroup/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
principalId: resourceGroupResources.outputs.managedIdentityPrincipalId
roleDefinitionIdOrName: 'Backup Reader'
description: 'Role Assignment (management group scope)'
managementGroupId: last(split(managementGroup().id, '/'))
principalType: 'ServicePrincipal'
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
targetScope = 'subscription'

@description('Optional. The location to deploy resources to.')
param location string = deployment().location

@description('Required. The name of the resource group to deploy for testing purposes.')
@maxLength(90)
param resourceGroupName string

@description('Required. The name of the Managed Identity to create.')
param managedIdentityName string

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

module resourceGroupResources 'dependencies.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-paramNested'
params: {
managedIdentityName: managedIdentityName
}
}

@description('The principal ID of the created Managed Identity.')
output managedIdentityPrincipalId string = resourceGroupResources.outputs.managedIdentityPrincipalId

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@description('Optional. The location to deploy resources to.')
param location string = resourceGroup().location

@description('Required. The name of the Managed Identity to create.')
param managedIdentityName string

resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
name: managedIdentityName
location: location
}

@description('The principal ID of the created Managed Identity.')
output managedIdentityPrincipalId string = managedIdentity.properties.principalId
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
targetScope = 'managementGroup'

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

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

// General resources
// =================
module resourceGroupResources 'interim.dependencies.bicep' = {
scope: subscription('<<subscriptionId>>')
name: '${uniqueString(deployment().name, location)}-paramNested'
params: {
managedIdentityName: 'dep-<<namePrefix>>-msi-${serviceShort}'
resourceGroupName: resourceGroupName
location: location
}
}

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

module testDeployment '../../managementGroup/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
principalId: resourceGroupResources.outputs.managedIdentityPrincipalId
roleDefinitionIdOrName: 'Storage Queue Data Reader'
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
targetScope = 'subscription'

@description('Optional. The location to deploy resources to.')
param location string = deployment().location

@description('Required. The name of the resource group to deploy for testing purposes.')
@maxLength(90)
param resourceGroupName string

@description('Required. The name of the Managed Identity to create.')
param managedIdentityName string

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

module resourceGroupResources 'dependencies.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-paramNested'
params: {
managedIdentityName: managedIdentityName
}
}

@description('The principal ID of the created Managed Identity.')
output managedIdentityPrincipalId string = resourceGroupResources.outputs.managedIdentityPrincipalId

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@description('Required. The name of the Managed Identity to create.')
param managedIdentityName string

@description('Optional. The location to deploy resources to.')
param location string = resourceGroup().location

resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
name: managedIdentityName
location: location
}

@description('The principal ID of the created Managed Identity.')
output managedIdentityPrincipalId string = managedIdentity.properties.principalId
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
targetScope = 'subscription'

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

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

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

module resourceGroupResources 'dependencies.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-paramNested'
params: {
managedIdentityName: 'dep-<<namePrefix>>-msi-${serviceShort}'
}
}

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

module testDeployment '../../resourceGroup/deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
principalId: resourceGroupResources.outputs.managedIdentityPrincipalId
roleDefinitionIdOrName: 'Backup Reader'
description: 'Role Assignment (resource group scope)'
principalType: 'ServicePrincipal'
resourceGroupName: resourceGroup.name
subscriptionId: subscription().subscriptionId
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@description('Required. The name of the Managed Identity to create.')
param managedIdentityName string

@description('Optional. The location to deploy resources to.')
param location string = resourceGroup().location

resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
name: managedIdentityName
location: location
}

@description('The principal ID of the created Managed Identity.')
output managedIdentityPrincipalId string = managedIdentity.properties.principalId
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
targetScope = 'subscription'

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

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

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

module resourceGroupResources 'dependencies.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-paramNested'
params: {
managedIdentityName: 'dep-<<namePrefix>>-msi-${serviceShort}'
}
}

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

module testDeployment '../../resourceGroup/deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
principalId: resourceGroupResources.outputs.managedIdentityPrincipalId
roleDefinitionIdOrName: 'Storage Queue Data Reader'
resourceGroupName: resourceGroup.name
subscriptionId: subscription().subscriptionId
}
}

This file was deleted.

Loading