1. Packages
  2. Packages
  3. Vercel Provider
  4. API Docs
  5. BulkRedirects
Viewing docs for Vercel v5.3.1
published on Wednesday, Jul 1, 2026 by Pulumiverse
vercel logo
Viewing docs for Vercel v5.3.1
published on Wednesday, Jul 1, 2026 by Pulumiverse

    Provides a Bulk Redirects resource.

    This resource manages the live project-level bulk redirects for a Vercel project. Each apply stages the configured redirect set and promotes that version to production.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumiverse/vercel";
    
    const example = new vercel.Project("example", {name: "example-project"});
    const exampleBulkRedirects = new vercel.BulkRedirects("example", {
        projectId: example.id,
        redirects: [
            {
                source: "/old-path",
                destination: "/new-path",
                statusCode: 307,
                caseSensitive: false,
                query: false,
            },
            {
                source: "/blog",
                destination: "https://example.com/blog",
                statusCode: 308,
                caseSensitive: true,
                query: true,
            },
        ],
    });
    
    import pulumi
    import pulumiverse_vercel as vercel
    
    example = vercel.Project("example", name="example-project")
    example_bulk_redirects = vercel.BulkRedirects("example",
        project_id=example.id,
        redirects=[
            {
                "source": "/old-path",
                "destination": "/new-path",
                "status_code": 307,
                "case_sensitive": False,
                "query": False,
            },
            {
                "source": "/blog",
                "destination": "https://example.com/blog",
                "status_code": 308,
                "case_sensitive": True,
                "query": True,
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-vercel/sdk/v5/go/vercel"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := vercel.NewProject(ctx, "example", &vercel.ProjectArgs{
    			Name: pulumi.String("example-project"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vercel.NewBulkRedirects(ctx, "example", &vercel.BulkRedirectsArgs{
    			ProjectId: example.ID(),
    			Redirects: vercel.BulkRedirectsRedirectArray{
    				&vercel.BulkRedirectsRedirectArgs{
    					Source:        pulumi.String("/old-path"),
    					Destination:   pulumi.String("/new-path"),
    					StatusCode:    pulumi.Int(307),
    					CaseSensitive: pulumi.Bool(false),
    					Query:         pulumi.Bool(false),
    				},
    				&vercel.BulkRedirectsRedirectArgs{
    					Source:        pulumi.String("/blog"),
    					Destination:   pulumi.String("https://example.com/blog"),
    					StatusCode:    pulumi.Int(308),
    					CaseSensitive: pulumi.Bool(true),
    					Query:         pulumi.Bool(true),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vercel = Pulumiverse.Vercel;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Vercel.Project("example", new()
        {
            Name = "example-project",
        });
    
        var exampleBulkRedirects = new Vercel.BulkRedirects("example", new()
        {
            ProjectId = example.Id,
            Redirects = new[]
            {
                new Vercel.Inputs.BulkRedirectsRedirectArgs
                {
                    Source = "/old-path",
                    Destination = "/new-path",
                    StatusCode = 307,
                    CaseSensitive = false,
                    Query = false,
                },
                new Vercel.Inputs.BulkRedirectsRedirectArgs
                {
                    Source = "/blog",
                    Destination = "https://example.com/blog",
                    StatusCode = 308,
                    CaseSensitive = true,
                    Query = true,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumiverse.vercel.Project;
    import com.pulumiverse.vercel.ProjectArgs;
    import com.pulumiverse.vercel.BulkRedirects;
    import com.pulumiverse.vercel.BulkRedirectsArgs;
    import com.pulumi.vercel.inputs.BulkRedirectsRedirectArgs;
    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) {
            var example = new Project("example", ProjectArgs.builder()
                .name("example-project")
                .build());
    
            var exampleBulkRedirects = new BulkRedirects("exampleBulkRedirects", BulkRedirectsArgs.builder()
                .projectId(example.id())
                .redirects(            
                    BulkRedirectsRedirectArgs.builder()
                        .source("/old-path")
                        .destination("/new-path")
                        .statusCode(307)
                        .caseSensitive(false)
                        .query(false)
                        .build(),
                    BulkRedirectsRedirectArgs.builder()
                        .source("/blog")
                        .destination("https://example.com/blog")
                        .statusCode(308)
                        .caseSensitive(true)
                        .query(true)
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: vercel:Project
        properties:
          name: example-project
      exampleBulkRedirects:
        type: vercel:BulkRedirects
        name: example
        properties:
          projectId: ${example.id}
          redirects:
            - source: /old-path
              destination: /new-path
              statusCode: 307
              caseSensitive: false
              query: false
            - source: /blog
              destination: https://example.com/blog
              statusCode: 308
              caseSensitive: true
              query: true
    
    Example coming soon!
    

    Create BulkRedirects Resource

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

    Constructor syntax

    new BulkRedirects(name: string, args: BulkRedirectsArgs, opts?: CustomResourceOptions);
    @overload
    def BulkRedirects(resource_name: str,
                      args: BulkRedirectsArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def BulkRedirects(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      project_id: Optional[str] = None,
                      redirects: Optional[Sequence[BulkRedirectsRedirectArgs]] = None,
                      team_id: Optional[str] = None)
    func NewBulkRedirects(ctx *Context, name string, args BulkRedirectsArgs, opts ...ResourceOption) (*BulkRedirects, error)
    public BulkRedirects(string name, BulkRedirectsArgs args, CustomResourceOptions? opts = null)
    public BulkRedirects(String name, BulkRedirectsArgs args)
    public BulkRedirects(String name, BulkRedirectsArgs args, CustomResourceOptions options)
    
    type: vercel:BulkRedirects
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "vercel_bulkredirects" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args BulkRedirectsArgs
    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 BulkRedirectsArgs
    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 BulkRedirectsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BulkRedirectsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BulkRedirectsArgs
    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 bulkRedirectsResource = new Vercel.BulkRedirects("bulkRedirectsResource", new()
    {
        ProjectId = "string",
        Redirects = new[]
        {
            new Vercel.Inputs.BulkRedirectsRedirectArgs
            {
                Destination = "string",
                Source = "string",
                StatusCode = 0,
                CaseSensitive = false,
                Query = false,
            },
        },
        TeamId = "string",
    });
    
    example, err := vercel.NewBulkRedirects(ctx, "bulkRedirectsResource", &vercel.BulkRedirectsArgs{
    	ProjectId: pulumi.String("string"),
    	Redirects: vercel.BulkRedirectsRedirectArray{
    		&vercel.BulkRedirectsRedirectArgs{
    			Destination:   pulumi.String("string"),
    			Source:        pulumi.String("string"),
    			StatusCode:    pulumi.Int(0),
    			CaseSensitive: pulumi.Bool(false),
    			Query:         pulumi.Bool(false),
    		},
    	},
    	TeamId: pulumi.String("string"),
    })
    
    resource "vercel_bulkredirects" "bulkRedirectsResource" {
      project_id = "string"
      redirects {
        destination    = "string"
        source         = "string"
        status_code    = 0
        case_sensitive = false
        query          = false
      }
      team_id = "string"
    }
    
    var bulkRedirectsResource = new BulkRedirects("bulkRedirectsResource", BulkRedirectsArgs.builder()
        .projectId("string")
        .redirects(BulkRedirectsRedirectArgs.builder()
            .destination("string")
            .source("string")
            .statusCode(0)
            .caseSensitive(false)
            .query(false)
            .build())
        .teamId("string")
        .build());
    
    bulk_redirects_resource = vercel.BulkRedirects("bulkRedirectsResource",
        project_id="string",
        redirects=[{
            "destination": "string",
            "source": "string",
            "status_code": 0,
            "case_sensitive": False,
            "query": False,
        }],
        team_id="string")
    
    const bulkRedirectsResource = new vercel.BulkRedirects("bulkRedirectsResource", {
        projectId: "string",
        redirects: [{
            destination: "string",
            source: "string",
            statusCode: 0,
            caseSensitive: false,
            query: false,
        }],
        teamId: "string",
    });
    
    type: vercel:BulkRedirects
    properties:
        projectId: string
        redirects:
            - caseSensitive: false
              destination: string
              query: false
              source: string
              statusCode: 0
        teamId: string
    

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

    ProjectId string
    The ID of the Vercel project to manage redirects for.
    Redirects List<Pulumiverse.Vercel.Inputs.BulkRedirectsRedirect>
    The full set of live bulk redirects for the project.
    TeamId string
    The ID of the Vercel team.
    ProjectId string
    The ID of the Vercel project to manage redirects for.
    Redirects []BulkRedirectsRedirectArgs
    The full set of live bulk redirects for the project.
    TeamId string
    The ID of the Vercel team.
    project_id string
    The ID of the Vercel project to manage redirects for.
    redirects list(object)
    The full set of live bulk redirects for the project.
    team_id string
    The ID of the Vercel team.
    projectId String
    The ID of the Vercel project to manage redirects for.
    redirects List<BulkRedirectsRedirect>
    The full set of live bulk redirects for the project.
    teamId String
    The ID of the Vercel team.
    projectId string
    The ID of the Vercel project to manage redirects for.
    redirects BulkRedirectsRedirect[]
    The full set of live bulk redirects for the project.
    teamId string
    The ID of the Vercel team.
    project_id str
    The ID of the Vercel project to manage redirects for.
    redirects Sequence[BulkRedirectsRedirectArgs]
    The full set of live bulk redirects for the project.
    team_id str
    The ID of the Vercel team.
    projectId String
    The ID of the Vercel project to manage redirects for.
    redirects List<Property Map>
    The full set of live bulk redirects for the project.
    teamId String
    The ID of the Vercel team.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BulkRedirects resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    VersionId string
    The ID of the live bulk redirects version managed by this resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    VersionId string
    The ID of the live bulk redirects version managed by this resource.
    id string
    The provider-assigned unique ID for this managed resource.
    version_id string
    The ID of the live bulk redirects version managed by this resource.
    id String
    The provider-assigned unique ID for this managed resource.
    versionId String
    The ID of the live bulk redirects version managed by this resource.
    id string
    The provider-assigned unique ID for this managed resource.
    versionId string
    The ID of the live bulk redirects version managed by this resource.
    id str
    The provider-assigned unique ID for this managed resource.
    version_id str
    The ID of the live bulk redirects version managed by this resource.
    id String
    The provider-assigned unique ID for this managed resource.
    versionId String
    The ID of the live bulk redirects version managed by this resource.

    Look up Existing BulkRedirects Resource

    Get an existing BulkRedirects 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?: BulkRedirectsState, opts?: CustomResourceOptions): BulkRedirects
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            project_id: Optional[str] = None,
            redirects: Optional[Sequence[BulkRedirectsRedirectArgs]] = None,
            team_id: Optional[str] = None,
            version_id: Optional[str] = None) -> BulkRedirects
    func GetBulkRedirects(ctx *Context, name string, id IDInput, state *BulkRedirectsState, opts ...ResourceOption) (*BulkRedirects, error)
    public static BulkRedirects Get(string name, Input<string> id, BulkRedirectsState? state, CustomResourceOptions? opts = null)
    public static BulkRedirects get(String name, Output<String> id, BulkRedirectsState state, CustomResourceOptions options)
    resources:  _:    type: vercel:BulkRedirects    get:      id: ${id}
    import {
      to = vercel_bulkredirects.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ProjectId string
    The ID of the Vercel project to manage redirects for.
    Redirects List<Pulumiverse.Vercel.Inputs.BulkRedirectsRedirect>
    The full set of live bulk redirects for the project.
    TeamId string
    The ID of the Vercel team.
    VersionId string
    The ID of the live bulk redirects version managed by this resource.
    ProjectId string
    The ID of the Vercel project to manage redirects for.
    Redirects []BulkRedirectsRedirectArgs
    The full set of live bulk redirects for the project.
    TeamId string
    The ID of the Vercel team.
    VersionId string
    The ID of the live bulk redirects version managed by this resource.
    project_id string
    The ID of the Vercel project to manage redirects for.
    redirects list(object)
    The full set of live bulk redirects for the project.
    team_id string
    The ID of the Vercel team.
    version_id string
    The ID of the live bulk redirects version managed by this resource.
    projectId String
    The ID of the Vercel project to manage redirects for.
    redirects List<BulkRedirectsRedirect>
    The full set of live bulk redirects for the project.
    teamId String
    The ID of the Vercel team.
    versionId String
    The ID of the live bulk redirects version managed by this resource.
    projectId string
    The ID of the Vercel project to manage redirects for.
    redirects BulkRedirectsRedirect[]
    The full set of live bulk redirects for the project.
    teamId string
    The ID of the Vercel team.
    versionId string
    The ID of the live bulk redirects version managed by this resource.
    project_id str
    The ID of the Vercel project to manage redirects for.
    redirects Sequence[BulkRedirectsRedirectArgs]
    The full set of live bulk redirects for the project.
    team_id str
    The ID of the Vercel team.
    version_id str
    The ID of the live bulk redirects version managed by this resource.
    projectId String
    The ID of the Vercel project to manage redirects for.
    redirects List<Property Map>
    The full set of live bulk redirects for the project.
    teamId String
    The ID of the Vercel team.
    versionId String
    The ID of the live bulk redirects version managed by this resource.

    Supporting Types

    BulkRedirectsRedirect, BulkRedirectsRedirectArgs

    Destination string
    The destination pathname or URL to redirect to.
    Source string
    The source pathname to match.
    StatusCode int
    The HTTP status code for the redirect.
    CaseSensitive bool
    Whether the source match is case-sensitive.
    Query bool
    Whether query parameters are considered when matching the redirect.
    Destination string
    The destination pathname or URL to redirect to.
    Source string
    The source pathname to match.
    StatusCode int
    The HTTP status code for the redirect.
    CaseSensitive bool
    Whether the source match is case-sensitive.
    Query bool
    Whether query parameters are considered when matching the redirect.
    destination string
    The destination pathname or URL to redirect to.
    source string
    The source pathname to match.
    status_code number
    The HTTP status code for the redirect.
    case_sensitive bool
    Whether the source match is case-sensitive.
    query bool
    Whether query parameters are considered when matching the redirect.
    destination String
    The destination pathname or URL to redirect to.
    source String
    The source pathname to match.
    statusCode Integer
    The HTTP status code for the redirect.
    caseSensitive Boolean
    Whether the source match is case-sensitive.
    query Boolean
    Whether query parameters are considered when matching the redirect.
    destination string
    The destination pathname or URL to redirect to.
    source string
    The source pathname to match.
    statusCode number
    The HTTP status code for the redirect.
    caseSensitive boolean
    Whether the source match is case-sensitive.
    query boolean
    Whether query parameters are considered when matching the redirect.
    destination str
    The destination pathname or URL to redirect to.
    source str
    The source pathname to match.
    status_code int
    The HTTP status code for the redirect.
    case_sensitive bool
    Whether the source match is case-sensitive.
    query bool
    Whether query parameters are considered when matching the redirect.
    destination String
    The destination pathname or URL to redirect to.
    source String
    The source pathname to match.
    statusCode Number
    The HTTP status code for the redirect.
    caseSensitive Boolean
    Whether the source match is case-sensitive.
    query Boolean
    Whether query parameters are considered when matching the redirect.

    Import

    The pulumi import command can be used, for example:

    If importing with a team configured on the provider, simply use the project ID.

    • project_id can be found in the project settings tab in the Vercel UI.
    $ pulumi import vercel:index/bulkRedirects:BulkRedirects example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    

    Alternatively, you can import via the team_id and project_id.

    • team_id can be found in the team settings tab in the Vercel UI.
    • project_id can be found in the project settings tab in the Vercel UI.
    $ pulumi import vercel:index/bulkRedirects:BulkRedirects example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    

    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
    Viewing docs for Vercel v5.3.1
    published on Wednesday, Jul 1, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial