Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8e9b44a
added Az Policy and RBAC Modules
ahmadabdalla Oct 5, 2021
2cc5129
updated user identity module
ahmadabdalla Oct 5, 2021
dc2f0e0
Merge remote-tracking branch 'upstream/main' into users/ahmadabdalla/…
ahmadabdalla Oct 5, 2021
d18259e
catered for scenario where retryLimit is set to 1
ahmadabdalla Oct 5, 2021
885675a
added (ge) instead of (gt) for catch
ahmadabdalla Oct 5, 2021
513e45a
updated based on comments
ahmadabdalla Oct 5, 2021
64f5d4f
Merge remote-tracking branch 'upstream/main' into users/ahmadabdalla/…
ahmadabdalla Oct 5, 2021
f7af60b
updated lock scope
ahmadabdalla Oct 5, 2021
80b8ef4
updated test error for readme
ahmadabdalla Oct 5, 2021
eefcc6d
Merge remote-tracking branch 'upstream/main' into users/ahmadabdalla/…
ahmadabdalla Oct 5, 2021
155cd44
updated readme
ahmadabdalla Oct 5, 2021
45c5d93
fixed readme
ahmadabdalla Oct 5, 2021
a5fb7da
updated readme with check mark
ahmadabdalla Oct 5, 2021
3cc62ba
updated lock resource
ahmadabdalla Oct 5, 2021
f338e0d
Merge remote-tracking branch 'upstream/main' into users/ahmadabdalla/…
ahmadabdalla Oct 5, 2021
da792b7
Merge branch 'main' into users/ahmadabdalla/policyAndRbac
ahmadabdalla Oct 5, 2021
ef2e595
Merge remote-tracking branch 'upstream/main'
ahmadabdalla Oct 5, 2021
6b3d55c
Merge branch 'main' into users/ahmadabdalla/policyAndRbac
ahmadabdalla Oct 5, 2021
c8e9092
Clean up commit
ahmadabdalla Oct 5, 2021
9b99228
Modified pipelines to point to bicep file instead
ahmadabdalla Oct 5, 2021
b4c8a08
updated read me
ahmadabdalla Oct 6, 2021
9b4f45d
supressed parameter location validation
ahmadabdalla Oct 6, 2021
81b129e
added workaround
ahmadabdalla Oct 6, 2021
24fb130
added readme details
ahmadabdalla Oct 6, 2021
da0faf2
completed RBAC Assignment
ahmadabdalla Oct 6, 2021
ccb3648
remove check for variable name (_)
ahmadabdalla Oct 6, 2021
d19f3e3
updated policy read me
ahmadabdalla Oct 6, 2021
52d6393
updated policy
ahmadabdalla Oct 6, 2021
a371fd9
updated parameters
ahmadabdalla Oct 6, 2021
2dbafbe
updated readme
ahmadabdalla Oct 6, 2021
4d175a8
updated policy length
ahmadabdalla Oct 6, 2021
dda7d66
updated policy definitions pipeline
ahmadabdalla Oct 6, 2021
80f64b1
added exemption and set definition pipelines
ahmadabdalla Oct 6, 2021
b6b4496
Merge pull request #1 from ahmadabdalla/users/ahmadabdalla/policyAndRbac
ahmadabdalla Oct 6, 2021
59c807e
Users/ahmadabdalla/ms authorization (#2)
ahmadabdalla Oct 6, 2021
b307412
Merge remote-tracking branch 'upstream/main'
ahmadabdalla Oct 6, 2021
86d6c2d
Merge remote-tracking branch 'upstream/main'
ahmadabdalla Oct 6, 2021
9ba64cb
Users/ahmadabdalla/ms auth comments (#3)
ahmadabdalla Oct 8, 2021
51ad772
Merge branch 'Azure:main' into main
ahmadabdalla Oct 8, 2021
c69e208
Merge remote-tracking branch 'upstream/main'
ahmadabdalla Oct 9, 2021
8f44d6d
Merge remote-tracking branch 'upstream/main'
ahmadabdalla Oct 10, 2021
442f25b
Merge remote-tracking branch 'upstream/main'
ahmadabdalla Oct 11, 2021
cfd6226
Merge remote-tracking branch 'upstream/main'
ahmadabdalla Oct 11, 2021
e669249
Merge remote-tracking branch 'upstream/main'
ahmadabdalla Oct 11, 2021
10659c3
Merge remote-tracking branch 'upstream/main'
ahmadabdalla Oct 12, 2021
53242e6
added current version of roles to constructs
ahmadabdalla Oct 12, 2021
f84ad1e
Merge remote-tracking branch 'upstream/main'
ahmadabdalla Oct 12, 2021
60153e5
updated parameter files to point to test subscription
ahmadabdalla Oct 12, 2021
353842e
updated based on feedback
ahmadabdalla Oct 13, 2021
3442cf5
Merge remote-tracking branch 'upstream/main'
ahmadabdalla Oct 13, 2021
e3c62c7
updated to test principal ID
ahmadabdalla Oct 13, 2021
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
8 changes: 4 additions & 4 deletions .github/workflows/ms.authorization.policyassignments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: "Test module"
uses: ./.github/actions/templates/validateModuleDeploy
with:
templateFilePath: '${{ env.modulePath }}/deploy.json'
templateFilePath: '${{ env.modulePath }}/.bicep/nested_policyAssignments_sub.bicep'
parameterFilePath: '${{ env.modulePath }}/parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.resourceGroupName }}'
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
uses: ./.github/actions/templates/deployModule
with:
moduleName: '${{ env.moduleName }}'
templateFilePath: '${{ env.modulePath }}/deploy.json'
templateFilePath: '${{ env.modulePath }}/.bicep/nested_policyAssignments_sub.bicep'
parameterFilePath: '${{ env.modulePath }}/parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.resourceGroupName }}'
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
- name: "Publish module"
uses: ./.github/actions/templates/publishModule
with:
templateFilePath: '${{ env.modulePath }}/deploy.json'
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
componentTemplateSpecRGName: '${{ env.componentTemplateSpecRGName }}'
componentTemplateSpecRGLocation: '${{ env.componentTemplateSpecRGLocation }}'
componentTemplateSpecName: '${{ env.moduleName }}'
Expand Down Expand Up @@ -178,5 +178,5 @@ jobs:
uses: ./.github/actions/templates/removeModule
with:
moduleName: '${{ env.moduleName }}'
templateFilePath: '${{ env.modulePath }}/deploy.json'
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
resourceGroupName: '${{ env.resourceGroupName }}'
182 changes: 182 additions & 0 deletions .github/workflows/ms.authorization.policydefinitions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
name: "Authorization: policyDefinitions"

on:
workflow_dispatch:
inputs:
removeDeployment:
description: 'Remove deployed module'
required: false
default: 'false'
versioningOption:
description: 'The mode to handle the version increments [major|minor|patch|custom]'
required: false
default: 'patch'
customVersion:
description: 'The version to enforce if [versionOption] is set to [custom]'
required: false
default: '0.0.1'

env:
moduleName: 'policyDefinitions'
modulePath: 'arm/Microsoft.Authorization/policyDefinitions'
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_MGMTGROUP_ID: ${{ secrets.ARM_MGMTGROUP_ID }}

jobs:
##################
# UNIT TESTS #
##################
# Global tests
# ------------
job_tests_module_global:
runs-on: ubuntu-20.04
name: "Run global module tests"
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Test module"
uses: ./.github/actions/templates/validateModuleGeneral
with:
modulePath: '${{ env.modulePath }}'
moduleName: '${{ env.moduleName}}'

# Global API tests
# ----------------
job_tests_module_global_api:
runs-on: ubuntu-20.04
name: "Run global API module tests"
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Test module"
uses: ./.github/actions/templates/validateModuleApis
with:
modulePath: '${{ env.modulePath }}'
moduleName: '${{ env.moduleName}}'

# Validate deployment module tests
# --------------------------------
job_tests_module_deploy_validate:
runs-on: ubuntu-20.04
name: "Run deployment validation module tests"
strategy:
fail-fast: false
matrix:
parameterFilePaths: ['parameters.json']
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set environment variables
uses: deep-mm/set-variables@v1.0
with:
# Name of variable file
variableFileName: 'variables.module' # Don't write .json here
- name: "Test module"
uses: ./.github/actions/templates/validateModuleDeploy
with:
templateFilePath: '${{ env.modulePath }}/.bicep/nested_policyDefinitions_sub.bicep'
parameterFilePath: '${{ env.modulePath }}/parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.resourceGroupName }}'
subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}'
managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}'

####################
# DEPLOY TESTS #
####################
job_deploy_module:
runs-on: ubuntu-20.04
name: "Deploy module"
needs:
- job_tests_module_global
- job_tests_module_global_api
- job_tests_module_deploy_validate
strategy:
fail-fast: false
matrix:
parameterFilePaths: ['parameters.json']
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set environment variables
uses: deep-mm/set-variables@v1.0
with:
# Name of variable file
variableFileName: 'variables.module' # Don't write .json here
- name: "Deploy module"
uses: ./.github/actions/templates/deployModule
with:
moduleName: '${{ env.moduleName }}'
templateFilePath: '${{ env.modulePath }}/.bicep/nested_policyDefinitions_sub.bicep'
parameterFilePath: '${{ env.modulePath }}/parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.resourceGroupName }}'
subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}'
managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}'
removeDeployment: '${{ github.event.inputs.removeDeployment }}'

###############
# PUBLISH #
###############
job_publish_module:
name: "Publish module"
if: contains(fromJson('["refs/heads/main", "refs/heads/master"]'), github.ref)
runs-on: ubuntu-20.04
needs:
- job_deploy_module
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set environment variables
uses: deep-mm/set-variables@v1.0
with:
# Name of variable file
variableFileName: 'variables.module' # Don't write .json here
- name: "Publish module"
uses: ./.github/actions/templates/publishModule
with:
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
componentTemplateSpecRGName: '${{ env.componentTemplateSpecRGName }}'
componentTemplateSpecRGLocation: '${{ env.componentTemplateSpecRGLocation }}'
componentTemplateSpecName: '${{ env.moduleName }}'
componentTemplateSpecDescription: '${{ env.componentTemplateSpecDescription }}'
publishToTemplateSpec: '${{ env.publishToTemplateSpec }}'
versioningOption: '${{ github.event.inputs.versioningOption }}'
customVersion: '${{ github.event.inputs.customVersion }}'

##############
# REMOVE #
##############
job_remove_module:
runs-on: ubuntu-20.04
name: "Remove module"
if: ${{ always() && !cancelled() && github.event.inputs.removeDeployment == 'true' && (contains(needs.*.result, 'success') || contains(needs.*.result, 'failure')) }}
needs:
- job_deploy_module
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set environment variables
uses: deep-mm/set-variables@v1.0
with:
# Name of variable file
variableFileName: 'variables.module' # Don't write .json here
- name: "Remove module"
uses: ./.github/actions/templates/removeModule
with:
moduleName: '${{ env.moduleName }}'
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
resourceGroupName: '${{ env.resourceGroupName }}'
Loading