published on Wednesday, Jul 22, 2026 by Pulumiverse
published on Wednesday, Jul 22, 2026 by Pulumiverse
Provides a Deployment Protection Exception resource.
A Deployment Protection Exception makes a preview alias or deployment URL publicly accessible by bypassing Deployment Protection for that URL.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vercel from "@pulumiverse/vercel";
const example = new vercel.Project("example", {
name: "deployment-protection-exception-example",
framework: "nextjs",
});
const exampleDeploymentProtectionException = new vercel.DeploymentProtectionException("example", {
projectId: example.id,
alias: "preview-branch-name.vercel.app",
});
import pulumi
import pulumiverse_vercel as vercel
example = vercel.Project("example",
name="deployment-protection-exception-example",
framework="nextjs")
example_deployment_protection_exception = vercel.DeploymentProtectionException("example",
project_id=example.id,
alias="preview-branch-name.vercel.app")
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("deployment-protection-exception-example"),
Framework: pulumi.String("nextjs"),
})
if err != nil {
return err
}
_, err = vercel.NewDeploymentProtectionException(ctx, "example", &vercel.DeploymentProtectionExceptionArgs{
ProjectId: example.ID(),
Alias: pulumi.String("preview-branch-name.vercel.app"),
})
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 = "deployment-protection-exception-example",
Framework = "nextjs",
});
var exampleDeploymentProtectionException = new Vercel.DeploymentProtectionException("example", new()
{
ProjectId = example.Id,
Alias = "preview-branch-name.vercel.app",
});
});
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.DeploymentProtectionException;
import com.pulumiverse.vercel.DeploymentProtectionExceptionArgs;
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("deployment-protection-exception-example")
.framework("nextjs")
.build());
var exampleDeploymentProtectionException = new DeploymentProtectionException("exampleDeploymentProtectionException", DeploymentProtectionExceptionArgs.builder()
.projectId(example.id())
.alias("preview-branch-name.vercel.app")
.build());
}
}
resources:
example:
type: vercel:Project
properties:
name: deployment-protection-exception-example
framework: nextjs
exampleDeploymentProtectionException:
type: vercel:DeploymentProtectionException
name: example
properties:
projectId: ${example.id}
alias: preview-branch-name.vercel.app
Example coming soon!
Create DeploymentProtectionException Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DeploymentProtectionException(name: string, args: DeploymentProtectionExceptionArgs, opts?: CustomResourceOptions);@overload
def DeploymentProtectionException(resource_name: str,
args: DeploymentProtectionExceptionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DeploymentProtectionException(resource_name: str,
opts: Optional[ResourceOptions] = None,
alias: Optional[str] = None,
project_id: Optional[str] = None,
team_id: Optional[str] = None)func NewDeploymentProtectionException(ctx *Context, name string, args DeploymentProtectionExceptionArgs, opts ...ResourceOption) (*DeploymentProtectionException, error)public DeploymentProtectionException(string name, DeploymentProtectionExceptionArgs args, CustomResourceOptions? opts = null)
public DeploymentProtectionException(String name, DeploymentProtectionExceptionArgs args)
public DeploymentProtectionException(String name, DeploymentProtectionExceptionArgs args, CustomResourceOptions options)
type: vercel:DeploymentProtectionException
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "vercel_deployment_protection_exception" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args DeploymentProtectionExceptionArgs
- 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 DeploymentProtectionExceptionArgs
- 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 DeploymentProtectionExceptionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DeploymentProtectionExceptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DeploymentProtectionExceptionArgs
- 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 deploymentProtectionExceptionResource = new Vercel.DeploymentProtectionException("deploymentProtectionExceptionResource", new()
{
Alias = "string",
ProjectId = "string",
TeamId = "string",
});
example, err := vercel.NewDeploymentProtectionException(ctx, "deploymentProtectionExceptionResource", &vercel.DeploymentProtectionExceptionArgs{
Alias: pulumi.String("string"),
ProjectId: pulumi.String("string"),
TeamId: pulumi.String("string"),
})
resource "vercel_deployment_protection_exception" "deploymentProtectionExceptionResource" {
lifecycle {
create_before_destroy = true
}
alias = "string"
project_id = "string"
team_id = "string"
}
var deploymentProtectionExceptionResource = new DeploymentProtectionException("deploymentProtectionExceptionResource", DeploymentProtectionExceptionArgs.builder()
.alias("string")
.projectId("string")
.teamId("string")
.build());
deployment_protection_exception_resource = vercel.DeploymentProtectionException("deploymentProtectionExceptionResource",
alias="string",
project_id="string",
team_id="string")
const deploymentProtectionExceptionResource = new vercel.DeploymentProtectionException("deploymentProtectionExceptionResource", {
alias: "string",
projectId: "string",
teamId: "string",
});
type: vercel:DeploymentProtectionException
properties:
alias: string
projectId: string
teamId: string
DeploymentProtectionException 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 DeploymentProtectionException resource accepts the following input properties:
- Alias string
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- Project
Id string - The ID of the project the exception belongs to.
- Team
Id string - The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.
- Alias string
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- Project
Id string - The ID of the project the exception belongs to.
- Team
Id string - The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.
- alias string
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- project_
id string - The ID of the project the exception belongs to.
- team_
id string - The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.
- alias String
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- project
Id String - The ID of the project the exception belongs to.
- team
Id String - The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.
- alias string
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- project
Id string - The ID of the project the exception belongs to.
- team
Id string - The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.
- alias str
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- project_
id str - The ID of the project the exception belongs to.
- team_
id str - The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.
- alias String
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- project
Id String - The ID of the project the exception belongs to.
- team
Id String - The ID of the team the project exists 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 DeploymentProtectionException resource produces the following output properties:
- Created
At int - The unix timestamp in milliseconds at which the exception was created.
- Created
By string - The ID of the user who created the exception.
- Id string
- The provider-assigned unique ID for this managed resource.
- Scope string
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions.
- Created
At int - The unix timestamp in milliseconds at which the exception was created.
- Created
By string - The ID of the user who created the exception.
- Id string
- The provider-assigned unique ID for this managed resource.
- Scope string
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions.
- created_
at number - The unix timestamp in milliseconds at which the exception was created.
- created_
by string - The ID of the user who created the exception.
- id string
- The provider-assigned unique ID for this managed resource.
- scope string
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions.
- created
At Integer - The unix timestamp in milliseconds at which the exception was created.
- created
By String - The ID of the user who created the exception.
- id String
- The provider-assigned unique ID for this managed resource.
- scope String
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions.
- created
At number - The unix timestamp in milliseconds at which the exception was created.
- created
By string - The ID of the user who created the exception.
- id string
- The provider-assigned unique ID for this managed resource.
- scope string
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions.
- created_
at int - The unix timestamp in milliseconds at which the exception was created.
- created_
by str - The ID of the user who created the exception.
- id str
- The provider-assigned unique ID for this managed resource.
- scope str
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions.
- created
At Number - The unix timestamp in milliseconds at which the exception was created.
- created
By String - The ID of the user who created the exception.
- id String
- The provider-assigned unique ID for this managed resource.
- scope String
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions.
Look up Existing DeploymentProtectionException Resource
Get an existing DeploymentProtectionException 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?: DeploymentProtectionExceptionState, opts?: CustomResourceOptions): DeploymentProtectionException@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alias: Optional[str] = None,
created_at: Optional[int] = None,
created_by: Optional[str] = None,
project_id: Optional[str] = None,
scope: Optional[str] = None,
team_id: Optional[str] = None) -> DeploymentProtectionExceptionfunc GetDeploymentProtectionException(ctx *Context, name string, id IDInput, state *DeploymentProtectionExceptionState, opts ...ResourceOption) (*DeploymentProtectionException, error)public static DeploymentProtectionException Get(string name, Input<string> id, DeploymentProtectionExceptionState? state, CustomResourceOptions? opts = null)public static DeploymentProtectionException get(String name, Output<String> id, DeploymentProtectionExceptionState state, CustomResourceOptions options)resources: _: type: vercel:DeploymentProtectionException get: id: ${id}import {
to = vercel_deployment_protection_exception.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.
- Alias string
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- Created
At int - The unix timestamp in milliseconds at which the exception was created.
- Created
By string - The ID of the user who created the exception.
- Project
Id string - The ID of the project the exception belongs to.
- Scope string
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions. - Team
Id string - The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.
- Alias string
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- Created
At int - The unix timestamp in milliseconds at which the exception was created.
- Created
By string - The ID of the user who created the exception.
- Project
Id string - The ID of the project the exception belongs to.
- Scope string
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions. - Team
Id string - The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.
- alias string
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- created_
at number - The unix timestamp in milliseconds at which the exception was created.
- created_
by string - The ID of the user who created the exception.
- project_
id string - The ID of the project the exception belongs to.
- scope string
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions. - team_
id string - The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.
- alias String
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- created
At Integer - The unix timestamp in milliseconds at which the exception was created.
- created
By String - The ID of the user who created the exception.
- project
Id String - The ID of the project the exception belongs to.
- scope String
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions. - team
Id String - The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.
- alias string
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- created
At number - The unix timestamp in milliseconds at which the exception was created.
- created
By string - The ID of the user who created the exception.
- project
Id string - The ID of the project the exception belongs to.
- scope string
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions. - team
Id string - The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.
- alias str
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- created_
at int - The unix timestamp in milliseconds at which the exception was created.
- created_
by str - The ID of the user who created the exception.
- project_
id str - The ID of the project the exception belongs to.
- scope str
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions. - team_
id str - The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.
- alias String
- The preview alias or deployment URL to add to Deployment Protection Exceptions.
- created
At Number - The unix timestamp in milliseconds at which the exception was created.
- created
By String - The ID of the user who created the exception.
- project
Id String - The ID of the project the exception belongs to.
- scope String
- The scope of the exception. Always
alias-protection-overridefor Deployment Protection Exceptions. - team
Id String - The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.
Import
The pulumi import command can be used, for example:
Import using the project ID and alias.
$ pulumi import vercel:index/deploymentProtectionException:DeploymentProtectionException example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/preview-branch-name.vercel.app
Alternatively, import using team ID, project ID, and alias.
$ pulumi import vercel:index/deploymentProtectionException:DeploymentProtectionException example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/preview-branch-name.vercel.app
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 Wednesday, Jul 22, 2026 by Pulumiverse