-
Notifications
You must be signed in to change notification settings - Fork 649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new resource cloudflare_magic_firewall_ruleset #884
Conversation
I think you're on the right track with this 👍 The ordering you're intending to do here seems like a good fit for rule {
# ...
}
rule {
# ...
}
rule {
# ...
} I'll hold off any deep review until the |
@patryk @jacobbednarz I'm opening this PR for review now that we have the relevant changes in upstream. Looking forward to your thoughts! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks 👍 to me however this is going to break CI (just a little bit more) as we don't have a great way of hooking this up to an account designed for these acceptance tests.
i don't mind too much at the moment but it is something we should take a look at fixing eventually...somehow 😆
linking #671 as here as well as it's a similar case whereby we can't really test it without real disruption. |
integration is green
|
Opening a draft PR for visibility.
This PR implements #880 and introduces a new resource
cloudflare_magic_firewall_ruleset
for managing Magic Transit Firewall Rules (Magic Firewall). Magic Firewall API is piggybacking on the new Rulesets API by usingDocs:
https://api.cloudflare.com/#rulesets-properties
https://developers.cloudflare.com/magic-transit/magic-firewall
The ruleset kind and ruleset phase for Magic Firewall Rules are abstracted by cloudflare-go and this PR cloudflare/cloudflare-go#558
Resource Layout
The resource uses a list of maps with a custom validator because the order of rules is important here. @jacobbednarz, I'd be happy to discuss if there's a smarter approach once the PR is ready to be reviewed.
Acceptance Tests:
ToDo:
Write acceptance testsWrite documentation