Viewing docs for Cloudflare v4.16.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Viewing docs for Cloudflare v4.16.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this data source to look up WAF Rule Groups.
Example Usage
The example below matches all WAF Rule Groups that contain the word
using System.Collections.Generic;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var test = Cloudflare.GetWafGroups.Invoke(new()
{
Filter = new Cloudflare.Inputs.GetWafGroupsFilterInputArgs
{
Name = ".*example.*",
Mode = "on",
},
});
return new Dictionary<string, object?>
{
["wafGroups"] = test.Apply(getWafGroupsResult => getWafGroupsResult.Groups),
};
});
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v4/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := cloudflare.GetWafGroups(ctx, &cloudflare.GetWafGroupsArgs{
Filter: cloudflare.GetWafGroupsFilter{
Name: pulumi.StringRef(".*example.*"),
Mode: pulumi.StringRef("on"),
},
}, nil)
if err != nil {
return err
}
ctx.Export("wafGroups", test.Groups)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CloudflareFunctions;
import com.pulumi.cloudflare.inputs.GetWafGroupsArgs;
import com.pulumi.cloudflare.inputs.GetWafGroupsFilterArgs;
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) {
final var test = CloudflareFunctions.getWafGroups(GetWafGroupsArgs.builder()
.filter(GetWafGroupsFilterArgs.builder()
.name(".*example.*")
.mode("on")
.build())
.build());
ctx.export("wafGroups", test.applyValue(getWafGroupsResult -> getWafGroupsResult.groups()));
}
}
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const test = cloudflare.getWafGroups({
filter: {
name: ".*example.*",
mode: "on",
},
});
export const wafGroups = test.then(test => test.groups);
import pulumi
import pulumi_cloudflare as cloudflare
test = cloudflare.get_waf_groups(filter=cloudflare.GetWafGroupsFilterArgs(
name=".*example.*",
mode="on",
))
pulumi.export("wafGroups", test.groups)
variables:
test:
fn::invoke:
Function: cloudflare:getWafGroups
Arguments:
filter:
name: .*example.*
mode: on
outputs:
wafGroups: ${test.groups}
Using getWafGroups
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getWafGroups(args: GetWafGroupsArgs, opts?: InvokeOptions): Promise<GetWafGroupsResult>
function getWafGroupsOutput(args: GetWafGroupsOutputArgs, opts?: InvokeOptions): Output<GetWafGroupsResult>def get_waf_groups(filter: Optional[GetWafGroupsFilter] = None,
package_id: Optional[str] = None,
zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetWafGroupsResult
def get_waf_groups_output(filter: Optional[pulumi.Input[GetWafGroupsFilterArgs]] = None,
package_id: Optional[pulumi.Input[str]] = None,
zone_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetWafGroupsResult]func GetWafGroups(ctx *Context, args *GetWafGroupsArgs, opts ...InvokeOption) (*GetWafGroupsResult, error)
func GetWafGroupsOutput(ctx *Context, args *GetWafGroupsOutputArgs, opts ...InvokeOption) GetWafGroupsResultOutput> Note: This function is named GetWafGroups in the Go SDK.
public static class GetWafGroups
{
public static Task<GetWafGroupsResult> InvokeAsync(GetWafGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetWafGroupsResult> Invoke(GetWafGroupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetWafGroupsResult> getWafGroups(GetWafGroupsArgs args, InvokeOptions options)
public static Output<GetWafGroupsResult> getWafGroups(GetWafGroupsArgs args, InvokeOptions options)
fn::invoke:
function: cloudflare:index/getWafGroups:getWafGroups
arguments:
# arguments dictionaryThe following arguments are supported:
- Zone
Id string - The ID of the DNS zone in which to search for the WAF Rule Groups.
- Filter
Get
Waf Groups Filter - One or more values used to look up WAF Rule Groups. If more than one value is given all values must match in order to be included, see below for full list.
- Package
Id string - The ID of the WAF Rule Package in which to search for the WAF Rule Groups.
- Zone
Id string - The ID of the DNS zone in which to search for the WAF Rule Groups.
- Filter
Get
Waf Groups Filter - One or more values used to look up WAF Rule Groups. If more than one value is given all values must match in order to be included, see below for full list.
- Package
Id string - The ID of the WAF Rule Package in which to search for the WAF Rule Groups.
- zone
Id String - The ID of the DNS zone in which to search for the WAF Rule Groups.
- filter
Get
Waf Groups Filter - One or more values used to look up WAF Rule Groups. If more than one value is given all values must match in order to be included, see below for full list.
- package
Id String - The ID of the WAF Rule Package in which to search for the WAF Rule Groups.
- zone
Id string - The ID of the DNS zone in which to search for the WAF Rule Groups.
- filter
Get
Waf Groups Filter - One or more values used to look up WAF Rule Groups. If more than one value is given all values must match in order to be included, see below for full list.
- package
Id string - The ID of the WAF Rule Package in which to search for the WAF Rule Groups.
- zone_
id str - The ID of the DNS zone in which to search for the WAF Rule Groups.
- filter
Get
Waf Groups Filter - One or more values used to look up WAF Rule Groups. If more than one value is given all values must match in order to be included, see below for full list.
- package_
id str - The ID of the WAF Rule Package in which to search for the WAF Rule Groups.
- zone
Id String - The ID of the DNS zone in which to search for the WAF Rule Groups.
- filter Property Map
- One or more values used to look up WAF Rule Groups. If more than one value is given all values must match in order to be included, see below for full list.
- package
Id String - The ID of the WAF Rule Package in which to search for the WAF Rule Groups.
getWafGroups Result
The following output properties are available:
- Groups
List<Get
Waf Groups Group> - A map of WAF Rule Groups details. Full list below:
- Id string
- The provider-assigned unique ID for this managed resource.
- Zone
Id string - Filter
Get
Waf Groups Filter - Package
Id string - The ID of the WAF Rule Package that contains the WAF Rule Group
- Groups
[]Get
Waf Groups Group - A map of WAF Rule Groups details. Full list below:
- Id string
- The provider-assigned unique ID for this managed resource.
- Zone
Id string - Filter
Get
Waf Groups Filter - Package
Id string - The ID of the WAF Rule Package that contains the WAF Rule Group
- groups
List<Get
Waf Groups Group> - A map of WAF Rule Groups details. Full list below:
- id String
- The provider-assigned unique ID for this managed resource.
- zone
Id String - filter
Get
Waf Groups Filter - package
Id String - The ID of the WAF Rule Package that contains the WAF Rule Group
- groups
Get
Waf Groups Group[] - A map of WAF Rule Groups details. Full list below:
- id string
- The provider-assigned unique ID for this managed resource.
- zone
Id string - filter
Get
Waf Groups Filter - package
Id string - The ID of the WAF Rule Package that contains the WAF Rule Group
- groups
Sequence[Get
Waf Groups Group] - A map of WAF Rule Groups details. Full list below:
- id str
- The provider-assigned unique ID for this managed resource.
- zone_
id str - filter
Get
Waf Groups Filter - package_
id str - The ID of the WAF Rule Package that contains the WAF Rule Group
- groups List<Property Map>
- A map of WAF Rule Groups details. Full list below:
- id String
- The provider-assigned unique ID for this managed resource.
- zone
Id String - filter Property Map
- package
Id String - The ID of the WAF Rule Package that contains the WAF Rule Group
Supporting Types
GetWafGroupsFilter
GetWafGroupsGroup
- Description string
- The WAF Rule Group description
- Id string
- The WAF Rule Group ID
- Mode string
- Mode of the WAF Rule Groups to lookup. Valid values: on and off.
- Modified
Rules intCount - The number of modified rules in the WAF Rule Group
- Name string
- A regular expression matching the name of the WAF Rule Groups to lookup.
- Package
Id string - The ID of the WAF Rule Package in which to search for the WAF Rule Groups.
- Rules
Count int - The number of rules in the WAF Rule Group
- Description string
- The WAF Rule Group description
- Id string
- The WAF Rule Group ID
- Mode string
- Mode of the WAF Rule Groups to lookup. Valid values: on and off.
- Modified
Rules intCount - The number of modified rules in the WAF Rule Group
- Name string
- A regular expression matching the name of the WAF Rule Groups to lookup.
- Package
Id string - The ID of the WAF Rule Package in which to search for the WAF Rule Groups.
- Rules
Count int - The number of rules in the WAF Rule Group
- description String
- The WAF Rule Group description
- id String
- The WAF Rule Group ID
- mode String
- Mode of the WAF Rule Groups to lookup. Valid values: on and off.
- modified
Rules IntegerCount - The number of modified rules in the WAF Rule Group
- name String
- A regular expression matching the name of the WAF Rule Groups to lookup.
- package
Id String - The ID of the WAF Rule Package in which to search for the WAF Rule Groups.
- rules
Count Integer - The number of rules in the WAF Rule Group
- description string
- The WAF Rule Group description
- id string
- The WAF Rule Group ID
- mode string
- Mode of the WAF Rule Groups to lookup. Valid values: on and off.
- modified
Rules numberCount - The number of modified rules in the WAF Rule Group
- name string
- A regular expression matching the name of the WAF Rule Groups to lookup.
- package
Id string - The ID of the WAF Rule Package in which to search for the WAF Rule Groups.
- rules
Count number - The number of rules in the WAF Rule Group
- description str
- The WAF Rule Group description
- id str
- The WAF Rule Group ID
- mode str
- Mode of the WAF Rule Groups to lookup. Valid values: on and off.
- modified_
rules_ intcount - The number of modified rules in the WAF Rule Group
- name str
- A regular expression matching the name of the WAF Rule Groups to lookup.
- package_
id str - The ID of the WAF Rule Package in which to search for the WAF Rule Groups.
- rules_
count int - The number of rules in the WAF Rule Group
- description String
- The WAF Rule Group description
- id String
- The WAF Rule Group ID
- mode String
- Mode of the WAF Rule Groups to lookup. Valid values: on and off.
- modified
Rules NumberCount - The number of modified rules in the WAF Rule Group
- name String
- A regular expression matching the name of the WAF Rule Groups to lookup.
- package
Id String - The ID of the WAF Rule Package in which to search for the WAF Rule Groups.
- rules
Count Number - The number of rules in the WAF Rule Group
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.
Viewing docs for Cloudflare v4.16.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
