Vercel v3.1.2 published on Tuesday, May 13, 2025 by Pulumiverse
vercel.getCustomEnvironment
Explore with Pulumi AI
Provides information about an existing CustomEnvironment resource.
An CustomEnvironment allows a vercel.Deployment
to be accessed through a different URL.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vercel from "@pulumi/vercel";
const example = vercel.getProject({
name: "example-project-with-custom-env",
});
const exampleGetCustomEnvironment = example.then(example => vercel.getCustomEnvironment({
projectId: example.id,
name: "example-custom-env",
}));
import pulumi
import pulumi_vercel as vercel
example = vercel.get_project(name="example-project-with-custom-env")
example_get_custom_environment = vercel.get_custom_environment(project_id=example.id,
name="example-custom-env")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-vercel/sdk/v3/go/vercel"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := vercel.LookupProject(ctx, &vercel.LookupProjectArgs{
Name: "example-project-with-custom-env",
}, nil)
if err != nil {
return err
}
_, err = vercel.LookupCustomEnvironment(ctx, &vercel.LookupCustomEnvironmentArgs{
ProjectId: example.Id,
Name: "example-custom-env",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vercel = Pulumi.Vercel;
return await Deployment.RunAsync(() =>
{
var example = Vercel.GetProject.Invoke(new()
{
Name = "example-project-with-custom-env",
});
var exampleGetCustomEnvironment = Vercel.GetCustomEnvironment.Invoke(new()
{
ProjectId = example.Apply(getProjectResult => getProjectResult.Id),
Name = "example-custom-env",
});
});
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.GetProjectArgs;
import com.pulumi.vercel.inputs.GetCustomEnvironmentArgs;
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 example = VercelFunctions.getProject(GetProjectArgs.builder()
.name("example-project-with-custom-env")
.build());
final var exampleGetCustomEnvironment = VercelFunctions.getCustomEnvironment(GetCustomEnvironmentArgs.builder()
.projectId(example.applyValue(getProjectResult -> getProjectResult.id()))
.name("example-custom-env")
.build());
}
}
variables:
example:
fn::invoke:
Function: vercel:getProject
Arguments:
name: example-project-with-custom-env
exampleGetCustomEnvironment:
fn::invoke:
Function: vercel:getCustomEnvironment
Arguments:
projectId: ${example.id}
name: example-custom-env
Using getCustomEnvironment
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCustomEnvironment(args: GetCustomEnvironmentArgs, opts?: InvokeOptions): Promise<GetCustomEnvironmentResult>
function getCustomEnvironmentOutput(args: GetCustomEnvironmentOutputArgs, opts?: InvokeOptions): Output<GetCustomEnvironmentResult>
def get_custom_environment(name: Optional[str] = None,
project_id: Optional[str] = None,
team_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCustomEnvironmentResult
def get_custom_environment_output(name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
team_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCustomEnvironmentResult]
func LookupCustomEnvironment(ctx *Context, args *LookupCustomEnvironmentArgs, opts ...InvokeOption) (*LookupCustomEnvironmentResult, error)
func LookupCustomEnvironmentOutput(ctx *Context, args *LookupCustomEnvironmentOutputArgs, opts ...InvokeOption) LookupCustomEnvironmentResultOutput
> Note: This function is named LookupCustomEnvironment
in the Go SDK.
public static class GetCustomEnvironment
{
public static Task<GetCustomEnvironmentResult> InvokeAsync(GetCustomEnvironmentArgs args, InvokeOptions? opts = null)
public static Output<GetCustomEnvironmentResult> Invoke(GetCustomEnvironmentInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCustomEnvironmentResult> getCustomEnvironment(GetCustomEnvironmentArgs args, InvokeOptions options)
public static Output<GetCustomEnvironmentResult> getCustomEnvironment(GetCustomEnvironmentArgs args, InvokeOptions options)
fn::invoke:
function: vercel:index/getCustomEnvironment:getCustomEnvironment
arguments:
# arguments dictionary
The following arguments are supported:
- name str
- The name of the environment.
- project_
id str - The ID of the existing Vercel Project.
- team_
id str - The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
getCustomEnvironment Result
The following output properties are available:
- Branch
Tracking Pulumiverse.Vercel. Outputs. Get Custom Environment Branch Tracking - The branch tracking configuration for the environment. When enabled, each qualifying merge will generate a deployment.
- Description string
- A description of what the environment is.
- Id string
- The ID of the environment.
- Name string
- The name of the environment.
- Project
Id string - The ID of the existing Vercel Project.
- Team
Id string - The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
- Branch
Tracking GetCustom Environment Branch Tracking - The branch tracking configuration for the environment. When enabled, each qualifying merge will generate a deployment.
- Description string
- A description of what the environment is.
- Id string
- The ID of the environment.
- Name string
- The name of the environment.
- Project
Id string - The ID of the existing Vercel Project.
- Team
Id string - The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
- branch
Tracking GetCustom Environment Branch Tracking - The branch tracking configuration for the environment. When enabled, each qualifying merge will generate a deployment.
- description String
- A description of what the environment is.
- id String
- The ID of the environment.
- name String
- The name of the environment.
- project
Id String - The ID of the existing Vercel Project.
- team
Id String - The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
- branch
Tracking GetCustom Environment Branch Tracking - The branch tracking configuration for the environment. When enabled, each qualifying merge will generate a deployment.
- description string
- A description of what the environment is.
- id string
- The ID of the environment.
- name string
- The name of the environment.
- project
Id string - The ID of the existing Vercel Project.
- team
Id string - The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
- branch_
tracking GetCustom Environment Branch Tracking - The branch tracking configuration for the environment. When enabled, each qualifying merge will generate a deployment.
- description str
- A description of what the environment is.
- id str
- The ID of the environment.
- name str
- The name of the environment.
- project_
id str - The ID of the existing Vercel Project.
- team_
id str - The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
- branch
Tracking Property Map - The branch tracking configuration for the environment. When enabled, each qualifying merge will generate a deployment.
- description String
- A description of what the environment is.
- id String
- The ID of the environment.
- name String
- The name of the environment.
- project
Id String - The ID of the existing Vercel Project.
- team
Id String - The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
Supporting Types
GetCustomEnvironmentBranchTracking
Package Details
- Repository
- vercel pulumiverse/pulumi-vercel
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vercel
Terraform Provider.