MagicFirewallRuleset

class MagicFirewallRuleset : KotlinCustomResource

Magic Firewall is a network-level firewall to protect networks that are onboarded to Cloudflare's Magic Transit. This resource creates a root ruleset on the account level and contains one or more rules. Rules can be crafted in Wireshark syntax and are evaluated in order, with the first rule having the highest priority.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.MagicFirewallRuleset;
import com.pulumi.cloudflare.MagicFirewallRulesetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new MagicFirewallRuleset("example", MagicFirewallRulesetArgs.builder()
.accountId("d41d8cd98f00b204e9800998ecf8427e")
.description("Global mitigations")
.name("Magic Transit Ruleset")
.rules(
Map.ofEntries(
Map.entry("action", "allow"),
Map.entry("description", "Allow TCP Ephemeral Ports"),
Map.entry("enabled", "true"),
Map.entry("expression", "tcp.dstport in { 32768..65535 }")
),
Map.ofEntries(
Map.entry("action", "block"),
Map.entry("description", "Block all"),
Map.entry("enabled", "true"),
Map.entry("expression", "ip.len >= 0")
))
.build());
}
}

Import

An existing Magic Firewall Ruleset can be imported using the account ID and ruleset ID

$ pulumi import cloudflare:index/magicFirewallRuleset:MagicFirewallRuleset example d41d8cd98f00b204e9800998ecf8427e/cb029e245cfdd66dc8d2e570d5dd3322

Properties

Link copied to clipboard
val accountId: Output<String>

The ID of the account where the ruleset is being created.

Link copied to clipboard
val description: Output<String>?

A note that can be used to annotate the rule.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the ruleset.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val rules: Output<List<Map<String, String>>>?
Link copied to clipboard
val urn: Output<String>