1. Registry
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. ZoneTracing
Viewing docs for Cloudflare v6.23.1
published on Wednesday, Oct 21, 2026 by Pulumi
cloudflare logo cloudflare logo
Viewing docs for Cloudflare v6.23.1
published on Wednesday, Oct 21, 2026 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleZoneTracing = new cloudflare.ZoneTracing("example_zone_tracing", {
        zoneId: "zone_id",
        destinations: ["x"],
        enabled: true,
        forwardContext: true,
        persist: true,
        propagationPolicy: "accept",
        samplingRatio: 0,
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_zone_tracing = cloudflare.ZoneTracing("example_zone_tracing",
        zone_id="zone_id",
        destinations=["x"],
        enabled=True,
        forward_context=True,
        persist=True,
        propagation_policy="accept",
        sampling_ratio=float(0))
    
    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.NewZoneTracing(ctx, "example_zone_tracing", &cloudflare.ZoneTracingArgs{
    			ZoneId: pulumi.String("zone_id"),
    			Destinations: pulumi.StringArray{
    				pulumi.String("x"),
    			},
    			Enabled:           pulumi.Bool(true),
    			ForwardContext:    pulumi.Bool(true),
    			Persist:           pulumi.Bool(true),
    			PropagationPolicy: pulumi.String("accept"),
    			SamplingRatio:     pulumi.Float64(0),
    		})
    		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 exampleZoneTracing = new Cloudflare.ZoneTracing("example_zone_tracing", new()
        {
            ZoneId = "zone_id",
            Destinations = new[]
            {
                "x",
            },
            Enabled = true,
            ForwardContext = true,
            Persist = true,
            PropagationPolicy = "accept",
            SamplingRatio = 0.0,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.ZoneTracing;
    import com.pulumi.cloudflare.ZoneTracingArgs;
    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) {
            var exampleZoneTracing = new ZoneTracing("exampleZoneTracing", ZoneTracingArgs.builder()
                .zoneId("zone_id")
                .destinations("x")
                .enabled(true)
                .forwardContext(true)
                .persist(true)
                .propagationPolicy("accept")
                .samplingRatio(0.0)
                .build());
    
        }
    }
    
    resources:
      exampleZoneTracing:
        type: cloudflare:ZoneTracing
        name: example_zone_tracing
        properties:
          zoneId: zone_id
          destinations:
            - x
          enabled: true
          forwardContext: true
          persist: true
          propagationPolicy: accept
          samplingRatio: 0
    
    terraform {
      required_providers {
        cloudflare = {
          source = "pulumi/cloudflare"
        }
      }
    }
    
    resource "cloudflare_zone_tracing" "example_zone_tracing" {
      lifecycle {
        create_before_destroy = true
      }
      zone_id            = "zone_id"
      destinations       = ["x"]
      enabled            = true
      forward_context    = true
      persist            = true
      propagation_policy = "accept"
      sampling_ratio     = 0
    }
    

    Create ZoneTracing Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ZoneTracing(name: string, args: ZoneTracingArgs, opts?: CustomResourceOptions);
    @overload
    def ZoneTracing(resource_name: str,
                    args: ZoneTracingArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def ZoneTracing(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    zone_id: Optional[str] = None,
                    destinations: Optional[Sequence[str]] = None,
                    enabled: Optional[bool] = None,
                    forward_context: Optional[bool] = None,
                    persist: Optional[bool] = None,
                    propagation_policy: Optional[str] = None,
                    sampling_ratio: Optional[float] = None)
    func NewZoneTracing(ctx *Context, name string, args ZoneTracingArgs, opts ...ResourceOption) (*ZoneTracing, error)
    public ZoneTracing(string name, ZoneTracingArgs args, CustomResourceOptions? opts = null)
    public ZoneTracing(String name, ZoneTracingArgs args)
    public ZoneTracing(String name, ZoneTracingArgs args, CustomResourceOptions options)
    
    type: cloudflare:ZoneTracing
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "cloudflare_zone_tracing" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ZoneTracingArgs
    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 ZoneTracingArgs
    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 ZoneTracingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ZoneTracingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ZoneTracingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var zoneTracingResource = new Cloudflare.ZoneTracing("zoneTracingResource", new()
    {
        ZoneId = "string",
        Destinations = new[]
        {
            "string",
        },
        Enabled = false,
        ForwardContext = false,
        Persist = false,
        PropagationPolicy = "string",
        SamplingRatio = 0.0,
    });
    
    example, err := cloudflare.NewZoneTracing(ctx, "zoneTracingResource", &cloudflare.ZoneTracingArgs{
    	ZoneId: pulumi.String("string"),
    	Destinations: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Enabled:           pulumi.Bool(false),
    	ForwardContext:    pulumi.Bool(false),
    	Persist:           pulumi.Bool(false),
    	PropagationPolicy: pulumi.String("string"),
    	SamplingRatio:     pulumi.Float64(0),
    })
    
    resource "cloudflare_zone_tracing" "zoneTracingResource" {
      lifecycle {
        create_before_destroy = true
      }
      zone_id            = "string"
      destinations       = ["string"]
      enabled            = false
      forward_context    = false
      persist            = false
      propagation_policy = "string"
      sampling_ratio     = 0
    }
    
    var zoneTracingResource = new ZoneTracing("zoneTracingResource", ZoneTracingArgs.builder()
        .zoneId("string")
        .destinations("string")
        .enabled(false)
        .forwardContext(false)
        .persist(false)
        .propagationPolicy("string")
        .samplingRatio(0.0)
        .build());
    
    zone_tracing_resource = cloudflare.ZoneTracing("zoneTracingResource",
        zone_id="string",
        destinations=["string"],
        enabled=False,
        forward_context=False,
        persist=False,
        propagation_policy="string",
        sampling_ratio=float(0))
    
    const zoneTracingResource = new cloudflare.ZoneTracing("zoneTracingResource", {
        zoneId: "string",
        destinations: ["string"],
        enabled: false,
        forwardContext: false,
        persist: false,
        propagationPolicy: "string",
        samplingRatio: 0,
    });
    
    type: cloudflare:ZoneTracing
    properties:
        destinations:
            - string
        enabled: false
        forwardContext: false
        persist: false
        propagationPolicy: string
        samplingRatio: 0
        zoneId: string
    

    ZoneTracing Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ZoneTracing resource accepts the following input properties:

    ZoneId string
    Specify the zone ID.
    Destinations List<string>
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    Enabled bool
    Whether Cloudflare Traces is enabled for the zone.
    ForwardContext bool
    Whether trace context is sent externally or across a zone boundary.
    Persist bool
    Whether traces are persisted in Cloudflare.
    PropagationPolicy string
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    SamplingRatio double
    The ratio of requests sampled for tracing, from 0 to 1.
    ZoneId string
    Specify the zone ID.
    Destinations []string
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    Enabled bool
    Whether Cloudflare Traces is enabled for the zone.
    ForwardContext bool
    Whether trace context is sent externally or across a zone boundary.
    Persist bool
    Whether traces are persisted in Cloudflare.
    PropagationPolicy string
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    SamplingRatio float64
    The ratio of requests sampled for tracing, from 0 to 1.
    zone_id string
    Specify the zone ID.
    destinations list(string)
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    enabled bool
    Whether Cloudflare Traces is enabled for the zone.
    forward_context bool
    Whether trace context is sent externally or across a zone boundary.
    persist bool
    Whether traces are persisted in Cloudflare.
    propagation_policy string
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    sampling_ratio number
    The ratio of requests sampled for tracing, from 0 to 1.
    zoneId String
    Specify the zone ID.
    destinations List<String>
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    enabled Boolean
    Whether Cloudflare Traces is enabled for the zone.
    forwardContext Boolean
    Whether trace context is sent externally or across a zone boundary.
    persist Boolean
    Whether traces are persisted in Cloudflare.
    propagationPolicy String
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    samplingRatio Double
    The ratio of requests sampled for tracing, from 0 to 1.
    zoneId string
    Specify the zone ID.
    destinations string[]
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    enabled boolean
    Whether Cloudflare Traces is enabled for the zone.
    forwardContext boolean
    Whether trace context is sent externally or across a zone boundary.
    persist boolean
    Whether traces are persisted in Cloudflare.
    propagationPolicy string
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    samplingRatio number
    The ratio of requests sampled for tracing, from 0 to 1.
    zone_id str
    Specify the zone ID.
    destinations Sequence[str]
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    enabled bool
    Whether Cloudflare Traces is enabled for the zone.
    forward_context bool
    Whether trace context is sent externally or across a zone boundary.
    persist bool
    Whether traces are persisted in Cloudflare.
    propagation_policy str
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    sampling_ratio float
    The ratio of requests sampled for tracing, from 0 to 1.
    zoneId String
    Specify the zone ID.
    destinations List<String>
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    enabled Boolean
    Whether Cloudflare Traces is enabled for the zone.
    forwardContext Boolean
    Whether trace context is sent externally or across a zone boundary.
    persist Boolean
    Whether traces are persisted in Cloudflare.
    propagationPolicy String
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    samplingRatio Number
    The ratio of requests sampled for tracing, from 0 to 1.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ZoneTracing 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 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.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ZoneTracing Resource

    Get an existing ZoneTracing 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?: ZoneTracingState, opts?: CustomResourceOptions): ZoneTracing
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            destinations: Optional[Sequence[str]] = None,
            enabled: Optional[bool] = None,
            forward_context: Optional[bool] = None,
            persist: Optional[bool] = None,
            propagation_policy: Optional[str] = None,
            sampling_ratio: Optional[float] = None,
            zone_id: Optional[str] = None) -> ZoneTracing
    func GetZoneTracing(ctx *Context, name string, id IDInput, state *ZoneTracingState, opts ...ResourceOption) (*ZoneTracing, error)
    public static ZoneTracing Get(string name, Input<string> id, ZoneTracingState? state, CustomResourceOptions? opts = null)
    public static ZoneTracing get(String name, Output<String> id, ZoneTracingState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:ZoneTracing    get:      id: ${id}
    import {
      to = cloudflare_zone_tracing.example
      id = "${id}"
    }
    
    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.
    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:
    Destinations List<string>
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    Enabled bool
    Whether Cloudflare Traces is enabled for the zone.
    ForwardContext bool
    Whether trace context is sent externally or across a zone boundary.
    Persist bool
    Whether traces are persisted in Cloudflare.
    PropagationPolicy string
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    SamplingRatio double
    The ratio of requests sampled for tracing, from 0 to 1.
    ZoneId string
    Specify the zone ID.
    Destinations []string
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    Enabled bool
    Whether Cloudflare Traces is enabled for the zone.
    ForwardContext bool
    Whether trace context is sent externally or across a zone boundary.
    Persist bool
    Whether traces are persisted in Cloudflare.
    PropagationPolicy string
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    SamplingRatio float64
    The ratio of requests sampled for tracing, from 0 to 1.
    ZoneId string
    Specify the zone ID.
    destinations list(string)
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    enabled bool
    Whether Cloudflare Traces is enabled for the zone.
    forward_context bool
    Whether trace context is sent externally or across a zone boundary.
    persist bool
    Whether traces are persisted in Cloudflare.
    propagation_policy string
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    sampling_ratio number
    The ratio of requests sampled for tracing, from 0 to 1.
    zone_id string
    Specify the zone ID.
    destinations List<String>
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    enabled Boolean
    Whether Cloudflare Traces is enabled for the zone.
    forwardContext Boolean
    Whether trace context is sent externally or across a zone boundary.
    persist Boolean
    Whether traces are persisted in Cloudflare.
    propagationPolicy String
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    samplingRatio Double
    The ratio of requests sampled for tracing, from 0 to 1.
    zoneId String
    Specify the zone ID.
    destinations string[]
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    enabled boolean
    Whether Cloudflare Traces is enabled for the zone.
    forwardContext boolean
    Whether trace context is sent externally or across a zone boundary.
    persist boolean
    Whether traces are persisted in Cloudflare.
    propagationPolicy string
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    samplingRatio number
    The ratio of requests sampled for tracing, from 0 to 1.
    zoneId string
    Specify the zone ID.
    destinations Sequence[str]
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    enabled bool
    Whether Cloudflare Traces is enabled for the zone.
    forward_context bool
    Whether trace context is sent externally or across a zone boundary.
    persist bool
    Whether traces are persisted in Cloudflare.
    propagation_policy str
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    sampling_ratio float
    The ratio of requests sampled for tracing, from 0 to 1.
    zone_id str
    Specify the zone ID.
    destinations List<String>
    Up to 100 OpenTelemetry destination identifiers that receive traces.
    enabled Boolean
    Whether Cloudflare Traces is enabled for the zone.
    forwardContext Boolean
    Whether trace context is sent externally or across a zone boundary.
    persist Boolean
    Whether traces are persisted in Cloudflare.
    propagationPolicy String
    When inbound trace context may be continued. Authenticated propagation is not supported yet. Available values: "accept", "authenticated", "reject".
    samplingRatio Number
    The ratio of requests sampled for tracing, from 0 to 1.
    zoneId String
    Specify the zone ID.

    Import

    $ pulumi import cloudflare:index/zoneTracing:ZoneTracing example '<zone_id>'
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo cloudflare logo
    Viewing docs for Cloudflare v6.23.1
    published on Wednesday, Oct 21, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial