Viewing docs for Cloudflare v6.20.0
published on Tuesday, Aug 25, 2026 by Pulumi
published on Tuesday, Aug 25, 2026 by Pulumi
Viewing docs for Cloudflare v6.20.0
published on Tuesday, Aug 25, 2026 by Pulumi
published on Tuesday, Aug 25, 2026 by Pulumi
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const examplePrecursor = cloudflare.getPrecursor({
zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_precursor = cloudflare.get_precursor(zone_id="023e105f4ecef8ad9ca31a8372d0c353")
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.GetPrecursor(ctx, &cloudflare.LookupPrecursorArgs{
ZoneId: "023e105f4ecef8ad9ca31a8372d0c353",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var examplePrecursor = Cloudflare.GetPrecursor.Invoke(new()
{
ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
});
});
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.GetPrecursorArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 examplePrecursor = CloudflareFunctions.getPrecursor(GetPrecursorArgs.builder()
.zoneId("023e105f4ecef8ad9ca31a8372d0c353")
.build());
}
}
variables:
examplePrecursor:
fn::invoke:
function: cloudflare:getPrecursor
arguments:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
pulumi {
required_providers {
cloudflare = {
source = "pulumi/cloudflare"
}
}
}
data "cloudflare_getprecursor" "examplePrecursor" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}
Using getPrecursor
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 getPrecursor(args: GetPrecursorArgs, opts?: InvokeOptions): Promise<GetPrecursorResult>
function getPrecursorOutput(args: GetPrecursorOutputArgs, opts?: InvokeOutputOptions): Output<GetPrecursorResult>def get_precursor(zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPrecursorResult
def get_precursor_output(zone_id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetPrecursorResult]func LookupPrecursor(ctx *Context, args *LookupPrecursorArgs, opts ...InvokeOption) (*LookupPrecursorResult, error)
func LookupPrecursorOutput(ctx *Context, args *LookupPrecursorOutputArgs, opts ...InvokeOption) LookupPrecursorResultOutput> Note: This function is named LookupPrecursor in the Go SDK.
public static class GetPrecursor
{
public static Task<GetPrecursorResult> InvokeAsync(GetPrecursorArgs args, InvokeOptions? opts = null)
public static Output<GetPrecursorResult> Invoke(GetPrecursorInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetPrecursorResult> Invoke(GetPrecursorInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetPrecursorResult> getPrecursor(GetPrecursorArgs args, InvokeOptions options)
public static Output<GetPrecursorResult> getPrecursor(GetPrecursorArgs args, InvokeOptions options)
public static Output<GetPrecursorResult> getPrecursor(GetPrecursorArgs args, InvokeOutputOptions options)
fn::invoke:
function: cloudflare:index/getPrecursor:getPrecursor
arguments:
# arguments dictionarydata "cloudflare_get_precursor" "name" {
# arguments
}The following arguments are supported:
- Zone
Id string - Identifier.
- Zone
Id string - Identifier.
- zone_
id string - Identifier.
- zone
Id String - Identifier.
- zone
Id string - Identifier.
- zone_
id str - Identifier.
- zone
Id String - Identifier.
getPrecursor Result
The following output properties are available:
- Default
Mode string - The zone-level Precursor enforcement mode applied to requests that do not match a more specific enforcement rule. Available values: "off", "min-friction", "max-security".
- Enforcement
Rules List<GetPrecursor Enforcement Rule> - The ordered list of enforcement rules for the zone.
- Id string
- Identifier.
- Zone
Id string - Identifier.
- Default
Mode string - The zone-level Precursor enforcement mode applied to requests that do not match a more specific enforcement rule. Available values: "off", "min-friction", "max-security".
- Enforcement
Rules []GetPrecursor Enforcement Rule - The ordered list of enforcement rules for the zone.
- Id string
- Identifier.
- Zone
Id string - Identifier.
- default_
mode string - The zone-level Precursor enforcement mode applied to requests that do not match a more specific enforcement rule. Available values: "off", "min-friction", "max-security".
- enforcement_
rules list(object) - The ordered list of enforcement rules for the zone.
- id string
- Identifier.
- zone_
id string - Identifier.
- default
Mode String - The zone-level Precursor enforcement mode applied to requests that do not match a more specific enforcement rule. Available values: "off", "min-friction", "max-security".
- enforcement
Rules List<GetPrecursor Enforcement Rule> - The ordered list of enforcement rules for the zone.
- id String
- Identifier.
- zone
Id String - Identifier.
- default
Mode string - The zone-level Precursor enforcement mode applied to requests that do not match a more specific enforcement rule. Available values: "off", "min-friction", "max-security".
- enforcement
Rules GetPrecursor Enforcement Rule[] - The ordered list of enforcement rules for the zone.
- id string
- Identifier.
- zone
Id string - Identifier.
- default_
mode str - The zone-level Precursor enforcement mode applied to requests that do not match a more specific enforcement rule. Available values: "off", "min-friction", "max-security".
- enforcement_
rules Sequence[GetPrecursor Enforcement Rule] - The ordered list of enforcement rules for the zone.
- id str
- Identifier.
- zone_
id str - Identifier.
- default
Mode String - The zone-level Precursor enforcement mode applied to requests that do not match a more specific enforcement rule. Available values: "off", "min-friction", "max-security".
- enforcement
Rules List<Property Map> - The ordered list of enforcement rules for the zone.
- id String
- Identifier.
- zone
Id String - Identifier.
Supporting Types
GetPrecursorEnforcementRule
- Description string
- An informative description of the rule.
- Enabled bool
- Whether the rule is active.
- Expression string
- The filter expression that determines which requests the rule matches.
- Id string
- The read-only identifier that Cloudflare assigns to the rule.
- Mode string
- The override mode Precursor applies to requests matching an enforcement
rule. Unlike
defaultMode, this cannot beoff. Available values: "min-friction", "max-security".
- Description string
- An informative description of the rule.
- Enabled bool
- Whether the rule is active.
- Expression string
- The filter expression that determines which requests the rule matches.
- Id string
- The read-only identifier that Cloudflare assigns to the rule.
- Mode string
- The override mode Precursor applies to requests matching an enforcement
rule. Unlike
defaultMode, this cannot beoff. Available values: "min-friction", "max-security".
- description string
- An informative description of the rule.
- enabled bool
- Whether the rule is active.
- expression string
- The filter expression that determines which requests the rule matches.
- id string
- The read-only identifier that Cloudflare assigns to the rule.
- mode string
- The override mode Precursor applies to requests matching an enforcement
rule. Unlike
defaultMode, this cannot beoff. Available values: "min-friction", "max-security".
- description String
- An informative description of the rule.
- enabled Boolean
- Whether the rule is active.
- expression String
- The filter expression that determines which requests the rule matches.
- id String
- The read-only identifier that Cloudflare assigns to the rule.
- mode String
- The override mode Precursor applies to requests matching an enforcement
rule. Unlike
defaultMode, this cannot beoff. Available values: "min-friction", "max-security".
- description string
- An informative description of the rule.
- enabled boolean
- Whether the rule is active.
- expression string
- The filter expression that determines which requests the rule matches.
- id string
- The read-only identifier that Cloudflare assigns to the rule.
- mode string
- The override mode Precursor applies to requests matching an enforcement
rule. Unlike
defaultMode, this cannot beoff. Available values: "min-friction", "max-security".
- description str
- An informative description of the rule.
- enabled bool
- Whether the rule is active.
- expression str
- The filter expression that determines which requests the rule matches.
- id str
- The read-only identifier that Cloudflare assigns to the rule.
- mode str
- The override mode Precursor applies to requests matching an enforcement
rule. Unlike
defaultMode, this cannot beoff. Available values: "min-friction", "max-security".
- description String
- An informative description of the rule.
- enabled Boolean
- Whether the rule is active.
- expression String
- The filter expression that determines which requests the rule matches.
- id String
- The read-only identifier that Cloudflare assigns to the rule.
- mode String
- The override mode Precursor applies to requests matching an enforcement
rule. Unlike
defaultMode, this cannot beoff. Available values: "min-friction", "max-security".
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 v6.20.0
published on Tuesday, Aug 25, 2026 by Pulumi
published on Tuesday, Aug 25, 2026 by Pulumi