Filter
Filter expressions that can be referenced across multiple features, e.g. Firewall Rule. The expression format is similar to Wireshark Display Filter.
Example Usage
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
class MyStack : Stack
{
public MyStack()
{
var wordpress = new Cloudflare.Filter("wordpress", new Cloudflare.FilterArgs
{
Description = "Wordpress break-in attempts that are outside of the office",
Expression = "(http.request.uri.path ~ \".*wp-login.php\" or http.request.uri.path ~ \".*xmlrpc.php\") and ip.src ne 192.0.2.1",
ZoneId = "d41d8cd98f00b204e9800998ecf8427e",
});
}
}
Coming soon!
import pulumi
import pulumi_cloudflare as cloudflare
wordpress = cloudflare.Filter("wordpress",
description="Wordpress break-in attempts that are outside of the office",
expression="(http.request.uri.path ~ \".*wp-login.php\" or http.request.uri.path ~ \".*xmlrpc.php\") and ip.src ne 192.0.2.1",
zone_id="d41d8cd98f00b204e9800998ecf8427e")import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const wordpress = new cloudflare.Filter("wordpress", {
description: "Wordpress break-in attempts that are outside of the office",
expression: "(http.request.uri.path ~ \".*wp-login.php\" or http.request.uri.path ~ \".*xmlrpc.php\") and ip.src ne 192.0.2.1",
zoneId: "d41d8cd98f00b204e9800998ecf8427e",
});Create a Filter Resource
new Filter(name: string, args: FilterArgs, opts?: CustomResourceOptions);def Filter(resource_name, opts=None, description=None, expression=None, paused=None, ref=None, zone_id=None, __props__=None);func NewFilter(ctx *Context, name string, args FilterArgs, opts ...ResourceOption) (*Filter, error)public Filter(string name, FilterArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args FilterArgs
- 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 FilterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FilterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Filter Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Filter resource accepts the following input properties:
- Expression string
The filter expression to be used.
- Zone
Id string The DNS zone to which the Filter should be added.
- Description string
A note that you can use to describe the purpose of the filter.
- Paused bool
Whether this filter is currently paused. Boolean value.
- Ref string
Short reference tag to quickly select related rules.
- Expression string
The filter expression to be used.
- Zone
Id string The DNS zone to which the Filter should be added.
- Description string
A note that you can use to describe the purpose of the filter.
- Paused bool
Whether this filter is currently paused. Boolean value.
- Ref string
Short reference tag to quickly select related rules.
- expression string
The filter expression to be used.
- zone
Id string The DNS zone to which the Filter should be added.
- description string
A note that you can use to describe the purpose of the filter.
- paused boolean
Whether this filter is currently paused. Boolean value.
- ref string
Short reference tag to quickly select related rules.
- expression str
The filter expression to be used.
- zone_
id str The DNS zone to which the Filter should be added.
- description str
A note that you can use to describe the purpose of the filter.
- paused bool
Whether this filter is currently paused. Boolean value.
- ref str
Short reference tag to quickly select related rules.
Outputs
All input properties are implicitly available as output properties. Additionally, the Filter resource produces the following output properties:
Look up an Existing Filter Resource
Get an existing Filter 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?: FilterState, opts?: CustomResourceOptions): Filterstatic get(resource_name, id, opts=None, description=None, expression=None, paused=None, ref=None, zone_id=None, __props__=None);func GetFilter(ctx *Context, name string, id IDInput, state *FilterState, opts ...ResourceOption) (*Filter, error)public static Filter Get(string name, Input<string> id, FilterState? 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:
- Description string
A note that you can use to describe the purpose of the filter.
- Expression string
The filter expression to be used.
- Paused bool
Whether this filter is currently paused. Boolean value.
- Ref string
Short reference tag to quickly select related rules.
- Zone
Id string The DNS zone to which the Filter should be added.
- Description string
A note that you can use to describe the purpose of the filter.
- Expression string
The filter expression to be used.
- Paused bool
Whether this filter is currently paused. Boolean value.
- Ref string
Short reference tag to quickly select related rules.
- Zone
Id string The DNS zone to which the Filter should be added.
- description string
A note that you can use to describe the purpose of the filter.
- expression string
The filter expression to be used.
- paused boolean
Whether this filter is currently paused. Boolean value.
- ref string
Short reference tag to quickly select related rules.
- zone
Id string The DNS zone to which the Filter should be added.
- description str
A note that you can use to describe the purpose of the filter.
- expression str
The filter expression to be used.
- paused bool
Whether this filter is currently paused. Boolean value.
- ref str
Short reference tag to quickly select related rules.
- zone_
id str The DNS zone to which the Filter should be added.
Package Details
- Repository
- https://github.com/pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.