PaloAltoNetworks / terraform-provider-prismacloudcompute

Terraform provider for Prisma Cloud Compute
https://registry.terraform.io/providers/PaloAltoNetworks/prismacloudcompute/latest
Mozilla Public License 2.0
24 stars 28 forks source link

Data Resource to Manage Custom Rules #37

Closed hi-artem closed 2 years ago

hi-artem commented 2 years ago

Is your feature request related to a problem?

We should have a way to get ID for Custom Rules. It will be particularly useful for the Rules that pre-exist in Prisma Cloud Compute.

Describe the solution you'd like

data "prismacloudcompute_custom_rule" "rule" {
  name = "Block log4j"
}

resource "prismacloudcompute_container_runtime_policy" "ruleset" {
    custom_rule {
      action = "incident"
      effect = "block"
      id     = data.prismacloudcompute_custom_rule.rule
    }
}
wfg commented 2 years ago

In v0.3.0. Thanks for the contributions @hi-artem!