1. Registry
  2. Packages
  3. Vercel Provider
  4. API Docs
  5. LogDrain
Viewing docs for Vercel v5.27.0
published on Sunday, Nov 15, 2026 by Pulumiverse
vercel logo vercel logo
Viewing docs for Vercel v5.27.0
published on Sunday, Nov 15, 2026 by Pulumiverse

    Provides a Configurable Log Drain resource.

    For Log Drain integrations, please see the Integration Log Drain docs.

    Log Drains collect all of your logs using a service specializing in storing app logs.

    Teams on Pro and Enterprise plans can subscribe to log drains that are generic and configurable from the Vercel dashboard without creating an integration. This allows you to use a HTTP service to receive logs through Vercel’s log drains.

    Note: Write-Only argument secret_wo is available in place of secret to keep the signing secret out of Terraform state. Use an ephemeral input to also keep the value out of saved plan configuration. Write-Only arguments require HashiCorp Terraform 1.11.0 or later.

    Only Pro and Enterprise teams can create Configurable Log Drains.

    Create LogDrain Resource

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

    Constructor syntax

    new LogDrain(name: string, args: LogDrainArgs, opts?: CustomResourceOptions);
    @overload
    def LogDrain(resource_name: str,
                 args: LogDrainArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def LogDrain(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 delivery_format: Optional[str] = None,
                 endpoint: Optional[str] = None,
                 environments: Optional[Sequence[str]] = None,
                 sources: Optional[Sequence[str]] = None,
                 sampling_rate: Optional[float] = None,
                 project_ids: Optional[Sequence[str]] = None,
                 name: Optional[str] = None,
                 sampling_rules: Optional[Sequence[LogDrainSamplingRuleArgs]] = None,
                 secret: Optional[str] = None,
                 secret_wo: Optional[str] = None,
                 secret_wo_version: Optional[int] = None,
                 headers: Optional[Mapping[str, str]] = None,
                 team_id: Optional[str] = None)
    func NewLogDrain(ctx *Context, name string, args LogDrainArgs, opts ...ResourceOption) (*LogDrain, error)
    public LogDrain(string name, LogDrainArgs args, CustomResourceOptions? opts = null)
    public LogDrain(String name, LogDrainArgs args)
    public LogDrain(String name, LogDrainArgs args, CustomResourceOptions options)
    
    type: vercel:LogDrain
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "vercel_log_drain" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args LogDrainArgs
    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 LogDrainArgs
    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 LogDrainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LogDrainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LogDrainArgs
    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 logDrainResource = new Vercel.LogDrain("logDrainResource", new()
    {
        DeliveryFormat = "string",
        Endpoint = "string",
        Environments = new[]
        {
            "string",
        },
        Sources = new[]
        {
            "string",
        },
        SamplingRate = 0.0,
        ProjectIds = new[]
        {
            "string",
        },
        Name = "string",
        SamplingRules = new[]
        {
            new Vercel.Inputs.LogDrainSamplingRuleArgs
            {
                Rate = 0.0,
                Environment = "string",
                RequestPath = "string",
            },
        },
        Secret = "string",
        SecretWo = "string",
        SecretWoVersion = 0,
        Headers = 
        {
            { "string", "string" },
        },
        TeamId = "string",
    });
    
    example, err := vercel.NewLogDrain(ctx, "logDrainResource", &vercel.LogDrainArgs{
    	DeliveryFormat: pulumi.String("string"),
    	Endpoint:       pulumi.String("string"),
    	Environments: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Sources: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SamplingRate: pulumi.Float64(0),
    	ProjectIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    	SamplingRules: vercel.LogDrainSamplingRuleArray{
    		&vercel.LogDrainSamplingRuleArgs{
    			Rate:        pulumi.Float64(0),
    			Environment: pulumi.String("string"),
    			RequestPath: pulumi.String("string"),
    		},
    	},
    	Secret:          pulumi.String("string"),
    	SecretWo:        pulumi.String("string"),
    	SecretWoVersion: pulumi.Int(0),
    	Headers: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TeamId: pulumi.String("string"),
    })
    
    resource "vercel_log_drain" "logDrainResource" {
      lifecycle {
        create_before_destroy = true
      }
      delivery_format = "string"
      endpoint        = "string"
      environments    = ["string"]
      sources         = ["string"]
      sampling_rate   = 0
      project_ids     = ["string"]
      name            = "string"
      sampling_rules {
        rate         = 0
        environment  = "string"
        request_path = "string"
      }
      secret            = "string"
      secret_wo         = "string"
      secret_wo_version = 0
      headers = {
        "string" = "string"
      }
      team_id = "string"
    }
    
    var logDrainResource = new LogDrain("logDrainResource", LogDrainArgs.builder()
        .deliveryFormat("string")
        .endpoint("string")
        .environments("string")
        .sources("string")
        .samplingRate(0.0)
        .projectIds("string")
        .name("string")
        .samplingRules(LogDrainSamplingRuleArgs.builder()
            .rate(0.0)
            .environment("string")
            .requestPath("string")
            .build())
        .secret("string")
        .secretWo("string")
        .secretWoVersion(0)
        .headers(Map.of("string", "string"))
        .teamId("string")
        .build());
    
    log_drain_resource = vercel.LogDrain("logDrainResource",
        delivery_format="string",
        endpoint="string",
        environments=["string"],
        sources=["string"],
        sampling_rate=float(0),
        project_ids=["string"],
        name="string",
        sampling_rules=[{
            "rate": float(0),
            "environment": "string",
            "request_path": "string",
        }],
        secret="string",
        secret_wo="string",
        secret_wo_version=0,
        headers={
            "string": "string",
        },
        team_id="string")
    
    const logDrainResource = new vercel.LogDrain("logDrainResource", {
        deliveryFormat: "string",
        endpoint: "string",
        environments: ["string"],
        sources: ["string"],
        samplingRate: 0,
        projectIds: ["string"],
        name: "string",
        samplingRules: [{
            rate: 0,
            environment: "string",
            requestPath: "string",
        }],
        secret: "string",
        secretWo: "string",
        secretWoVersion: 0,
        headers: {
            string: "string",
        },
        teamId: "string",
    });
    
    type: vercel:LogDrain
    properties:
        deliveryFormat: string
        endpoint: string
        environments:
            - string
        headers:
            string: string
        name: string
        projectIds:
            - string
        samplingRate: 0
        samplingRules:
            - environment: string
              rate: 0
              requestPath: string
        secret: string
        secretWo: string
        secretWoVersion: 0
        sources:
            - string
        teamId: string
    

    LogDrain 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 LogDrain resource accepts the following input properties:

    DeliveryFormat string
    The format log data should be delivered in. Can be json or ndjson.
    Endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    Environments List<string>
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    Sources List<string>
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    Headers Dictionary<string, string>
    Custom headers to include in requests to the log drain endpoint.
    Name string
    A human-readable name for the log drain.
    ProjectIds List<string>
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    SamplingRate double
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    SamplingRules List<Pulumiverse.Vercel.Inputs.LogDrainSamplingRule>
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    Secret string
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    SecretWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    SecretWoVersion int
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    TeamId string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    DeliveryFormat string
    The format log data should be delivered in. Can be json or ndjson.
    Endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    Environments []string
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    Sources []string
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    Headers map[string]string
    Custom headers to include in requests to the log drain endpoint.
    Name string
    A human-readable name for the log drain.
    ProjectIds []string
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    SamplingRate float64
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    SamplingRules []LogDrainSamplingRuleArgs
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    Secret string
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    SecretWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    SecretWoVersion int
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    TeamId string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    delivery_format string
    The format log data should be delivered in. Can be json or ndjson.
    endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments list(string)
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    sources list(string)
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    headers map(string)
    Custom headers to include in requests to the log drain endpoint.
    name string
    A human-readable name for the log drain.
    project_ids list(string)
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    sampling_rate number
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    sampling_rules list(object)
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    secret string
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    secret_wo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    secret_wo_version number
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    team_id string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    deliveryFormat String
    The format log data should be delivered in. Can be json or ndjson.
    endpoint String
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments List<String>
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    sources List<String>
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    headers Map<String,String>
    Custom headers to include in requests to the log drain endpoint.
    name String
    A human-readable name for the log drain.
    projectIds List<String>
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    samplingRate Double
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    samplingRules List<LogDrainSamplingRule>
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    secret String
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    secretWo String
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    secretWoVersion Integer
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    teamId String
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    deliveryFormat string
    The format log data should be delivered in. Can be json or ndjson.
    endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments string[]
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    sources string[]
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    headers {[key: string]: string}
    Custom headers to include in requests to the log drain endpoint.
    name string
    A human-readable name for the log drain.
    projectIds string[]
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    samplingRate number
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    samplingRules LogDrainSamplingRule[]
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    secret string
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    secretWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    secretWoVersion number
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    teamId string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    delivery_format str
    The format log data should be delivered in. Can be json or ndjson.
    endpoint str
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments Sequence[str]
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    sources Sequence[str]
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    headers Mapping[str, str]
    Custom headers to include in requests to the log drain endpoint.
    name str
    A human-readable name for the log drain.
    project_ids Sequence[str]
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    sampling_rate float
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    sampling_rules Sequence[LogDrainSamplingRuleArgs]
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    secret str
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    secret_wo str
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    secret_wo_version int
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    team_id str
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    deliveryFormat String
    The format log data should be delivered in. Can be json or ndjson.
    endpoint String
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments List<String>
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    sources List<String>
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    headers Map<String>
    Custom headers to include in requests to the log drain endpoint.
    name String
    A human-readable name for the log drain.
    projectIds List<String>
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    samplingRate Number
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    samplingRules List<Property Map>
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    secret String
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    secretWo String
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    secretWoVersion Number
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    teamId String
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.

    Outputs

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

    Get an existing LogDrain 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?: LogDrainState, opts?: CustomResourceOptions): LogDrain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            delivery_format: Optional[str] = None,
            endpoint: Optional[str] = None,
            environments: Optional[Sequence[str]] = None,
            headers: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            project_ids: Optional[Sequence[str]] = None,
            sampling_rate: Optional[float] = None,
            sampling_rules: Optional[Sequence[LogDrainSamplingRuleArgs]] = None,
            secret: Optional[str] = None,
            secret_wo: Optional[str] = None,
            secret_wo_version: Optional[int] = None,
            sources: Optional[Sequence[str]] = None,
            team_id: Optional[str] = None) -> LogDrain
    func GetLogDrain(ctx *Context, name string, id IDInput, state *LogDrainState, opts ...ResourceOption) (*LogDrain, error)
    public static LogDrain Get(string name, Input<string> id, LogDrainState? state, CustomResourceOptions? opts = null)
    public static LogDrain get(String name, Output<String> id, LogDrainState state, CustomResourceOptions options)
    resources:  existingLogDrain:    type: vercel:LogDrain    get:      id: ${id}
    import {
      to = vercel_log_drain.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    state LogDrainState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state LogDrainState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    state LogDrainState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    state LogDrainState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    options CustomResourceOptions
    Bag of options to control resource's behavior.
    The following state arguments are supported:
    DeliveryFormat string
    The format log data should be delivered in. Can be json or ndjson.
    Endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    Environments List<string>
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    Headers Dictionary<string, string>
    Custom headers to include in requests to the log drain endpoint.
    Name string
    A human-readable name for the log drain.
    ProjectIds List<string>
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    SamplingRate double
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    SamplingRules List<Pulumiverse.Vercel.Inputs.LogDrainSamplingRule>
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    Secret string
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    SecretWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    SecretWoVersion int
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    Sources List<string>
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    TeamId string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    DeliveryFormat string
    The format log data should be delivered in. Can be json or ndjson.
    Endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    Environments []string
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    Headers map[string]string
    Custom headers to include in requests to the log drain endpoint.
    Name string
    A human-readable name for the log drain.
    ProjectIds []string
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    SamplingRate float64
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    SamplingRules []LogDrainSamplingRuleArgs
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    Secret string
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    SecretWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    SecretWoVersion int
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    Sources []string
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    TeamId string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    delivery_format string
    The format log data should be delivered in. Can be json or ndjson.
    endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments list(string)
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    headers map(string)
    Custom headers to include in requests to the log drain endpoint.
    name string
    A human-readable name for the log drain.
    project_ids list(string)
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    sampling_rate number
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    sampling_rules list(object)
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    secret string
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    secret_wo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    secret_wo_version number
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    sources list(string)
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    team_id string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    deliveryFormat String
    The format log data should be delivered in. Can be json or ndjson.
    endpoint String
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments List<String>
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    headers Map<String,String>
    Custom headers to include in requests to the log drain endpoint.
    name String
    A human-readable name for the log drain.
    projectIds List<String>
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    samplingRate Double
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    samplingRules List<LogDrainSamplingRule>
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    secret String
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    secretWo String
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    secretWoVersion Integer
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    sources List<String>
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    teamId String
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    deliveryFormat string
    The format log data should be delivered in. Can be json or ndjson.
    endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments string[]
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    headers {[key: string]: string}
    Custom headers to include in requests to the log drain endpoint.
    name string
    A human-readable name for the log drain.
    projectIds string[]
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    samplingRate number
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    samplingRules LogDrainSamplingRule[]
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    secret string
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    secretWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    secretWoVersion number
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    sources string[]
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    teamId string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    delivery_format str
    The format log data should be delivered in. Can be json or ndjson.
    endpoint str
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments Sequence[str]
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    headers Mapping[str, str]
    Custom headers to include in requests to the log drain endpoint.
    name str
    A human-readable name for the log drain.
    project_ids Sequence[str]
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    sampling_rate float
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    sampling_rules Sequence[LogDrainSamplingRuleArgs]
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    secret str
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    secret_wo str
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    secret_wo_version int
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    sources Sequence[str]
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    team_id str
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    deliveryFormat String
    The format log data should be delivered in. Can be json or ndjson.
    endpoint String
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments List<String>
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    headers Map<String>
    Custom headers to include in requests to the log drain endpoint.
    name String
    A human-readable name for the log drain.
    projectIds List<String>
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    samplingRate Number
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent. Conflicts with sampling_rules.
    samplingRules List<Property Map>
    Ordered sampling rules for logs sent to this drain. The first matching rule applies; logs matching no rule are dropped. Conflicts with sampling_rate.
    secret String
    A custom secret to be used for signing log events. This value is persisted in Terraform state. Use secret_wo to omit the signing secret from state. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    secretWo String
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. A write-only custom secret used to sign log events. The value is sent to Vercel during creation and is not persisted in state. Use an ephemeral input to also keep it out of saved plan configuration.
    secretWoVersion Number
    An optional persisted, non-secret version used to rotate secret_wo. Incrementing this value replaces the Log Drain.
    sources List<String>
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build, lambda, firewall, and redirect.
    teamId String
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.

    Supporting Types

    LogDrainSamplingRule, LogDrainSamplingRuleArgs

    Rate double
    Sampling rate from 0 to 1.
    Environment string
    Environment to apply this sampling rule to. Can be production or preview.
    RequestPath string
    Request path prefix to apply this sampling rule to. Omit to match any path.
    Rate float64
    Sampling rate from 0 to 1.
    Environment string
    Environment to apply this sampling rule to. Can be production or preview.
    RequestPath string
    Request path prefix to apply this sampling rule to. Omit to match any path.
    rate number
    Sampling rate from 0 to 1.
    environment string
    Environment to apply this sampling rule to. Can be production or preview.
    request_path string
    Request path prefix to apply this sampling rule to. Omit to match any path.
    rate Double
    Sampling rate from 0 to 1.
    environment String
    Environment to apply this sampling rule to. Can be production or preview.
    requestPath String
    Request path prefix to apply this sampling rule to. Omit to match any path.
    rate number
    Sampling rate from 0 to 1.
    environment string
    Environment to apply this sampling rule to. Can be production or preview.
    requestPath string
    Request path prefix to apply this sampling rule to. Omit to match any path.
    rate float
    Sampling rate from 0 to 1.
    environment str
    Environment to apply this sampling rule to. Can be production or preview.
    request_path str
    Request path prefix to apply this sampling rule to. Omit to match any path.
    rate Number
    Sampling rate from 0 to 1.
    environment String
    Environment to apply this sampling rule to. Can be production or preview.
    requestPath String
    Request path prefix to apply this sampling rule to. Omit to match any path.

    Import

    The pulumi import command can be used, for example:

    If importing into a personal account, or with a team configured on the provider, simply use the log_drain_id.

    • log_drain_id can be found by querying the Vercel REST API (https://vercel.com/docs/rest-api/endpoints/logDrains#retrieves-a-list-of-all-the-log-drains).
    $ pulumi import vercel:index/logDrain:LogDrain example ld_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    

    Alternatively, you can import via the team_id and log_drain_id.

    • team_id can be found in the team settings tab in the Vercel UI.
    • log_drain_id can be found by querying the Vercel REST API (https://vercel.com/docs/rest-api/endpoints/logDrains#retrieves-a-list-of-all-the-log-drains).
    $ pulumi import vercel:index/logDrain:LogDrain example team_xxxxxxxxxxxxxxxxxxxxxxxx/ld_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    

    Prefix either import format with “write-only:” to omit the existing signing secret from Terraform state. Configure secret_wo after import. To replace the drain with that secret, also configure secret_wo_version or use -replace.

    $ pulumi import vercel:index/logDrain:LogDrain example write-only:team_xxxxxxxxxxxxxxxxxxxxxxxx/ld_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    

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

    Package Details

    Repository
    vercel pulumiverse/pulumi-vercel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vercel Terraform Provider.
    vercel logo vercel logo
    Viewing docs for Vercel v5.27.0
    published on Sunday, Nov 15, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial