Cloudflare snippet

I am playing around using snippets. I first created a snippet using a cloudflare_snippet resource and a cloudflare_snippet_rules, and I imported my JS file for the snippet. I am also using terraform to deploy, and it worked fine. But when I wanted to add a second snippet, configured same as the first (different name, Js file etc) the first one became unused and the second active. Sometimes it's the other way around. Any insight of why this is happening? Also when I try to make requests in the CF dashboard snippet playground or how it is called, I just get an infinite loading, any thoughts on this
5 Replies
Laudian
Laudian•2mo ago
cloudflare_snippet_rules, plural. This contains all your rules, not just one. So every time you deploy one, you (currently) delete the other.
inhumann
inhumannOP•2mo ago
Thank you, I am indeed dumb, and this worked great. Do you have any thoughts regarding the second issue? Whenever I try testing the snippet I get an infinite loading spinner
Laudian
Laudian•2mo ago
I can try the Snippet playground later, haven't used that yet. Works fine for me. Did you try testing a different browser with no plugins/private browser mode?
inhumann
inhumannOP•5w ago
Yes, I have tried with Chrome, Firefox and Safari as well as incognito mode, unfortunately the result is the same, I try making a request but nothing happens
ncano
ncano•4w ago
@inhumann, is this still happening for you? if so, could you send a HAR file and JS console log output my way please? 😉

Did you find this page helpful?