1. Packages
  2. Vercel
  3. API Docs
  4. LogDrain
Vercel v1.11.0 published on Thursday, May 23, 2024 by Pulumiverse

vercel.LogDrain

Explore with Pulumi AI

vercel logo
Vercel v1.11.0 published on Thursday, May 23, 2024 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.

    Only Pro and Enterprise teams can create Configurable Log Drains.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumi/vercel";
    import * as vercel from "@pulumiverse/vercel";
    
    const exampleEndpointVerification = vercel.getEndpointVerification({});
    const exampleProject = new vercel.Project("exampleProject", {});
    const exampleLogDrain = new vercel.LogDrain("exampleLogDrain", {
        deliveryFormat: "json",
        environments: ["production"],
        headers: {
            "some-key": "some-value",
        },
        projectIds: [exampleProject.id],
        samplingRate: 0.8,
        secret: "a_very_long_and_very_well_specified_secret",
        sources: ["static"],
        endpoint: "https://example.com/my-log-drain-endpoint",
    });
    
    import pulumi
    import pulumi_vercel as vercel
    import pulumiverse_vercel as vercel
    
    example_endpoint_verification = vercel.get_endpoint_verification()
    example_project = vercel.Project("exampleProject")
    example_log_drain = vercel.LogDrain("exampleLogDrain",
        delivery_format="json",
        environments=["production"],
        headers={
            "some-key": "some-value",
        },
        project_ids=[example_project.id],
        sampling_rate=0.8,
        secret="a_very_long_and_very_well_specified_secret",
        sources=["static"],
        endpoint="https://example.com/my-log-drain-endpoint")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-vercel/sdk/go/vercel"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vercel.GetEndpointVerification(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleProject, err := vercel.NewProject(ctx, "exampleProject", nil)
    		if err != nil {
    			return err
    		}
    		_, err = vercel.NewLogDrain(ctx, "exampleLogDrain", &vercel.LogDrainArgs{
    			DeliveryFormat: pulumi.String("json"),
    			Environments: pulumi.StringArray{
    				pulumi.String("production"),
    			},
    			Headers: pulumi.StringMap{
    				"some-key": pulumi.String("some-value"),
    			},
    			ProjectIds: pulumi.StringArray{
    				exampleProject.ID(),
    			},
    			SamplingRate: pulumi.Float64(0.8),
    			Secret:       pulumi.String("a_very_long_and_very_well_specified_secret"),
    			Sources: pulumi.StringArray{
    				pulumi.String("static"),
    			},
    			Endpoint: pulumi.String("https://example.com/my-log-drain-endpoint"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vercel = Pulumi.Vercel;
    using Vercel = Pulumiverse.Vercel;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleEndpointVerification = Vercel.GetEndpointVerification.Invoke();
    
        var exampleProject = new Vercel.Project("exampleProject");
    
        var exampleLogDrain = new Vercel.LogDrain("exampleLogDrain", new()
        {
            DeliveryFormat = "json",
            Environments = new[]
            {
                "production",
            },
            Headers = 
            {
                { "some-key", "some-value" },
            },
            ProjectIds = new[]
            {
                exampleProject.Id,
            },
            SamplingRate = 0.8,
            Secret = "a_very_long_and_very_well_specified_secret",
            Sources = new[]
            {
                "static",
            },
            Endpoint = "https://example.com/my-log-drain-endpoint",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vercel.VercelFunctions;
    import com.pulumi.vercel.inputs.GetEndpointVerificationArgs;
    import com.pulumi.vercel.Project;
    import com.pulumi.vercel.LogDrain;
    import com.pulumi.vercel.LogDrainArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var exampleEndpointVerification = VercelFunctions.getEndpointVerification();
    
            var exampleProject = new Project("exampleProject");
    
            var exampleLogDrain = new LogDrain("exampleLogDrain", LogDrainArgs.builder()        
                .deliveryFormat("json")
                .environments("production")
                .headers(Map.of("some-key", "some-value"))
                .projectIds(exampleProject.id())
                .samplingRate(0.8)
                .secret("a_very_long_and_very_well_specified_secret")
                .sources("static")
                .endpoint("https://example.com/my-log-drain-endpoint")
                .build());
    
        }
    }
    
    resources:
      exampleLogDrain:
        type: vercel:LogDrain
        properties:
          deliveryFormat: json
          environments:
            - production
          headers:
            some-key: some-value
          projectIds:
            - ${exampleProject.id}
          samplingRate: 0.8
          secret: a_very_long_and_very_well_specified_secret
          sources:
            - static
          endpoint: https://example.com/my-log-drain-endpoint
      exampleProject:
        type: vercel:Project
    variables:
      exampleEndpointVerification:
        fn::invoke:
          Function: vercel:getEndpointVerification
          Arguments: {}
    

    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,
                 headers: Optional[Mapping[str, str]] = None,
                 project_ids: Optional[Sequence[str]] = None,
                 sampling_rate: Optional[float] = None,
                 secret: Optional[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.
    
    

    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",
        },
        Headers = 
        {
            { "string", "string" },
        },
        ProjectIds = new[]
        {
            "string",
        },
        SamplingRate = 0,
        Secret = "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"),
    	},
    	Headers: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ProjectIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SamplingRate: pulumi.Float64(0),
    	Secret:       pulumi.String("string"),
    	TeamId:       pulumi.String("string"),
    })
    
    var logDrainResource = new LogDrain("logDrainResource", LogDrainArgs.builder()
        .deliveryFormat("string")
        .endpoint("string")
        .environments("string")
        .sources("string")
        .headers(Map.of("string", "string"))
        .projectIds("string")
        .samplingRate(0)
        .secret("string")
        .teamId("string")
        .build());
    
    log_drain_resource = vercel.LogDrain("logDrainResource",
        delivery_format="string",
        endpoint="string",
        environments=["string"],
        sources=["string"],
        headers={
            "string": "string",
        },
        project_ids=["string"],
        sampling_rate=0,
        secret="string",
        team_id="string")
    
    const logDrainResource = new vercel.LogDrain("logDrainResource", {
        deliveryFormat: "string",
        endpoint: "string",
        environments: ["string"],
        sources: ["string"],
        headers: {
            string: "string",
        },
        projectIds: ["string"],
        samplingRate: 0,
        secret: "string",
        teamId: "string",
    });
    
    type: vercel:LogDrain
    properties:
        deliveryFormat: string
        endpoint: string
        environments:
            - string
        headers:
            string: string
        projectIds:
            - string
        samplingRate: 0
        secret: string
        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

    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 and lambda.
    Headers Dictionary<string, string>
    Custom headers to include in requests to the log drain endpoint.
    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.
    Secret string
    A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    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 and lambda.
    Headers map[string]string
    Custom headers to include in requests to the log drain endpoint.
    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.
    Secret string
    A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    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 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 and lambda.
    headers Map<String,String>
    Custom headers to include in requests to the log drain endpoint.
    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.
    secret String
    A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    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 and lambda.
    headers {[key: string]: string}
    Custom headers to include in requests to the log drain endpoint.
    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.
    secret string
    A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    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 and lambda.
    headers Mapping[str, str]
    Custom headers to include in requests to the log drain endpoint.
    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.
    secret str
    A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    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 and lambda.
    headers Map<String>
    Custom headers to include in requests to the log drain endpoint.
    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.
    secret String
    A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    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 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,
            project_ids: Optional[Sequence[str]] = None,
            sampling_rate: Optional[float] = None,
            secret: Optional[str] = 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    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.
    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.
    Secret string
    A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    Sources List<string>
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build and lambda.
    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.
    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.
    Secret string
    A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    Sources []string
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build and lambda.
    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 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.
    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.
    secret String
    A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    sources List<String>
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build and lambda.
    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.
    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.
    secret string
    A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    sources string[]
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build and lambda.
    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.
    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.
    secret str
    A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    sources Sequence[str]
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build and lambda.
    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.
    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.
    secret String
    A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
    sources List<String>
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build and lambda.
    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.

    Import

    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 ecfg_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    

    Alternatively, you can import via the team_id and edge_config_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/ecfg_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    

    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 v1.11.0 published on Thursday, May 23, 2024 by Pulumiverse