terraform-provider-prismacloud
terraform-provider-prismacloud copied to clipboard
Alert Rule Policy Filter
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?