-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add profile name parameter to diag policies #1059
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution @anwather, great work! Just a couple of minor details if you don't mind.
- Please assign a default value (SetByPolicy) for the profileName parameter or this will be a breaking change.
- Please remember to update the version in policy meta data. We are following this for versioning
- Please also update the associated policy set definition (Deploy-Diagnostics-LogAnalytics.) with the appropriate parameter and default parameters, including parameter assignment for all child policies
Thank you for your contribution @anwather When you created this PR did you leave the permissions enabled for Allow edits from maintainers? Just trying to work out why the Update Portal Experience action failed with a permissions error. Putting the feedback from @jfaurskov aside, we will also need this to run successfully before we can merge the PR. |
Are you sure about the double opening square brackets? |
100% 🤓 This is due to the way the policies get wrapped in variables and then looped over in the resulting compiled If you werent wrapping them, then yes the escaping isnt the same 👍 |
@jtracey93 is it worth us running a spike to see whether we can remove these without introducing too much additional complexity into the Bicep template? We might be able to find a better balance between how I built this vs. the way you handle this in the ALZ/Bicep implementation? |
@jfaurskov - all those policies have a default value for profileName parameter - I have bumped all the versions up. Unless there is something I have missed? |
@krowlandson - Permission is definitely enabled on there
Why is it trying to push back to my fork? |
lets open another item and discuss this there to not confuse this thread. But yes we can, but will need prioritisation conversation etc. :) |
@anwather looking good to me. We just need to get the update portal experience to work now. @krowlandson any ideas? |
@jfaurskov & @anwather do we need to update the Policy Set Definition/Initiative with the new parameter and version etc? |
I didn't change the version as there was no update to the initiative - there is already a default value for profile name in the initiative as well
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@anwather we are using automation to re-build the I've fixed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anwather could you please update versioning in the following files, then we should be set to merge:
src/resources/Microsoft.Authorization/policyDefinitions/Deploy-Diagnostics-WVDAppGroup.json
src/resources/Microsoft.Authorization/policyDefinitions/Deploy-Diagnostics-WVDHostPools.json
src/resources/Microsoft.Authorization/policyDefinitions/Deploy-Diagnostics-WVDWorkspace.json
Updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it's good to merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Overview/Summary
Replace this with a brief description of what this Pull Request fixes, changes, etc.
This PR fixes/adds/changes/removes
IHAC where they have deployed the diag policies with a different profile name as a parameter and several resources are reporting as non-compliant because it is looking for a diagnosticSettings/setByPolicy resource.
Remediation works successfully however policy continues to show as non-compliant.
Breaking Changes
None
Testing Evidence
Non compliant resource diagnostics became compliant after this fix.
As part of this Pull Request I have
main
branch/docs/wiki/whats-new.md
)