Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added logic to add available role names to readme #706

Merged
merged 173 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 170 commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
20ac8b7
Added skeleton
AlexanderSehr Nov 7, 2023
4939b4d
Implemented first new tests
AlexanderSehr Nov 7, 2023
4e1d86f
Changed to warning
AlexanderSehr Nov 8, 2023
94fff0b
Expanded test verbosity & added additional tets
AlexanderSehr Nov 8, 2023
c18ce6b
Finalized further tests
AlexanderSehr Nov 8, 2023
a343694
Update to latest
AlexanderSehr Nov 8, 2023
3a6f0a2
Update to latest
AlexanderSehr Nov 8, 2023
4ab6a5b
Added module name + small fix
AlexanderSehr Nov 8, 2023
9bb64bd
Fixed kvlt
AlexanderSehr Nov 8, 2023
68e2bd2
Small caching fix
AlexanderSehr Nov 8, 2023
1a013c2
Small fix and enabled passthru of warnings to GH
AlexanderSehr Nov 8, 2023
1c2fc8a
More updates
AlexanderSehr Nov 8, 2023
d9c6dd5
Update to latest
AlexanderSehr Nov 8, 2023
dd0c343
Updated test names
AlexanderSehr Nov 8, 2023
2ebd458
JSON rollback
AlexanderSehr Nov 8, 2023
f6caf7e
Updated regex
AlexanderSehr Nov 8, 2023
f56f66a
Removed assertion
AlexanderSehr Nov 8, 2023
282b640
Update to latest
AlexanderSehr Nov 8, 2023
c025f52
Update avm/utilities/pipelines/staticValidation/compliance/module.tes…
AlexanderSehr Nov 9, 2023
405901a
Update avm/utilities/pipelines/staticValidation/compliance/module.tes…
AlexanderSehr Nov 9, 2023
904c82f
Merge branch 'main' into users/alsehr/testFileCompliance
AlexanderSehr Nov 9, 2023
ef24d1f
Rollback of unrelated changes
AlexanderSehr Nov 9, 2023
9393aa1
Merge branch 'Azure:main' into main
AlexanderSehr Nov 9, 2023
cb39086
Merge branch 'Azure:main' into main
AlexanderSehr Nov 9, 2023
89eac40
Merge branch 'Azure:main' into main
AlexanderSehr Nov 10, 2023
712a673
Merge branch 'Azure:main' into main
AlexanderSehr Nov 13, 2023
55e095f
Resolved conflict
AlexanderSehr Nov 14, 2023
3121335
Update to latest
AlexanderSehr Nov 14, 2023
e9d736c
Merge branch 'Azure:main' into main
AlexanderSehr Nov 15, 2023
abfa1b9
Merge branch 'Azure:main' into main
AlexanderSehr Nov 15, 2023
c6707f6
Merge branch 'Azure:main' into main
AlexanderSehr Nov 16, 2023
246f9ba
Merge branch 'Azure:main' into main
AlexanderSehr Nov 16, 2023
6e9729d
Merge branch 'Azure:main' into main
AlexanderSehr Nov 16, 2023
26ea9f6
Merge branch 'Azure:main' into main
AlexanderSehr Nov 17, 2023
c2d183b
Merge branch 'Azure:main' into main
AlexanderSehr Nov 18, 2023
0c6650e
Merge branch 'Azure:main' into main
AlexanderSehr Nov 19, 2023
65094a5
Merge branch 'Azure:main' into main
AlexanderSehr Nov 21, 2023
968cd9a
Merge branch 'Azure:main' into main
AlexanderSehr Nov 21, 2023
3c9589b
Merge branch 'Azure:main' into main
AlexanderSehr Nov 24, 2023
eb34ddf
Merge branch 'Azure:main' into main
AlexanderSehr Nov 25, 2023
3d4f5c6
Added pipeline to main for testing
AlexanderSehr Nov 26, 2023
70154f3
Merge branch 'Azure:main' into main
AlexanderSehr Nov 27, 2023
18bd2ad
Merge branch 'Azure:main' into main
AlexanderSehr Nov 27, 2023
940b34f
Merge branch 'Azure:main' into main
AlexanderSehr Nov 28, 2023
fbb840f
Merge branch 'Azure:main' into main
AlexanderSehr Nov 29, 2023
381e366
Merge branch 'Azure:main' into main
AlexanderSehr Nov 29, 2023
06bcda3
Merge branch 'Azure:main' into main
AlexanderSehr Dec 1, 2023
0858beb
Merge branch 'Azure:main' into main
AlexanderSehr Dec 1, 2023
72b5fbb
Merge branch 'Azure:main' into main
AlexanderSehr Dec 1, 2023
917a761
TEst disable pipe
AlexanderSehr Dec 4, 2023
1b89452
Merge branch 'Azure:main' into main
AlexanderSehr Dec 4, 2023
feb981e
Update to latest
AlexanderSehr Dec 4, 2023
dda85a8
Merge branch 'Azure:main' into main
AlexanderSehr Dec 4, 2023
45873b4
Enabled roles to be added to the readme
AlexanderSehr Dec 5, 2023
0373f46
Merge branch 'Azure:main' into main
AlexanderSehr Dec 6, 2023
a72cdce
Merge branch 'main' into users/alsehr/readme_Roles
AlexanderSehr Dec 9, 2023
80247e4
Merge branch 'Azure:main' into main
AlexanderSehr Dec 9, 2023
2b5a791
Merge branch 'Azure:main' into main
AlexanderSehr Dec 10, 2023
f1bab34
Merge branch 'Azure:main' into main
AlexanderSehr Dec 19, 2023
1166843
Merge branch 'main' into users/alsehr/readme_Roles
AlexanderSehr Dec 19, 2023
a8b8d8f
Update to latest
AlexanderSehr Dec 19, 2023
7452d0b
Moved script to enable reusability
AlexanderSehr Dec 21, 2023
bf45ea1
Update to latest
AlexanderSehr Dec 21, 2023
cefe266
Update to latest
AlexanderSehr Dec 21, 2023
393a03c
Enabled language version 1 & 2
AlexanderSehr Dec 21, 2023
28934cd
Update to latest
AlexanderSehr Dec 21, 2023
afbacba
Update to latest
AlexanderSehr Dec 21, 2023
ef12ee5
Merge branch 'Azure:main' into main
AlexanderSehr Dec 21, 2023
ec1722c
Merge branch 'Azure:main' into main
AlexanderSehr Dec 21, 2023
f4136ec
Added SA workflow
AlexanderSehr Dec 22, 2023
928aada
Merge branch 'main' into users/alsehr/readme_Roles
ChrisSidebotham Dec 22, 2023
e55e732
Added workflow
AlexanderSehr Jan 1, 2024
5c6aa5e
Update to latest
AlexanderSehr Jan 1, 2024
086c1a8
Merge branch 'Azure:main' into main
AlexanderSehr Jan 2, 2024
a9821fb
Merge branch 'Azure:main' into main
AlexanderSehr Jan 3, 2024
62b326f
Merge branch 'Azure:main' into main
AlexanderSehr Jan 3, 2024
c159269
Merge branch 'Azure:main' into main
AlexanderSehr Jan 4, 2024
6e1f59a
Merge branch 'Azure:main' into main
AlexanderSehr Jan 5, 2024
fb7befc
Merge branch 'Azure:main' into main
AlexanderSehr Jan 5, 2024
cb72681
Merge branch 'Azure:main' into main
AlexanderSehr Jan 8, 2024
f3befb7
Merge branch 'Azure:main' into main
AlexanderSehr Jan 10, 2024
f938cd8
Merge branch 'Azure:main' into main
AlexanderSehr Jan 12, 2024
d0924b6
Merge branch 'Azure:main' into main
AlexanderSehr Jan 14, 2024
315522f
Merge branch 'Azure:main' into main
AlexanderSehr Jan 17, 2024
4012fdd
Update to latest
AlexanderSehr Jan 18, 2024
b18ab70
Merge branch 'Azure:main' into main
AlexanderSehr Jan 20, 2024
686dc83
Merge branch 'Azure:main' into main
AlexanderSehr Jan 22, 2024
3f225f9
Removed outdated metadata
AlexanderSehr Jan 23, 2024
f2bd197
Update to latest
AlexanderSehr Jan 23, 2024
4cd0a6f
Merge branch 'Azure:main' into main
AlexanderSehr Jan 26, 2024
01f3a38
Merged latest main
AlexanderSehr Jan 26, 2024
18c794a
Merge branch 'Azure:main' into users/alsehr/testCleanup
AlexanderSehr Jan 26, 2024
732a605
Merge branch 'main' into users/alsehr/testCleanup
AlexanderSehr Jan 29, 2024
c0105fe
Merge branch 'Azure:main' into main
AlexanderSehr Jan 29, 2024
c7d09f2
Merge branch 'main' into users/alsehr/testCleanup
AlexanderSehr Jan 29, 2024
bea9408
Merge branch 'users/alsehr/testCleanup' of https://github.com/Alexand…
AlexanderSehr Jan 29, 2024
9d063ce
Refereshed docs
AlexanderSehr Jan 29, 2024
db61282
Merge branch 'main' into users/alsehr/testCleanup
AlexanderSehr Jan 29, 2024
4ec79f8
Merge branch 'Azure:main' into main
AlexanderSehr Jan 29, 2024
c26b307
Merge branches 'users/alsehr/testCleanup' and 'main' of https://githu…
AlexanderSehr Jan 29, 2024
e3759a8
Merge branch 'Azure:main' into main
AlexanderSehr Feb 2, 2024
86869a1
Merge branch 'main' of https://github.com/AlexanderSehr/bicep-registr…
AlexanderSehr Feb 2, 2024
f8da6b9
Merge branch 'Azure:main' into main
AlexanderSehr Feb 4, 2024
ece4faa
Merge branch 'main' of https://github.com/AlexanderSehr/bicep-registr…
AlexanderSehr Feb 4, 2024
8884290
Merge branch 'Azure:main' into main
AlexanderSehr Feb 9, 2024
6ed614f
Merge branch 'Azure:main' into main
AlexanderSehr Feb 10, 2024
e307d2a
Merge branch 'Azure:main' into main
AlexanderSehr Feb 11, 2024
96589bb
Merge branch 'Azure:main' into main
AlexanderSehr Feb 12, 2024
75ade55
Merge branch 'Azure:main' into main
AlexanderSehr Feb 13, 2024
56e7afb
Merge branch 'Azure:main' into main
AlexanderSehr Feb 21, 2024
f89b946
Merge branch 'Azure:main' into main
AlexanderSehr Feb 21, 2024
c861111
Merge branch 'Azure:main' into main
AlexanderSehr Feb 22, 2024
9511716
Merge branch 'Azure:main' into main
AlexanderSehr Feb 26, 2024
f28816d
Merge branch 'Azure:main' into main
AlexanderSehr Feb 27, 2024
79b4e78
Merge branch 'Azure:main' into main
AlexanderSehr Mar 5, 2024
31a3f76
Merge branch 'Azure:main' into main
AlexanderSehr Mar 7, 2024
e6975de
Merge branch 'Azure:main' into main
AlexanderSehr Mar 9, 2024
005581f
Update to latest
AlexanderSehr Mar 9, 2024
15a7ed5
Update to latest
AlexanderSehr Mar 9, 2024
922fd79
Update to latest
AlexanderSehr Mar 9, 2024
d861c45
Update to latest
AlexanderSehr Mar 9, 2024
a4d71e7
Merge branch 'main' into users/alsehr/e2eTestCheck
AlexanderSehr Mar 10, 2024
033baab
Merge branch 'Azure:main' into main
AlexanderSehr Mar 11, 2024
c46abd0
Merge branch 'main' of https://github.com/AlexanderSehr/bicep-registr…
AlexanderSehr Mar 11, 2024
5b35a3f
Merge branch 'Azure:main' into main
AlexanderSehr Mar 13, 2024
0012def
Merge branch 'Azure:main' into main
AlexanderSehr Mar 17, 2024
13f0450
Merge branch 'Azure:main' into main
AlexanderSehr Mar 21, 2024
4dcee53
Merge branch 'Azure:main' into main
AlexanderSehr Mar 23, 2024
88e2bea
Merge branch 'Azure:main' into main
AlexanderSehr Mar 25, 2024
776bed8
Retired / refactored workflows
AlexanderSehr Mar 25, 2024
0ab044d
Merge branch 'Azure:main' into main
AlexanderSehr Mar 26, 2024
d4c3794
Merge branch 'Azure:main' into main
AlexanderSehr Mar 26, 2024
e51366b
Merge branch 'Azure:main' into main
AlexanderSehr Mar 31, 2024
06ad8d7
Merge branch 'main' into users/workflowRetire
AlexanderSehr Mar 31, 2024
aaf0d22
Merge branch 'main' into users/workflowRetire
AlexanderSehr Mar 31, 2024
a4c516d
Applied suggestion
AlexanderSehr Mar 31, 2024
16899f2
Removed scripts
AlexanderSehr Mar 31, 2024
29f60ed
Merge branch 'Azure:main' into main
AlexanderSehr Apr 1, 2024
74783f1
Merge branch 'main' into users/workflowRetire
AlexanderSehr Apr 2, 2024
7888d41
Merge branch 'Azure:main' into main
AlexanderSehr Apr 3, 2024
666a545
Merge branch 'Azure:main' into main
AlexanderSehr Apr 3, 2024
a7aea77
Merge branch 'Azure:main' into main
AlexanderSehr Apr 8, 2024
5c05401
Merge branch 'Azure:main' into main
AlexanderSehr Apr 8, 2024
2ba34a4
Merge branch 'Azure:main' into main
AlexanderSehr Apr 10, 2024
f61b688
Updated encr
AlexanderSehr Apr 12, 2024
5032da5
Merge branch 'Azure:main' into main
AlexanderSehr Apr 12, 2024
ba3e41d
Merge branch 'main' of https://github.com/AlexanderSehr/bicep-registr…
AlexanderSehr Apr 12, 2024
1c658d3
Merge branch 'Azure:main' into main
AlexanderSehr Apr 15, 2024
2192861
Merge branch 'main' of https://github.com/AlexanderSehr/bicep-registr…
AlexanderSehr Apr 15, 2024
10339d4
Merged latest main
AlexanderSehr Apr 15, 2024
825468e
Merge branch 'users/workflowRetire' of https://github.com/AlexanderSe…
AlexanderSehr Apr 15, 2024
7ab22c1
Merge branch 'Azure:main' into main
AlexanderSehr Apr 17, 2024
98b4bbc
Merge branches 'users/workflowRetire' and 'main' of https://github.co…
AlexanderSehr Apr 18, 2024
391dec3
Merge branch 'Azure:main' into main
AlexanderSehr Apr 20, 2024
cd4d559
Update to latest
AlexanderSehr Apr 20, 2024
7ae8786
Undid changes that should be in branch in main
AlexanderSehr Apr 20, 2024
86ed73b
Merge branch 'Azure:main' into main
AlexanderSehr Apr 27, 2024
42f7fe9
Merge branch 'Azure:main' into main
AlexanderSehr Apr 29, 2024
d20afeb
Added workflow
AlexanderSehr Apr 29, 2024
157adb5
Merge pull request #4 from AlexanderSehr/users/alsehr/deploymentRemoval
AlexanderSehr Apr 29, 2024
2157079
Update to latest
AlexanderSehr Apr 29, 2024
e64d2f2
Merge branch 'main' into users/alsehr/deploymentRemoval
AlexanderSehr Apr 29, 2024
2bd3129
Small fix
AlexanderSehr Apr 29, 2024
8570dba
Merge branch 'Azure:main' into main
AlexanderSehr Apr 29, 2024
71307c0
Merge branch 'Azure:main' into main
AlexanderSehr Apr 30, 2024
71c34e4
Update to latest
AlexanderSehr May 2, 2024
9620e7a
Merge branch 'Azure:main' into main
AlexanderSehr May 7, 2024
cdbc081
Merge branch 'Azure:main' into main
AlexanderSehr May 7, 2024
669b083
Update to latest
AlexanderSehr May 12, 2024
40f2df5
Update to latest
AlexanderSehr May 14, 2024
8d4212c
Merge branch 'main' into users/alsehr/readme_Roles
AlexanderSehr Sep 13, 2024
8a29af8
Resolved conflicts & refreshed files
AlexanderSehr Sep 13, 2024
1a6f438
Regenerated all docs
AlexanderSehr Sep 13, 2024
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
17 changes: 17 additions & 0 deletions avm/res/batch/batch-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,17 @@ Array of role assignments to create.

- Required: No
- Type: array
- Roles configurable by name:
eriqua marked this conversation as resolved.
Show resolved Hide resolved
- `'Contributor'`
- `'DNS Resolver Contributor'`
- `'DNS Zone Contributor'`
- `'Domain Services Contributor'`
- `'Domain Services Reader'`
- `'Network Contributor'`
- `'Owner'`
- `'Private DNS Zone Contributor'`
- `'Reader'`
- `'Role Based Access Control Administrator (Preview)'`

**Required parameters**

Expand Down Expand Up @@ -1428,6 +1439,12 @@ Array of role assignments to create.

- Required: No
- Type: array
- Roles configurable by name:
- `'Contributor'`
- `'Owner'`
- `'Reader'`
- `'Role Based Access Control Administrator (Preview)'`
- `'User Access Administrator'`

**Required parameters**

Expand Down
26 changes: 26 additions & 0 deletions avm/res/key-vault/vault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,17 @@ Array of role assignments to create.

- Required: No
- Type: array
- Roles configurable by name:
- `'Contributor'`
- `'DNS Resolver Contributor'`
- `'DNS Zone Contributor'`
- `'Domain Services Contributor'`
- `'Domain Services Reader'`
- `'Network Contributor'`
- `'Owner'`
- `'Private DNS Zone Contributor'`
- `'Reader'`
- `'Role Based Access Control Administrator (Preview)'`

**Required parameters**

Expand Down Expand Up @@ -1656,6 +1667,21 @@ Array of role assignments to create.

- Required: No
- Type: array
- Roles configurable by name:
- `'Contributor'`
- `'Key Vault Administrator'`
- `'Key Vault Certificates Officer'`
- `'Key Vault Contributor'`
- `'Key Vault Crypto Officer'`
- `'Key Vault Crypto Service Encryption User'`
- `'Key Vault Crypto User'`
- `'Key Vault Reader'`
- `'Key Vault Secrets Officer'`
- `'Key Vault Secrets User'`
- `'Owner'`
- `'Reader'`
- `'Role Based Access Control Administrator (Preview)'`
- `'User Access Administrator'`

**Required parameters**

Expand Down
4 changes: 2 additions & 2 deletions avm/res/key-vault/vault/access-policy/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "10878813547461142217"
"version": "0.27.1.19265",
"templateHash": "13379419349517171769"
},
"name": "Key Vault Access Policies",
"description": "This module deploys a Key Vault Access Policy.",
Expand Down
15 changes: 15 additions & 0 deletions avm/res/key-vault/vault/key/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,21 @@ Array of role assignments to create.

- Required: No
- Type: array
- Roles configurable by name:
- `'Contributor'`
- `'Key Vault Administrator'`
- `'Key Vault Certificates Officer'`
- `'Key Vault Contributor'`
- `'Key Vault Crypto Officer'`
- `'Key Vault Crypto Service Encryption User'`
- `'Key Vault Crypto User'`
- `'Key Vault Reader'`
- `'Key Vault Secrets Officer'`
- `'Key Vault Secrets User'`
- `'Owner'`
- `'Reader'`
- `'Role Based Access Control Administrator (Preview)'`
- `'User Access Administrator'`

**Required parameters**

Expand Down
4 changes: 2 additions & 2 deletions avm/res/key-vault/vault/key/main.json
AlexanderSehr marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "5903918450419813264"
"version": "0.27.1.19265",
"templateHash": "12348300599961129774"
},
"name": "Key Vault Keys",
"description": "This module deploys a Key Vault Key.",
Expand Down
16 changes: 8 additions & 8 deletions avm/res/key-vault/vault/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "15417452365743513256"
"version": "0.27.1.19265",
"templateHash": "6795174546908413153"
},
"name": "Key Vaults",
"description": "This module deploys a Key Vault.",
Expand Down Expand Up @@ -896,8 +896,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "10878813547461142217"
"version": "0.27.1.19265",
"templateHash": "13379419349517171769"
},
"name": "Key Vault Access Policies",
"description": "This module deploys a Key Vault Access Policy.",
Expand Down Expand Up @@ -1165,8 +1165,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "1877278864243602204"
"version": "0.27.1.19265",
"templateHash": "6420465919494344964"
},
"name": "Key Vault Secrets",
"description": "This module deploys a Key Vault Secret.",
Expand Down Expand Up @@ -1454,8 +1454,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "5903918450419813264"
"version": "0.27.1.19265",
"templateHash": "12348300599961129774"
},
"name": "Key Vault Keys",
"description": "This module deploys a Key Vault Key.",
Expand Down
15 changes: 15 additions & 0 deletions avm/res/key-vault/vault/secret/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,21 @@ Array of role assignments to create.

- Required: No
- Type: array
- Roles configurable by name:
- `'Contributor'`
- `'Key Vault Administrator'`
- `'Key Vault Certificates Officer'`
- `'Key Vault Contributor'`
- `'Key Vault Crypto Officer'`
- `'Key Vault Crypto Service Encryption User'`
- `'Key Vault Crypto User'`
- `'Key Vault Reader'`
- `'Key Vault Secrets Officer'`
- `'Key Vault Secrets User'`
- `'Owner'`
- `'Reader'`
- `'Role Based Access Control Administrator (Preview)'`
- `'User Access Administrator'`

**Required parameters**

Expand Down
4 changes: 2 additions & 2 deletions avm/res/key-vault/vault/secret/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "1877278864243602204"
"version": "0.27.1.19265",
"templateHash": "6420465919494344964"
},
"name": "Key Vault Secrets",
"description": "This module deploys a Key Vault Secret.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,20 @@ function Get-NestedResourceList {
if ($TemplateFileContent.resources -is [System.Collections.Hashtable]) {
# With the introduction of user defined types, a compiled template's resources are not part of an ordered hashtable instead of an array.
$currLevelResources += $TemplateFileContent.resources.Keys | ForEach-Object {
$TemplateFileContent.resources[$_]
$elem = $TemplateFileContent.resources[$_]
$elem['identifier'] = $_
$elem
} | Where-Object {
$_.existing -ne $true
}
} else {
# Default array
$currLevelResources += $TemplateFileContent.resources
$currLevelResources += $TemplateFileContent.resources | ForEach-Object {
$_['identifier'] = $_.name
$_
} | Where-Object {
$_.existing -ne $true
}
}
}
foreach ($resource in $currLevelResources) {
Expand Down
31 changes: 28 additions & 3 deletions avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ function Set-DefinitionSection {
)
}
} else {
$formattedDefaultValue = $null
$formattedDefaultValue = $null # Reset value for future iterations
}

# Format allowed values
Expand Down Expand Up @@ -397,7 +397,31 @@ function Set-DefinitionSection {
)
}
} else {
$formattedAllowedValues = $null
$formattedAllowedValues = $null # Reset value for future iterations
}

# Special case for 'roleAssignments' parameter
if (($parameter.name -eq 'roleAssignments') -and ($TemplateFileContent.variables.keys -contains 'builtInRoleNames')) {
if ([String]::IsNullOrEmpty($ParentName)) {
# Top-level invocation
$roles = $TemplateFileContent.variables.builtInRoleNames.Keys
} else {
# Nested-invocation (requires e.g., roles for of nested private endpoint template)
$flattendResources = Get-NestedResourceList -TemplateFileContent $TemplateFileContent
if ($resourceIdentifier = $flattendResources.identifier | Where-Object { $_ -match "^.*_$ParentName`$" }) {
$roles = ($flattendResources | Where-Object {
$_.identifier -eq $resourceIdentifier
}).properties.template.variables.builtInRoleNames.Keys
} else {
Write-Warning ('Failed to identify roles for parameter [{0}] of type [{1}] as resource with identifier [{2}] was not found in the corresponding linked template.' -f $parameter.name, $ParentName, "*_$ParentName")
}
}
$formattedRoleNames = $roles.count -gt 0 ? @(
'- Roles configurable by name:',
($roles | ForEach-Object { " - ``'$_'``" } | Out-String).TrimEnd()
) : $null
} else {
$formattedRoleNames = $null # Reset value for future iterations
}

# Build list item
Expand All @@ -410,7 +434,8 @@ function Set-DefinitionSection {
('- Required: {0}' -f $isRequired),
('- Type: {0}' -f $type),
((-not [String]::IsNullOrEmpty($formattedDefaultValue)) ? $formattedDefaultValue : $null),
((-not [String]::IsNullOrEmpty($formattedAllowedValues)) ? $formattedAllowedValues : $null)
((-not [String]::IsNullOrEmpty($formattedAllowedValues)) ? $formattedAllowedValues : $null),
((-not [String]::IsNullOrEmpty($formattedRoleNames)) ? $formattedRoleNames : $null),
''
) | Where-Object { $null -ne $_ }

Expand Down