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

Misconfigured Policy Definition #864

Closed
MatiasTontti opened this issue Nov 19, 2021 · 1 comment · Fixed by #865
Closed

Misconfigured Policy Definition #864

MatiasTontti opened this issue Nov 19, 2021 · 1 comment · Fixed by #865
Assignees

Comments

@MatiasTontti
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Versions

terraform: 1.0.5

azure provider: 2.76.0

module: 0.4.0 (Policy definition looks same as in 1.0.0)

Description

Describe the bug

I was doing a check for our Landing Zone Policies and noticed a misconfiguration in one of the policy definitions.
Initiative Definition "Deploy Diagnostic Settings to Azure Services" has a policy called "Deploy Diagnostic Settings for Automation to Log Analytics workspace". This policy enables diagnostic settings for Automation Account created by the module. Policy is shown as non-compliant, even though i had done the remediation successfully.

Expected Output
Expected output is that the policy should be compliant.

Actual Output
Policy is non-compliant even though the remediation was done successfully.

Steps to Reproduce

  1. Don't set any diagnostic settings to the Automation Account created by the module.
  2. Run remediation for the policy "Deploy Diagnostic Settings for Automation to Log Analytics workspace"
  3. Check the compliance of the policy after evaluation scan, it should be shown as non-compliant

Screenshots
First screenshot shows the diagnostic settings and the policy compliance after running the remediation.
non-compliant
Second screenshot show the diagnostic settings and the policy compliance when remediation is run and AuditEvent category is enabled manually.
Compliant

Additional context
Policy will be shown as compliant, if AuditEvent option is chosen in Diagnostic settings of the Automation Account.
The problem would be solved if AuditEvent option is enabled in the policy definition.

@krowlandson krowlandson self-assigned this Nov 25, 2021
@krowlandson krowlandson transferred this issue from Azure/terraform-azurerm-caf-enterprise-scale Nov 25, 2021
@krowlandson
Copy link
Contributor

krowlandson commented Nov 25, 2021

Fix was proposed in Azure/terraform-azurerm-caf-enterprise-scale#201 by @marcusfriede but have transferred issue to source repository and closed the original PR so we can make the update here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants