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

Build-PolicyDocumentation #892

Open
jeremiahhoward opened this issue Feb 25, 2025 · 0 comments
Open

Build-PolicyDocumentation #892

jeremiahhoward opened this issue Feb 25, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jeremiahhoward
Copy link
Member

Describe the bug
Policy Documentation contains "Error" in Effect field for

85175a36-2f12-419a-96b4-18d5b0096531 | Enable allLogs category group resource logging for supported resources to Event Hub

0884adba-2312-4468-abeb-5422caed1038 | Enable allLogs category group resource logging for supported resources to Log Analytics
b6b86da9-e527-49de-ac59-6af0a9db10b8 | Enable allLogs category group resource logging for supported resources to storage
1020d527-2764-4230-92cc-7035e4fcf8a7 | Enable audit category group resource logging for supported resources to Event Hub
f5b29bc4-feca-4cc6-a58a-772dd5e290a5 | Enable audit category group resource logging for supported resources to Log Analytics
8d723fb6-6680-45be-9d37-b1a4adb52207 | Enable audit category group resource logging for supported resources to storage

To Reproduce
Steps to reproduce the behavior:
Build-PolicyDocumentation with any of the listed policySets

Expected behavior
Return with effect value specified in the parameters

Screenshots
Convert-EffectToCsvString -Effect $effectDefault | This is the command that throws an error during the course of Build-PolicyDocumentation

This is the switch that is at the core of this command
$effectValueText = switch ($Effect) {         "Modify" { "Modify" }         "Append" { "Append" }         "DenyAction" { "DenyAction" }         "Deny" { "Deny" }         "Audit" { "Audit" }         "Manual" { "Manual" }         "DeployIfNotExists" { "DeployIfNotExists" }         "AuditIfNotExists" { "AuditIfNotExists" }         "Disabled" { "Disabled" }         default { "Error" }     }

This switch within that command cannot accommodate the effect values used in the above policySets as they are equations rather than strings [if(contains(parameters('resourceTypeList'),'microsoft.cloudtest/hostedpools'),parameters('effect'),'Disabled')]

EPAC Version
Version of EPAC module you are using.
Tested with latest script based version of 10.8.2

@jeremiahhoward jeremiahhoward added the bug Something isn't working label Feb 25, 2025
@jeremiahhoward jeremiahhoward self-assigned this Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants