Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d0fc757
Split role assignment module into child modules
AlexanderSehr Feb 18, 2022
b20ec85
Update to latest
AlexanderSehr Feb 20, 2022
63fb853
Updated Test deployment & folder path
AlexanderSehr Feb 20, 2022
3e70842
Update to latest
AlexanderSehr Feb 20, 2022
ba49e6f
Added version files
AlexanderSehr Feb 22, 2022
65821df
Updated dependency pipeline
AlexanderSehr Feb 22, 2022
66e6d55
Update to latest
AlexanderSehr Feb 22, 2022
497336f
Update to latest
AlexanderSehr Feb 22, 2022
4f66ed1
Fixed dependency pipeline
AlexanderSehr Feb 22, 2022
e48a540
initial commit for adding testing policy def
ahmadabdalla Feb 22, 2022
1a87c5e
update policy definitions
ahmadabdalla Feb 22, 2022
4bee410
update to latest
ahmadabdalla Feb 22, 2022
a123df6
policy assignments
ahmadabdalla Feb 23, 2022
7fb8306
fixed pester errors for rg level assignments
ahmadabdalla Feb 23, 2022
ef8bb38
removed mg and sub cuaid nested templates
ahmadabdalla Feb 23, 2022
9e43d64
fixed resource group not scope
ahmadabdalla Feb 23, 2022
73faa68
Updated Policy definitions
ahmadabdalla Feb 23, 2022
cf91057
attempt to get the publishing to work on child modules
ahmadabdalla Feb 23, 2022
45c8acf
updated policy assignments module
ahmadabdalla Feb 23, 2022
de07e9b
updated dep. pipeline and policy exemptions module
ahmadabdalla Feb 24, 2022
c8b2cc5
fixed intentional issue on name lengths for exemptions
ahmadabdalla Feb 24, 2022
b620440
fixed mg min parameter for exemption
ahmadabdalla Feb 24, 2022
254f678
policy set updates
ahmadabdalla Feb 24, 2022
1fd3fd2
role assignments
ahmadabdalla Feb 24, 2022
f763f38
role definitions
ahmadabdalla Feb 24, 2022
18fc520
fixed parameters for role definitions
ahmadabdalla Feb 24, 2022
7541db5
updated names for role definitions
ahmadabdalla Feb 24, 2022
8a2a4d4
fix management group scope
ahmadabdalla Feb 24, 2022
a40fedd
updated ado pipelines + changed ID to Id on all ms. auth
ahmadabdalla Feb 24, 2022
9647ff4
Switched 'Id' to 'ID' to all ms auth. namespace
ahmadabdalla Feb 24, 2022
7fc97e0
Merge remote-tracking branch 'origin/main' into users/alsehr/rbac
ahmadabdalla Feb 24, 2022
5d3fd2b
updated dependency pipeline for role assignments
ahmadabdalla Feb 25, 2022
23c49b7
added display name for dependency policy assignment
ahmadabdalla Feb 25, 2022
0604b07
Merge remote-tracking branch 'origin/main' into users/alsehr/rbac
ahmadabdalla Feb 25, 2022
e36d89f
Merge remote-tracking branch 'origin/main' into users/alsehr/rbac
ahmadabdalla Feb 28, 2022
85c6b83
Merge remote-tracking branch 'origin/main' into users/alsehr/rbac
ahmadabdalla Feb 28, 2022
c2af34a
Update arm/Microsoft.Authorization/policyAssignments/readme.md
ahmadabdalla Mar 1, 2022
2bd4c3f
updated policy assignments per feedback
ahmadabdalla Mar 1, 2022
c12f9fa
completed policy assignment
ahmadabdalla Mar 1, 2022
a31bb9a
updated policy sets
ahmadabdalla Mar 1, 2022
6c3f4b8
policy exemptions update
ahmadabdalla Mar 1, 2022
d4221d9
updated role assignments
ahmadabdalla Mar 1, 2022
bf8879f
role definitions update
ahmadabdalla Mar 1, 2022
5bdb136
changed guidance message
ahmadabdalla Mar 1, 2022
504732c
Merge branch 'main' into users/alsehr/rbac
AlexanderSehr Mar 1, 2022
c8fdd96
Update .azuredevops/platformPipelines/platform.dependencies.yml
AlexanderSehr Mar 1, 2022
9ca1b9f
Update constructs/Microsoft.Authorization/roleAssignments-multiRolesM…
AlexanderSehr Mar 1, 2022
367516a
Update .azuredevops/platformPipelines/platform.dependencies.yml
AlexanderSehr Mar 1, 2022
dbbba9e
Merge branch 'users/alsehr/rbac' of https://github.com/Azure/Resource…
AlexanderSehr Mar 1, 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
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,18 @@ stages:
parameters:
removeDeployment: '${{ parameters.removeDeployment }}'
deploymentBlocks:
- path: $(modulePath)/.parameters/min.parameters.json
templateFilePath: $(modulePath)/.bicep/nested_policyAssignments_sub.bicep
- path: $(modulePath)/.parameters/parameters.json
templateFilePath: $(modulePath)/.bicep/nested_policyAssignments_sub.bicep
- path: $(modulePath)/.parameters/mg.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/mg.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/sub.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/sub.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/rg.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/rg.parameters.json
templateFilePath: $(modulePath)/deploy.bicep

- stage: Publishing
displayName: Publish module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ stages:
parameters:
removeDeployment: '${{ parameters.removeDeployment }}'
deploymentBlocks:
- path: $(modulePath)/.parameters/min.parameters.json
templateFilePath: $(modulePath)/.bicep/nested_policyDefinitions_sub.bicep
- path: $(modulePath)/.parameters/parameters.json
templateFilePath: $(modulePath)/.bicep/nested_policyDefinitions_sub.bicep
- path: $(modulePath)/.parameters/mg.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/mg.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/sub.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/sub.parameters.json
templateFilePath: $(modulePath)/deploy.bicep

- stage: Publishing
displayName: Publish module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,18 @@ stages:
parameters:
removeDeployment: '${{ parameters.removeDeployment }}'
deploymentBlocks:
- path: $(modulePath)/.parameters/min.parameters.json
templateFilePath: $(modulePath)/.bicep/nested_policyExemptions_sub.bicep
- path: $(modulePath)/.parameters/parameters.json
templateFilePath: $(modulePath)/.bicep/nested_policyExemptions_sub.bicep
- path: $(modulePath)/.parameters/mg.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/mg.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/sub.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/sub.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/rg.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/rg.parameters.json
templateFilePath: $(modulePath)/deploy.bicep

- stage: Publishing
displayName: Publish module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ stages:
parameters:
removeDeployment: '${{ parameters.removeDeployment }}'
deploymentBlocks:
- path: $(modulePath)/.parameters/min.parameters.json
templateFilePath: $(modulePath)/.bicep/nested_policySetDefinition_sub.bicep
- path: $(modulePath)/.parameters/parameters.json
templateFilePath: $(modulePath)/.bicep/nested_policySetDefinition_sub.bicep
- path: $(modulePath)/.parameters/mg.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/mg.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/sub.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/sub.parameters.json
templateFilePath: $(modulePath)/deploy.bicep

- stage: Publishing
displayName: Publish module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,18 @@ stages:
parameters:
removeDeployment: '${{ parameters.removeDeployment }}'
deploymentBlocks:
- path: $(modulePath)/.parameters/min.parameters.json
templateFilePath: $(modulePath)/.bicep/nested_rbac_sub.bicep
- path: $(modulePath)/.parameters/parameters.json
templateFilePath: $(modulePath)/.bicep/nested_rbac_sub.bicep
- path: $(modulePath)/.parameters/mg.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/mg.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/sub.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/sub.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/rg.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/rg.parameters.json
templateFilePath: $(modulePath)/deploy.bicep

- stage: Publishing
displayName: Publish module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,18 @@ stages:
parameters:
removeDeployment: '${{ parameters.removeDeployment }}'
deploymentBlocks:
- path: $(modulePath)/.parameters/min.parameters.json
templateFilePath: $(modulePath)/.bicep/nested_roleDefinitions_sub.bicep
- path: $(modulePath)/.parameters/parameters.json
templateFilePath: $(modulePath)/.bicep/nested_roleDefinitions_sub.bicep
- path: $(modulePath)/.parameters/mg.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/mg.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/sub.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/sub.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/rg.min.parameters.json
templateFilePath: $(modulePath)/deploy.bicep
- path: $(modulePath)/.parameters/rg.parameters.json
templateFilePath: $(modulePath)/deploy.bicep

- stage: Publishing
displayName: Publish module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ jobs:
pwsh: true
inline: |
# Load used functions
. (Join-Path '$(moduleRepoRoot)' '$(pipelineFunctionsPath)' 'resourceValidation' 'Test-TemplateWithParameterFile.ps1')
. (Join-Path '$(moduleRepoRoot)' '$(pipelineFunctionsPath)' 'resourceDeployment' 'Test-TemplateWithParameterFile.ps1')

if(-not [String]::IsNullOrEmpty('${{ deploymentBlock.templateFilePath }}')) {
$templateFilePath = Join-Path '$(moduleRepoRoot)' '${{ deploymentBlock.templateFilePath }}'
Expand Down
4 changes: 2 additions & 2 deletions .azuredevops/platformPipelines/platform.dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ stages:
- deploy_rg
variables:
resourceType: 'Microsoft.Authorization/policyAssignments'
templateFilePath: $(modulesPath)/$(resourceType)/.bicep/nested_policyAssignments_sub.bicep
templateFilePath: $(modulesPath)/$(resourceType)/subscription/deploy.bicep
jobs:
- template: /.azuredevops/pipelineTemplates/jobs.validateModuleDeployment.yml
parameters:
Expand Down Expand Up @@ -803,7 +803,7 @@ stages:
- deploy_msi
variables:
resourceType: 'Microsoft.Authorization/roleAssignments'
templateFilePath: $(modulesPath)/$(resourceType)/.bicep/nested_rbac_sub.bicep
templateFilePath: $(modulesPath)/$(resourceType)/subscription/deploy.bicep
msiPrincipalId: $[ stageDependencies.deploy_msi.job_set_msi_id.outputs['print_msi_prinId.msiPrincipalId'] ]
jobs:
- template: /.azuredevops/pipelineTemplates/jobs.validateModuleDeployment.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ runs:
Write-Output "::group::Validate [${{ inputs.templateFilePath }}]"

# Load used functions
. (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'resourceValidation' 'Test-TemplateWithParameterFile.ps1')
. (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'resourceDeployment' 'Test-TemplateWithParameterFile.ps1')

# ----------- #
# INVOKE TEST #
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/ms.authorization.policyassignments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,15 @@ jobs:
strategy:
fail-fast: false
matrix:
parameterFilePaths: ['parameters.json', 'min.parameters.json']
parameterFilePaths:
[
'mg.parameters.json',
'mg.min.parameters.json',
'sub.parameters.json',
'sub.min.parameters.json',
'rg.parameters.json',
'rg.min.parameters.json',
]
steps:
- name: 'Checkout'
uses: actions/checkout@v2
Expand All @@ -98,7 +106,7 @@ jobs:
- name: 'Using parameter file [${{ matrix.parameterFilePaths }}]'
uses: ./.github/actions/templates/validateModuleDeployment
with:
templateFilePath: '${{ env.modulePath }}/.bicep/nested_policyAssignments_sub.bicep'
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.resourceGroupName }}'
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/ms.authorization.policydefinitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ jobs:
strategy:
fail-fast: false
matrix:
parameterFilePaths: ['parameters.json', 'min.parameters.json']
parameterFilePaths:
[
'mg.min.parameters.json',
'mg.parameters.json',
'sub.min.parameters.json',
'sub.parameters.json',
]
steps:
- name: 'Checkout'
uses: actions/checkout@v2
Expand All @@ -98,7 +104,7 @@ jobs:
- name: 'Using parameter file [${{ matrix.parameterFilePaths }}]'
uses: ./.github/actions/templates/validateModuleDeployment
with:
templateFilePath: '${{ env.modulePath }}/.bicep/nested_policyDefinitions_sub.bicep'
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.resourceGroupName }}'
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/ms.authorization.policyexemptions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,15 @@ jobs:
strategy:
fail-fast: false
matrix:
parameterFilePaths: ['parameters.json', 'min.parameters.json']
parameterFilePaths:
[
'mg.parameters.json',
'mg.min.parameters.json',
'sub.parameters.json',
'sub.min.parameters.json',
'rg.parameters.json',
'rg.min.parameters.json',
]
steps:
- name: 'Checkout'
uses: actions/checkout@v2
Expand All @@ -98,7 +106,7 @@ jobs:
- name: 'Using parameter file [${{ matrix.parameterFilePaths }}]'
uses: ./.github/actions/templates/validateModuleDeployment
with:
templateFilePath: '${{ env.modulePath }}/.bicep/nested_policyExemptions_sub.bicep'
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.resourceGroupName }}'
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/ms.authorization.policysetdefinitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ jobs:
strategy:
fail-fast: false
matrix:
parameterFilePaths: ['parameters.json', 'min.parameters.json']
parameterFilePaths:
[
'mg.min.parameters.json',
'mg.parameters.json',
'sub.min.parameters.json',
'sub.parameters.json',
]
steps:
- name: 'Checkout'
uses: actions/checkout@v2
Expand All @@ -98,7 +104,7 @@ jobs:
- name: 'Using parameter file [${{ matrix.parameterFilePaths }}]'
uses: ./.github/actions/templates/validateModuleDeployment
with:
templateFilePath: '${{ env.modulePath }}/.bicep/nested_policySetDefinition_sub.bicep'
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.resourceGroupName }}'
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/ms.authorization.roleassignments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,15 @@ jobs:
strategy:
fail-fast: false
matrix:
parameterFilePaths: ['parameters.json', 'min.parameters.json']
parameterFilePaths:
[
'mg.parameters.json',
'mg.min.parameters.json',
'sub.parameters.json',
'sub.min.parameters.json',
'rg.parameters.json',
'rg.min.parameters.json',
]
steps:
- name: 'Checkout'
uses: actions/checkout@v2
Expand All @@ -98,7 +106,7 @@ jobs:
- name: 'Using parameter file [${{ matrix.parameterFilePaths }}]'
uses: ./.github/actions/templates/validateModuleDeployment
with:
templateFilePath: '${{ env.modulePath }}/.bicep/nested_rbac_sub.bicep'
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.resourceGroupName }}'
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/ms.authorization.roledefinitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,15 @@ jobs:
strategy:
fail-fast: false
matrix:
parameterFilePaths: ['parameters.json', 'min.parameters.json']
parameterFilePaths:
[
'mg.parameters.json',
'mg.min.parameters.json',
'sub.parameters.json',
'sub.min.parameters.json',
'rg.parameters.json',
'rg.min.parameters.json',
]
steps:
- name: 'Checkout'
uses: actions/checkout@v2
Expand All @@ -98,7 +106,7 @@ jobs:
- name: 'Using parameter file [${{ matrix.parameterFilePaths }}]'
uses: ./.github/actions/templates/validateModuleDeployment
with:
templateFilePath: '${{ env.modulePath }}/.bicep/nested_roleDefinitions_sub.bicep'
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.resourceGroupName }}'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/platform.dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
strategy:
fail-fast: false
matrix:
parameterFilePaths: ['parameters.json']
parameterFilePaths: ['mg.parameters.json', 'sub.parameters.json']
steps:
- name: 'Checkout'
uses: actions/checkout@v2
Expand All @@ -146,7 +146,7 @@ jobs:
- name: 'Deploy module'
uses: ./.github/actions/templates/validateModuleDeployment
with:
templateFilePath: 'arm/${{ env.namespace }}/.bicep/nested_policyAssignments_sub.bicep'
templateFilePath: 'arm/${{ env.namespace }}/deploy.bicep'
parameterFilePath: '${{ env.dependencyPath }}/${{ env.namespace }}/parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.defaultResourceGroupName }}'
Expand Down Expand Up @@ -1135,7 +1135,7 @@ jobs:
- name: 'Deploy module'
uses: ./.github/actions/templates/validateModuleDeployment
with:
templateFilePath: 'arm/${{ env.namespace }}/.bicep/nested_rbac_sub.bicep'
templateFilePath: 'arm/${{ env.namespace }}/subscription/deploy.bicep'
parameterFilePath: '${{ env.dependencyPath }}/${{ env.namespace }}/parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.defaultResourceGroupName }}'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"value": "<<namePrefix>>-min-mg-polAss"
},
"policyDefinitionID": {
"value": "/providers/Microsoft.Authorization/policyDefinitions/06a78e20-9358-41c9-923c-fb736d382a4d"
}
}
}
Loading