WafPackage

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

Example Usage

using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

class MyStack : Stack
{
    public MyStack()
    {
        var owasp = new Cloudflare.WafPackage("owasp", new Cloudflare.WafPackageArgs
        {
            ActionMode = "simulate",
            PackageId = "a25a9a7e9c00afc1fb2e0245519d725b",
            Sensitivity = "medium",
            ZoneId = "ae36f999674d196762efcc5abb06b345",
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudflare.NewWafPackage(ctx, "owasp", &cloudflare.WafPackageArgs{
			ActionMode:  pulumi.String("simulate"),
			PackageId:   pulumi.String("a25a9a7e9c00afc1fb2e0245519d725b"),
			Sensitivity: pulumi.String("medium"),
			ZoneId:      pulumi.String("ae36f999674d196762efcc5abb06b345"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_cloudflare as cloudflare

owasp = cloudflare.WafPackage("owasp",
    action_mode="simulate",
    package_id="a25a9a7e9c00afc1fb2e0245519d725b",
    sensitivity="medium",
    zone_id="ae36f999674d196762efcc5abb06b345")
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const owasp = new cloudflare.WafPackage("owasp", {
    actionMode: "simulate",
    packageId: "a25a9a7e9c00afc1fb2e0245519d725b",
    sensitivity: "medium",
    zoneId: "ae36f999674d196762efcc5abb06b345",
});

Create a WafPackage Resource

new WafPackage(name: string, args: WafPackageArgs, opts?: CustomResourceOptions);
@overload
def WafPackage(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               action_mode: Optional[str] = None,
               package_id: Optional[str] = None,
               sensitivity: Optional[str] = None,
               zone_id: Optional[str] = None)
@overload
def WafPackage(resource_name: str,
               args: WafPackageArgs,
               opts: Optional[ResourceOptions] = None)
func NewWafPackage(ctx *Context, name string, args WafPackageArgs, opts ...ResourceOption) (*WafPackage, error)
public WafPackage(string name, WafPackageArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args WafPackageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args WafPackageArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args WafPackageArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args WafPackageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

WafPackage Resource Properties

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

Inputs

The WafPackage resource accepts the following input properties:

PackageId string
The WAF Package ID.
ZoneId string
The DNS zone ID to apply to.
ActionMode string
The action mode of the package, can be one of [“block”, “challenge”, “simulate”].
Sensitivity string
The sensitivity of the package, can be one of [“high”, “medium”, “low”, “off”].
PackageId string
The WAF Package ID.
ZoneId string
The DNS zone ID to apply to.
ActionMode string
The action mode of the package, can be one of [“block”, “challenge”, “simulate”].
Sensitivity string
The sensitivity of the package, can be one of [“high”, “medium”, “low”, “off”].
packageId string
The WAF Package ID.
zoneId string
The DNS zone ID to apply to.
actionMode string
The action mode of the package, can be one of [“block”, “challenge”, “simulate”].
sensitivity string
The sensitivity of the package, can be one of [“high”, “medium”, “low”, “off”].
package_id str
The WAF Package ID.
zone_id str
The DNS zone ID to apply to.
action_mode str
The action mode of the package, can be one of [“block”, “challenge”, “simulate”].
sensitivity str
The sensitivity of the package, can be one of [“high”, “medium”, “low”, “off”].

Outputs

All input properties are implicitly available as output properties. Additionally, the WafPackage 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 WafPackage Resource

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

ActionMode string
The action mode of the package, can be one of [“block”, “challenge”, “simulate”].
PackageId string
The WAF Package ID.
Sensitivity string
The sensitivity of the package, can be one of [“high”, “medium”, “low”, “off”].
ZoneId string
The DNS zone ID to apply to.
ActionMode string
The action mode of the package, can be one of [“block”, “challenge”, “simulate”].
PackageId string
The WAF Package ID.
Sensitivity string
The sensitivity of the package, can be one of [“high”, “medium”, “low”, “off”].
ZoneId string
The DNS zone ID to apply to.
actionMode string
The action mode of the package, can be one of [“block”, “challenge”, “simulate”].
packageId string
The WAF Package ID.
sensitivity string
The sensitivity of the package, can be one of [“high”, “medium”, “low”, “off”].
zoneId string
The DNS zone ID to apply to.
action_mode str
The action mode of the package, can be one of [“block”, “challenge”, “simulate”].
package_id str
The WAF Package ID.
sensitivity str
The sensitivity of the package, can be one of [“high”, “medium”, “low”, “off”].
zone_id str
The DNS zone ID to apply to.

Import

Packages can be imported using a composite ID formed of zone ID and the WAF Package ID, e.g.

 $ pulumi import cloudflare:index/wafPackage:WafPackage owasp ae36f999674d196762efcc5abb06b345/a25a9a7e9c00afc1fb2e0245519d725b

Package Details

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