Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

WafGroup

Provides a Cloudflare WAF rule group resource for a particular zone. This can be used to configure firewall behaviour for pre-defined firewall groups.

Example Usage

using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

class MyStack : Stack
{
    public MyStack()
    {
        var honeyPot = new Cloudflare.WafGroup("honeyPot", new Cloudflare.WafGroupArgs
        {
            GroupId = "de677e5818985db1285d0e80225f06e5",
            Mode = "on",
            ZoneId = "ae36f999674d196762efcc5abb06b345",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-cloudflare/sdk/v2/go/cloudflare"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := cloudflare.NewWafGroup(ctx, "honeyPot", &cloudflare.WafGroupArgs{
            GroupId: pulumi.String("de677e5818985db1285d0e80225f06e5"),
            Mode:    pulumi.String("on"),
            ZoneId:  pulumi.String("ae36f999674d196762efcc5abb06b345"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_cloudflare as cloudflare

honey_pot = cloudflare.WafGroup("honeyPot",
    group_id="de677e5818985db1285d0e80225f06e5",
    mode="on",
    zone_id="ae36f999674d196762efcc5abb06b345")
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const honeyPot = new cloudflare.WafGroup("honey_pot", {
    groupId: "de677e5818985db1285d0e80225f06e5",
    mode: "on",
    zoneId: "ae36f999674d196762efcc5abb06b345",
});

Create a WafGroup Resource

new WafGroup(name: string, args: WafGroupArgs, opts?: CustomResourceOptions);
def WafGroup(resource_name: str, opts: Optional[ResourceOptions] = None, group_id: Optional[str] = None, mode: Optional[str] = None, package_id: Optional[str] = None, zone_id: Optional[str] = None)
func NewWafGroup(ctx *Context, name string, args WafGroupArgs, opts ...ResourceOption) (*WafGroup, error)
public WafGroup(string name, WafGroupArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args WafGroupArgs
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 WafGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args WafGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

WafGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The WafGroup resource accepts the following input properties:

GroupId string

The WAF Rule Group ID.

ZoneId string

The DNS zone ID to apply to.

Mode string

The mode of the group, can be one of [“on”, “off”].

PackageId string

The ID of the WAF Rule Package that contains the group.

GroupId string

The WAF Rule Group ID.

ZoneId string

The DNS zone ID to apply to.

Mode string

The mode of the group, can be one of [“on”, “off”].

PackageId string

The ID of the WAF Rule Package that contains the group.

groupId string

The WAF Rule Group ID.

zoneId string

The DNS zone ID to apply to.

mode string

The mode of the group, can be one of [“on”, “off”].

packageId string

The ID of the WAF Rule Package that contains the group.

group_id str

The WAF Rule Group ID.

zone_id str

The DNS zone ID to apply to.

mode str

The mode of the group, can be one of [“on”, “off”].

package_id str

The ID of the WAF Rule Package that contains the group.

Outputs

All input properties are implicitly available as output properties. Additionally, the WafGroup resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing WafGroup Resource

Get an existing WafGroup 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?: WafGroupState, opts?: CustomResourceOptions): WafGroup
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, group_id: Optional[str] = None, mode: Optional[str] = None, package_id: Optional[str] = None, zone_id: Optional[str] = None) -> WafGroup
func GetWafGroup(ctx *Context, name string, id IDInput, state *WafGroupState, opts ...ResourceOption) (*WafGroup, error)
public static WafGroup Get(string name, Input<string> id, WafGroupState? 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:

GroupId string

The WAF Rule Group ID.

Mode string

The mode of the group, can be one of [“on”, “off”].

PackageId string

The ID of the WAF Rule Package that contains the group.

ZoneId string

The DNS zone ID to apply to.

GroupId string

The WAF Rule Group ID.

Mode string

The mode of the group, can be one of [“on”, “off”].

PackageId string

The ID of the WAF Rule Package that contains the group.

ZoneId string

The DNS zone ID to apply to.

groupId string

The WAF Rule Group ID.

mode string

The mode of the group, can be one of [“on”, “off”].

packageId string

The ID of the WAF Rule Package that contains the group.

zoneId string

The DNS zone ID to apply to.

group_id str

The WAF Rule Group ID.

mode str

The mode of the group, can be one of [“on”, “off”].

package_id str

The ID of the WAF Rule Package that contains the group.

zone_id str

The DNS zone ID to apply to.

Import

WAF Rule Groups can be imported using a composite ID formed of zone ID and the WAF Rule Group ID, e.g.

 $ pulumi import cloudflare:index/wafGroup:WafGroup honey_pot ae36f999674d196762efcc5abb06b345/de677e5818985db1285d0e80225f06e5

Package Details

Repository
https://github.com/pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.