cf-terraforming icon indicating copy to clipboard operation
cf-terraforming copied to clipboard

25+ firewall_rules and filters

Open robert-put opened this issue 3 years ago • 7 comments

Confirmation

  • [X] My issue isn't already found on the issue tracker.
  • [X] I have replicated my issue using the latest version of the library and it is still present.

cf-terraforming version

cf-terraforming v0.2.0

Expected outcome

  1. I expected to have 27 firewall_rule resources outputted
  2. I expected to have 27 filters resources outputted
  3. I expected to have 27 firewall_rule import commands outputted
  4. I expected to have 27 filter import commands outputted

Actual outcome

  1. 24 firewall__rule resources where outputted
  2. 24 filter resources where outputted
  3. 25 firewall_rule import commands outputted
  4. 25 filter import commands where outputted

After running the imports I fixed the 25th resource's(that got imported) based on what it wanted to delete. But there where 2 firewall rules with missing corresponding filters and 2 filters that where not referenced in the firewall rules....

Seems to be related to the pagination limit of 25 for the api, but I don't see anything in the docs for this tool in how to resolve that.

Steps to reproduce

  1. have 27+ firewall_rules in cloudflare and try to import them

References

No response

robert-put avatar May 06 '21 21:05 robert-put

This is something I'm looking to offload to cloudflare-go instead as it will benefit all the consumers once it lands. See https://github.com/cloudflare/cloudflare-go/issues/619

jacobbednarz avatar May 10 '21 02:05 jacobbednarz

Ahh that would explain it, was just starting to look into the go api to try and understand how it handled pagination but not familiar with go yet.

robert-put avatar May 10 '21 12:05 robert-put

A similar problem when generating resources/imports custom hostnames. Only 50 records are generated.

angryman9 avatar May 21 '21 11:05 angryman9

+1 on the custom hostnames, trying to import 115 and only getting 50 back.

SimonGtn avatar May 25 '21 08:05 SimonGtn

Same for cloudflare_account_member resources: Only 20 are exported.

ldb avatar Jun 01 '21 16:06 ldb

We have the same issue with only generating 25 firewal_rule and firewall_filter, is there any progress on this issue?

gray1117 avatar Nov 04 '21 10:11 gray1117

I am running into the same issue for cloudflare_firewall_rule

huguesalary avatar Feb 24 '22 23:02 huguesalary