WafRule
Provides a Cloudflare WAF rule resource for a particular zone. This can be used to configure firewall behaviour for pre-defined firewall rules.
Example Usage
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
class MyStack : Stack
{
public MyStack()
{
var _00000 = new Cloudflare.WafRule("100000", new Cloudflare.WafRuleArgs
{
Mode = "simulate",
RuleId = "100000",
ZoneId = "ae36f999674d196762efcc5abb06b345",
});
}
}
Coming soon!
import pulumi
import pulumi_cloudflare as cloudflare
_100000 = cloudflare.WafRule("100000",
mode="simulate",
rule_id="100000",
zone_id="ae36f999674d196762efcc5abb06b345")import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const _100000 = new cloudflare.WafRule("100000", {
mode: "simulate",
ruleId: "100000",
zoneId: "ae36f999674d196762efcc5abb06b345",
});Create a WafRule Resource
new WafRule(name: string, args: WafRuleArgs, opts?: CustomResourceOptions);def WafRule(resource_name, opts=None, mode=None, package_id=None, rule_id=None, zone_id=None, __props__=None);func NewWafRule(ctx *Context, name string, args WafRuleArgs, opts ...ResourceOption) (*WafRule, error)public WafRule(string name, WafRuleArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args WafRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WafRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
WafRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The WafRule resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the WafRule resource produces the following output properties:
Look up an Existing WafRule Resource
Get an existing WafRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WafRuleState, opts?: CustomResourceOptions): WafRulestatic get(resource_name, id, opts=None, group_id=None, mode=None, package_id=None, rule_id=None, zone_id=None, __props__=None);func GetWafRule(ctx *Context, name string, id IDInput, state *WafRuleState, opts ...ResourceOption) (*WafRule, error)public static WafRule Get(string name, Input<string> id, WafRuleState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Group
Id string The ID of the WAF Rule Group that contains the rule.
- Mode string
The mode of the rule, can be one of [“block”, “challenge”, “default”, “disable”, “simulate”].
- Package
Id string The ID of the WAF Rule Package that contains the rule.
- Rule
Id string The WAF Rule ID.
- Zone
Id string The DNS zone ID to apply to.
- Group
Id string The ID of the WAF Rule Group that contains the rule.
- Mode string
The mode of the rule, can be one of [“block”, “challenge”, “default”, “disable”, “simulate”].
- Package
Id string The ID of the WAF Rule Package that contains the rule.
- Rule
Id string The WAF Rule ID.
- Zone
Id string The DNS zone ID to apply to.
- group
Id string The ID of the WAF Rule Group that contains the rule.
- mode string
The mode of the rule, can be one of [“block”, “challenge”, “default”, “disable”, “simulate”].
- package
Id string The ID of the WAF Rule Package that contains the rule.
- rule
Id string The WAF Rule ID.
- zone
Id string The DNS zone ID to apply to.
Package Details
- Repository
- https://github.com/pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.