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

Alert Rule Policy Filter #277

Open
lvets opened this issue Jan 5, 2024 · 1 comment
Open

Alert Rule Policy Filter #277

lvets opened this issue Jan 5, 2024 · 1 comment
Labels

Comments

@lvets
Copy link

lvets commented Jan 5, 2024

Describe the bug

It's unclear from the documentation how to use the alertRulePolicyFilter part in the Terraform alert rule resource.

Let's say the API returns the following (removed some fields from the snippet for clearity):

{
  "policyScanConfigId": "xxx",
  "name": "Prisma Default Alert Rule",
  "description": "Prisma Default alert rule to scan all policies associated with label Prisma_Cloud  and all account added to 'Default Account Group'",
...
  "target": {
    "accountGroups": [
      "xxx"
    ],
    "excludedAccounts": [],
    "regions": [],
    "tags": [],
    "alertRulePolicyFilter": {
      "policy.severity": [],
      "policy.label": [
        "Prisma_Cloud"
      ],
      "cloud.type": [],
      "policy.complianceStandard": []
    }
  },
...
}

How can I use the alertRulePolicyFilter parameters in the Terraform prismacloud_alert_rule resource:

    "alertRulePolicyFilter": {
      "policy.severity": [],
      "policy.label": [
        "Prisma_Cloud"
      ],
      "cloud.type": [],
      "policy.complianceStandard": []
    }

Or do I need to first filter the prismacloud_policies data resource and then use those policies in a policies argument in the prismacloud_alert_rule resource?

@lvets lvets added the bug label Jan 5, 2024
@bryonwinger
Copy link

Attention to this would be great. We really need this fixed for our use cases.

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

No branches or pull requests

2 participants