Terraform 'package_id' list managed rules

Hi,

I’m working on terraforming parts of my cloudflare setup and I’m currently looking at the WAF packages here .

The argument ‘package_id’ is required and is the ID of the WAF package. Where can I find information on this id?

With the following endpoint I was able retrieve it: https://api.cloudflare.com/client/v4/zones/[zone_id]/firewall/waf/packages

But will this package_id change? I’d like to use the OWASP rule set and I notice it’s ID is the same for different zones. Can I safely use this as an variable in my terraform configuration?

Kind regards

I’ve found the easiest way to pull this data is to use cf-terraforming to export your existing config (and/or the config of a net new zone) to figure out what/if anything you’re actually changing from the defaults or what you feel is important to make sure is set to a specific value for %reasons%.

I wouldn’t expect the OWASP rule ID to change, so you could set the values for multiple zones using the same base config.

Hi,

Thanks for your quick reply. Will take a look at the cf-terraforming .

Kind regards

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.