1. Packages
  2. Vercel
  3. API Docs
  4. Deployment
Vercel v1.14.3 published on Monday, Oct 7, 2024 by Pulumiverse

vercel.Deployment

Explore with Pulumi AI

Create Deployment Resource

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

Constructor syntax

new Deployment(name: string, args: DeploymentArgs, opts?: CustomResourceOptions);
@overload
def Deployment(resource_name: str,
               args: DeploymentArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def Deployment(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               project_id: Optional[str] = None,
               delete_on_destroy: Optional[bool] = None,
               environment: Optional[Mapping[str, str]] = None,
               files: Optional[Mapping[str, str]] = None,
               path_prefix: Optional[str] = None,
               production: Optional[bool] = None,
               project_settings: Optional[DeploymentProjectSettingsArgs] = None,
               ref: Optional[str] = None,
               team_id: Optional[str] = None)
func NewDeployment(ctx *Context, name string, args DeploymentArgs, opts ...ResourceOption) (*Deployment, error)
public Deployment(string name, DeploymentArgs args, CustomResourceOptions? opts = null)
public Deployment(String name, DeploymentArgs args)
public Deployment(String name, DeploymentArgs args, CustomResourceOptions options)
type: vercel:Deployment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DeploymentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DeploymentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DeploymentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DeploymentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DeploymentArgs
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 deploymentResource = new Vercel.Deployment("deploymentResource", new()
{
    ProjectId = "string",
    DeleteOnDestroy = false,
    Environment = 
    {
        { "string", "string" },
    },
    Files = 
    {
        { "string", "string" },
    },
    PathPrefix = "string",
    Production = false,
    ProjectSettings = new Vercel.Inputs.DeploymentProjectSettingsArgs
    {
        BuildCommand = "string",
        Framework = "string",
        InstallCommand = "string",
        OutputDirectory = "string",
        RootDirectory = "string",
    },
    Ref = "string",
    TeamId = "string",
});
Copy
example, err := vercel.NewDeployment(ctx, "deploymentResource", &vercel.DeploymentArgs{
	ProjectId:       pulumi.String("string"),
	DeleteOnDestroy: pulumi.Bool(false),
	Environment: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Files: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	PathPrefix: pulumi.String("string"),
	Production: pulumi.Bool(false),
	ProjectSettings: &vercel.DeploymentProjectSettingsArgs{
		BuildCommand:    pulumi.String("string"),
		Framework:       pulumi.String("string"),
		InstallCommand:  pulumi.String("string"),
		OutputDirectory: pulumi.String("string"),
		RootDirectory:   pulumi.String("string"),
	},
	Ref:    pulumi.String("string"),
	TeamId: pulumi.String("string"),
})
Copy
var deploymentResource = new Deployment("deploymentResource", DeploymentArgs.builder()
    .projectId("string")
    .deleteOnDestroy(false)
    .environment(Map.of("string", "string"))
    .files(Map.of("string", "string"))
    .pathPrefix("string")
    .production(false)
    .projectSettings(DeploymentProjectSettingsArgs.builder()
        .buildCommand("string")
        .framework("string")
        .installCommand("string")
        .outputDirectory("string")
        .rootDirectory("string")
        .build())
    .ref("string")
    .teamId("string")
    .build());
Copy
deployment_resource = vercel.Deployment("deploymentResource",
    project_id="string",
    delete_on_destroy=False,
    environment={
        "string": "string",
    },
    files={
        "string": "string",
    },
    path_prefix="string",
    production=False,
    project_settings={
        "build_command": "string",
        "framework": "string",
        "install_command": "string",
        "output_directory": "string",
        "root_directory": "string",
    },
    ref="string",
    team_id="string")
Copy
const deploymentResource = new vercel.Deployment("deploymentResource", {
    projectId: "string",
    deleteOnDestroy: false,
    environment: {
        string: "string",
    },
    files: {
        string: "string",
    },
    pathPrefix: "string",
    production: false,
    projectSettings: {
        buildCommand: "string",
        framework: "string",
        installCommand: "string",
        outputDirectory: "string",
        rootDirectory: "string",
    },
    ref: "string",
    teamId: "string",
});
Copy
type: vercel:Deployment
properties:
    deleteOnDestroy: false
    environment:
        string: string
    files:
        string: string
    pathPrefix: string
    production: false
    projectId: string
    projectSettings:
        buildCommand: string
        framework: string
        installCommand: string
        outputDirectory: string
        rootDirectory: string
    ref: string
    teamId: string
Copy

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

ProjectId This property is required. string
The project ID to add the deployment to.
DeleteOnDestroy bool
Environment Dictionary<string, string>
A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the vercel.Project resource.
Files Dictionary<string, string>
A map of files to be uploaded for the deployment. This should be provided by a vercel.getProjectDirectory or vercel.getFile data source. Required if git_source is not set.
PathPrefix string
If specified then the path_prefix will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading ../s will be stripped.
Production bool
true if the deployment is a production deployment, meaning production aliases will be assigned.
ProjectSettings Pulumiverse.Vercel.Inputs.DeploymentProjectSettings
Project settings that will be applied to the deployment.
Ref string
The branch or commit hash that should be deployed. Note this will only work if the project is configured to use a Git repository. Required if files is not set.
TeamId string
The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider.
ProjectId This property is required. string
The project ID to add the deployment to.
DeleteOnDestroy bool
Environment map[string]string
A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the vercel.Project resource.
Files map[string]string
A map of files to be uploaded for the deployment. This should be provided by a vercel.getProjectDirectory or vercel.getFile data source. Required if git_source is not set.
PathPrefix string
If specified then the path_prefix will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading ../s will be stripped.
Production bool
true if the deployment is a production deployment, meaning production aliases will be assigned.
ProjectSettings DeploymentProjectSettingsArgs
Project settings that will be applied to the deployment.
Ref string
The branch or commit hash that should be deployed. Note this will only work if the project is configured to use a Git repository. Required if files is not set.
TeamId string
The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider.
projectId This property is required. String
The project ID to add the deployment to.
deleteOnDestroy Boolean
environment Map<String,String>
A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the vercel.Project resource.
files Map<String,String>
A map of files to be uploaded for the deployment. This should be provided by a vercel.getProjectDirectory or vercel.getFile data source. Required if git_source is not set.
pathPrefix String
If specified then the path_prefix will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading ../s will be stripped.
production Boolean
true if the deployment is a production deployment, meaning production aliases will be assigned.
projectSettings DeploymentProjectSettings
Project settings that will be applied to the deployment.
ref String
The branch or commit hash that should be deployed. Note this will only work if the project is configured to use a Git repository. Required if files is not set.
teamId String
The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider.
projectId This property is required. string
The project ID to add the deployment to.
deleteOnDestroy boolean
environment {[key: string]: string}
A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the vercel.Project resource.
files {[key: string]: string}
A map of files to be uploaded for the deployment. This should be provided by a vercel.getProjectDirectory or vercel.getFile data source. Required if git_source is not set.
pathPrefix string
If specified then the path_prefix will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading ../s will be stripped.
production boolean
true if the deployment is a production deployment, meaning production aliases will be assigned.
projectSettings DeploymentProjectSettings
Project settings that will be applied to the deployment.
ref string
The branch or commit hash that should be deployed. Note this will only work if the project is configured to use a Git repository. Required if files is not set.
teamId string
The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider.
project_id This property is required. str
The project ID to add the deployment to.
delete_on_destroy bool
environment Mapping[str, str]
A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the vercel.Project resource.
files Mapping[str, str]
A map of files to be uploaded for the deployment. This should be provided by a vercel.getProjectDirectory or vercel.getFile data source. Required if git_source is not set.
path_prefix str
If specified then the path_prefix will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading ../s will be stripped.
production bool
true if the deployment is a production deployment, meaning production aliases will be assigned.
project_settings DeploymentProjectSettingsArgs
Project settings that will be applied to the deployment.
ref str
The branch or commit hash that should be deployed. Note this will only work if the project is configured to use a Git repository. Required if files is not set.
team_id str
The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider.
projectId This property is required. String
The project ID to add the deployment to.
deleteOnDestroy Boolean
environment Map<String>
A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the vercel.Project resource.
files Map<String>
A map of files to be uploaded for the deployment. This should be provided by a vercel.getProjectDirectory or vercel.getFile data source. Required if git_source is not set.
pathPrefix String
If specified then the path_prefix will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading ../s will be stripped.
production Boolean
true if the deployment is a production deployment, meaning production aliases will be assigned.
projectSettings Property Map
Project settings that will be applied to the deployment.
ref String
The branch or commit hash that should be deployed. Note this will only work if the project is configured to use a Git repository. Required if files is not set.
teamId String
The team ID to add the deployment to. 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 Deployment resource produces the following output properties:

Domains List<string>
A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation.
Id string
The provider-assigned unique ID for this managed resource.
Url string
A unique URL that is automatically generated for a deployment.
Domains []string
A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation.
Id string
The provider-assigned unique ID for this managed resource.
Url string
A unique URL that is automatically generated for a deployment.
domains List<String>
A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation.
id String
The provider-assigned unique ID for this managed resource.
url String
A unique URL that is automatically generated for a deployment.
domains string[]
A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation.
id string
The provider-assigned unique ID for this managed resource.
url string
A unique URL that is automatically generated for a deployment.
domains Sequence[str]
A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation.
id str
The provider-assigned unique ID for this managed resource.
url str
A unique URL that is automatically generated for a deployment.
domains List<String>
A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation.
id String
The provider-assigned unique ID for this managed resource.
url String
A unique URL that is automatically generated for a deployment.

Look up Existing Deployment Resource

Get an existing Deployment 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?: DeploymentState, opts?: CustomResourceOptions): Deployment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        delete_on_destroy: Optional[bool] = None,
        domains: Optional[Sequence[str]] = None,
        environment: Optional[Mapping[str, str]] = None,
        files: Optional[Mapping[str, str]] = None,
        path_prefix: Optional[str] = None,
        production: Optional[bool] = None,
        project_id: Optional[str] = None,
        project_settings: Optional[DeploymentProjectSettingsArgs] = None,
        ref: Optional[str] = None,
        team_id: Optional[str] = None,
        url: Optional[str] = None) -> Deployment
func GetDeployment(ctx *Context, name string, id IDInput, state *DeploymentState, opts ...ResourceOption) (*Deployment, error)
public static Deployment Get(string name, Input<string> id, DeploymentState? state, CustomResourceOptions? opts = null)
public static Deployment get(String name, Output<String> id, DeploymentState state, CustomResourceOptions options)
resources:  _:    type: vercel:Deployment    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
DeleteOnDestroy bool
Domains List<string>
A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation.
Environment Dictionary<string, string>
A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the vercel.Project resource.
Files Dictionary<string, string>
A map of files to be uploaded for the deployment. This should be provided by a vercel.getProjectDirectory or vercel.getFile data source. Required if git_source is not set.
PathPrefix string
If specified then the path_prefix will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading ../s will be stripped.
Production bool
true if the deployment is a production deployment, meaning production aliases will be assigned.
ProjectId string
The project ID to add the deployment to.
ProjectSettings Pulumiverse.Vercel.Inputs.DeploymentProjectSettings
Project settings that will be applied to the deployment.
Ref string
The branch or commit hash that should be deployed. Note this will only work if the project is configured to use a Git repository. Required if files is not set.
TeamId string
The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider.
Url string
A unique URL that is automatically generated for a deployment.
DeleteOnDestroy bool
Domains []string
A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation.
Environment map[string]string
A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the vercel.Project resource.
Files map[string]string
A map of files to be uploaded for the deployment. This should be provided by a vercel.getProjectDirectory or vercel.getFile data source. Required if git_source is not set.
PathPrefix string
If specified then the path_prefix will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading ../s will be stripped.
Production bool
true if the deployment is a production deployment, meaning production aliases will be assigned.
ProjectId string
The project ID to add the deployment to.
ProjectSettings DeploymentProjectSettingsArgs
Project settings that will be applied to the deployment.
Ref string
The branch or commit hash that should be deployed. Note this will only work if the project is configured to use a Git repository. Required if files is not set.
TeamId string
The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider.
Url string
A unique URL that is automatically generated for a deployment.
deleteOnDestroy Boolean
domains List<String>
A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation.
environment Map<String,String>
A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the vercel.Project resource.
files Map<String,String>
A map of files to be uploaded for the deployment. This should be provided by a vercel.getProjectDirectory or vercel.getFile data source. Required if git_source is not set.
pathPrefix String
If specified then the path_prefix will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading ../s will be stripped.
production Boolean
true if the deployment is a production deployment, meaning production aliases will be assigned.
projectId String
The project ID to add the deployment to.
projectSettings DeploymentProjectSettings
Project settings that will be applied to the deployment.
ref String
The branch or commit hash that should be deployed. Note this will only work if the project is configured to use a Git repository. Required if files is not set.
teamId String
The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider.
url String
A unique URL that is automatically generated for a deployment.
deleteOnDestroy boolean
domains string[]
A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation.
environment {[key: string]: string}
A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the vercel.Project resource.
files {[key: string]: string}
A map of files to be uploaded for the deployment. This should be provided by a vercel.getProjectDirectory or vercel.getFile data source. Required if git_source is not set.
pathPrefix string
If specified then the path_prefix will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading ../s will be stripped.
production boolean
true if the deployment is a production deployment, meaning production aliases will be assigned.
projectId string
The project ID to add the deployment to.
projectSettings DeploymentProjectSettings
Project settings that will be applied to the deployment.
ref string
The branch or commit hash that should be deployed. Note this will only work if the project is configured to use a Git repository. Required if files is not set.
teamId string
The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider.
url string
A unique URL that is automatically generated for a deployment.
delete_on_destroy bool
domains Sequence[str]
A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation.
environment Mapping[str, str]
A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the vercel.Project resource.
files Mapping[str, str]
A map of files to be uploaded for the deployment. This should be provided by a vercel.getProjectDirectory or vercel.getFile data source. Required if git_source is not set.
path_prefix str
If specified then the path_prefix will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading ../s will be stripped.
production bool
true if the deployment is a production deployment, meaning production aliases will be assigned.
project_id str
The project ID to add the deployment to.
project_settings DeploymentProjectSettingsArgs
Project settings that will be applied to the deployment.
ref str
The branch or commit hash that should be deployed. Note this will only work if the project is configured to use a Git repository. Required if files is not set.
team_id str
The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider.
url str
A unique URL that is automatically generated for a deployment.
deleteOnDestroy Boolean
domains List<String>
A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation.
environment Map<String>
A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the vercel.Project resource.
files Map<String>
A map of files to be uploaded for the deployment. This should be provided by a vercel.getProjectDirectory or vercel.getFile data source. Required if git_source is not set.
pathPrefix String
If specified then the path_prefix will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading ../s will be stripped.
production Boolean
true if the deployment is a production deployment, meaning production aliases will be assigned.
projectId String
The project ID to add the deployment to.
projectSettings Property Map
Project settings that will be applied to the deployment.
ref String
The branch or commit hash that should be deployed. Note this will only work if the project is configured to use a Git repository. Required if files is not set.
teamId String
The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider.
url String
A unique URL that is automatically generated for a deployment.

Supporting Types

DeploymentProjectSettings
, DeploymentProjectSettingsArgs

BuildCommand string
The build command for this deployment. If omitted, this value will be taken from the project or automatically detected.
Framework string
The framework that is being used for this deployment. If omitted, no framework is selected.
InstallCommand string
The install command for this deployment. If omitted, this value will be taken from the project or automatically detected.
OutputDirectory string
The output directory of the deployment. If omitted, this value will be taken from the project or automatically detected.
RootDirectory string
The name of a directory or relative path to the source code of your project. When null is used it will default to the project root.
BuildCommand string
The build command for this deployment. If omitted, this value will be taken from the project or automatically detected.
Framework string
The framework that is being used for this deployment. If omitted, no framework is selected.
InstallCommand string
The install command for this deployment. If omitted, this value will be taken from the project or automatically detected.
OutputDirectory string
The output directory of the deployment. If omitted, this value will be taken from the project or automatically detected.
RootDirectory string
The name of a directory or relative path to the source code of your project. When null is used it will default to the project root.
buildCommand String
The build command for this deployment. If omitted, this value will be taken from the project or automatically detected.
framework String
The framework that is being used for this deployment. If omitted, no framework is selected.
installCommand String
The install command for this deployment. If omitted, this value will be taken from the project or automatically detected.
outputDirectory String
The output directory of the deployment. If omitted, this value will be taken from the project or automatically detected.
rootDirectory String
The name of a directory or relative path to the source code of your project. When null is used it will default to the project root.
buildCommand string
The build command for this deployment. If omitted, this value will be taken from the project or automatically detected.
framework string
The framework that is being used for this deployment. If omitted, no framework is selected.
installCommand string
The install command for this deployment. If omitted, this value will be taken from the project or automatically detected.
outputDirectory string
The output directory of the deployment. If omitted, this value will be taken from the project or automatically detected.
rootDirectory string
The name of a directory or relative path to the source code of your project. When null is used it will default to the project root.
build_command str
The build command for this deployment. If omitted, this value will be taken from the project or automatically detected.
framework str
The framework that is being used for this deployment. If omitted, no framework is selected.
install_command str
The install command for this deployment. If omitted, this value will be taken from the project or automatically detected.
output_directory str
The output directory of the deployment. If omitted, this value will be taken from the project or automatically detected.
root_directory str
The name of a directory or relative path to the source code of your project. When null is used it will default to the project root.
buildCommand String
The build command for this deployment. If omitted, this value will be taken from the project or automatically detected.
framework String
The framework that is being used for this deployment. If omitted, no framework is selected.
installCommand String
The install command for this deployment. If omitted, this value will be taken from the project or automatically detected.
outputDirectory String
The output directory of the deployment. If omitted, this value will be taken from the project or automatically detected.
rootDirectory String
The name of a directory or relative path to the source code of your project. When null is used it will default to the project root.

Package Details

Repository
vercel pulumiverse/pulumi-vercel
License
Apache-2.0
Notes
This Pulumi package is based on the vercel Terraform Provider.