published on Sunday, Nov 15, 2026 by Pulumiverse
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_wois available in place ofsecretto 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:
- Delivery
Format string - The format log data should be delivered in. Can be
jsonorndjson. - Endpoint string
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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, andredirect. - 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.
- 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 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.
- Sampling
Rules List<Pulumiverse.Vercel. Inputs. Log Drain Sampling Rule> - 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_woto 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 intVersion - 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.
- Delivery
Format string - The format log data should be delivered in. Can be
jsonorndjson. - Endpoint string
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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, andredirect. - 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.
- Project
Ids []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 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.
- Sampling
Rules []LogDrain Sampling Rule Args - 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_woto 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 intVersion - 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.
- delivery_
format string - The format log data should be delivered in. Can be
jsonorndjson. - endpoint string
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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, andredirect. - 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_woto 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_ numberversion - 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.
- delivery
Format String - The format log data should be delivered in. Can be
jsonorndjson. - endpoint String
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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, andredirect. - 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.
- 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 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.
- sampling
Rules List<LogDrain Sampling Rule> - 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_woto 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 IntegerVersion - 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.
- delivery
Format string - The format log data should be delivered in. Can be
jsonorndjson. - endpoint string
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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, andredirect. - 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.
- project
Ids 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 LogDrain Sampling Rule[] - 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_woto 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 numberVersion - 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.
- delivery_
format str - The format log data should be delivered in. Can be
jsonorndjson. - endpoint str
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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, andredirect. - 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[LogDrain Sampling Rule Args] - 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_woto 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_ intversion - 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.
- delivery
Format String - The format log data should be delivered in. Can be
jsonorndjson. - endpoint String
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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, andredirect. - 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<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_woto 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 NumberVersion - 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.
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) -> LogDrainfunc 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.
- Delivery
Format string - The format log data should be delivered in. Can be
jsonorndjson. - Endpoint string
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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.
- 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 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.
- Sampling
Rules List<Pulumiverse.Vercel. Inputs. Log Drain Sampling Rule> - 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_woto 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 intVersion - 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, andredirect. - 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.
- Delivery
Format string - The format log data should be delivered in. Can be
jsonorndjson. - Endpoint string
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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.
- Project
Ids []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 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.
- Sampling
Rules []LogDrain Sampling Rule Args - 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_woto 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 intVersion - 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, andredirect. - 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.
- delivery_
format string - The format log data should be delivered in. Can be
jsonorndjson. - endpoint string
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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_woto 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_ numberversion - 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, andredirect. - 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.
- delivery
Format String - The format log data should be delivered in. Can be
jsonorndjson. - endpoint String
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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.
- 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 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.
- sampling
Rules List<LogDrain Sampling Rule> - 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_woto 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 IntegerVersion - 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, andredirect. - 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.
- delivery
Format string - The format log data should be delivered in. Can be
jsonorndjson. - endpoint string
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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.
- project
Ids 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 LogDrain Sampling Rule[] - 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_woto 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 numberVersion - 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, andredirect. - 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.
- delivery_
format str - The format log data should be delivered in. Can be
jsonorndjson. - endpoint str
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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[LogDrain Sampling Rule Args] - 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_woto 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_ intversion - 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, andredirect. - 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.
- delivery
Format String - The format log data should be delivered in. Can be
jsonorndjson. - endpoint String
- Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a
200status code and anx-vercel-verifyheader taken from the endpoint_verification data source. The value thex-vercel-verifyheader should be can be read from thevercel_endpoint_verification_codedata 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<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_woto 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 NumberVersion - 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, andredirect. - 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.
Supporting Types
LogDrainSamplingRule, LogDrainSamplingRuleArgs
- Rate double
- Sampling rate from 0 to 1.
- Environment string
- Environment to apply this sampling rule to. Can be
productionorpreview. - Request
Path 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
productionorpreview. - Request
Path 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
productionorpreview. - 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
productionorpreview. - request
Path 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
productionorpreview. - request
Path 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
productionorpreview. - 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
productionorpreview. - request
Path 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
settingstab 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
vercelTerraform Provider.
published on Sunday, Nov 15, 2026 by Pulumiverse