1. Registry
  2. Packages
  3. Pulumi Delivery
  4. API Docs
  5. Stacks
Viewing docs for Pulumi Delivery v0.2.0
published on Wednesday, Nov 18, 2026 by Pulumi
Pulumi Delivery
Viewing docs for Pulumi Delivery v0.2.0
published on Wednesday, Nov 18, 2026 by Pulumi

    Updates one or more existing stacks in a stage. Each entry of stacks updates one target stack. Delivery checks out the source of the entry at the commit of the run and runs pulumi up on the target stack.

    Create each target stack before the first run. A target stack must be an ordinary stack in the organization of the pipeline.

    The entries of a group run together. They can read the new outputs of each other through stack references. The group is one unit for dependencies and retries. A resource that uses an output of one entry waits for the whole group. If one entry fails, a retry runs every entry again. Each entry uses one slot of the concurrent job limit of the organization. A group with more entries than the limit can block itself. Delivery fails it after 2 hours without progress.

    If the output of one entry is secret, all outputs of the group are secret.

    Example Usage

    import * as delivery from "@pulumi/delivery";
    
    new delivery.Stacks("dev", {
        stage: dev,
        stacks: {
            api: { stack: "shop-infra/dev", source: code, directory: "infra", config: { environment: "dev" } },
        },
    });
    

    Create Stacks Resource

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

    Constructor syntax

    new Stacks(name: string, args: StacksArgs, opts?: ComponentResourceOptions);
    @overload
    def Stacks(resource_name: str,
               args: StacksArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Stacks(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               stacks: Optional[Mapping[str, StacksEntryArgs]] = None,
               stage: Optional[Stage] = None)
    func NewStacks(ctx *Context, name string, args StacksArgs, opts ...ResourceOption) (*Stacks, error)
    public Stacks(string name, StacksArgs args, ComponentResourceOptions? opts = null)
    public Stacks(String name, StacksArgs args)
    public Stacks(String name, StacksArgs args, ComponentResourceOptions options)
    
    type: delivery:Stacks
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "delivery_stacks" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args StacksArgs
    The arguments to resource properties.
    opts ComponentResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args StacksArgs
    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 StacksArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StacksArgs
    The arguments to resource properties.
    opts ComponentResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StacksArgs
    The arguments to resource properties.
    options ComponentResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var stacksResource = new Delivery.Stacks("stacksResource", new()
    {
        Stacks = 
        {
            { "string", new Delivery.Inputs.StacksEntryArgs
            {
                Directory = "string",
                Source = gitHubSource,
                Stack = "string",
                Config = 
                {
                    { "string", "string" },
                },
                Environment = 
                {
                    { "string", "string" },
                },
                Image = new Delivery.Inputs.ImageArgs
                {
                    Reference = "string",
                    Credentials = new Delivery.Inputs.ImageCredentialsArgs
                    {
                        Password = "string",
                        Username = "string",
                    },
                },
                PreRunCommands = new[]
                {
                    "string",
                },
                Runtime = workflowsRuntime,
                Timeout = "string",
            } },
        },
        Stage = stage,
    });
    
    example, err := delivery.NewStacks(ctx, "stacksResource", &delivery.StacksArgs{
    	Stacks: delivery.StacksEntryMap{
    		"string": &delivery.StacksEntryArgs{
    			Directory: pulumi.String("string"),
    			Source:    pulumi.Any(gitHubSource),
    			Stack:     pulumi.String("string"),
    			Config: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			Environment: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			Image: &delivery.ImageArgs{
    				Reference: pulumi.String("string"),
    				Credentials: &delivery.ImageCredentialsArgs{
    					Password: pulumi.String("string"),
    					Username: pulumi.String("string"),
    				},
    			},
    			PreRunCommands: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Runtime: pulumi.Any(workflowsRuntime),
    			Timeout: pulumi.String("string"),
    		},
    	},
    	Stage: pulumi.Any(stage),
    })
    
    resource "delivery_stacks" "stacksResource" {
      lifecycle {
        create_before_destroy = true
      }
      stacks = {
        "string" = {
          directory = "string"
          source    = gitHubSource
          stack     = "string"
          config = {
            "string" = "string"
          }
          environment = {
            "string" = "string"
          }
          image = {
            reference = "string"
            credentials = {
              password = "string"
              username = "string"
            }
          }
          pre_run_commands = ["string"]
          runtime          = workflowsRuntime
          timeout          = "string"
        }
      }
      stage = stage
    }
    
    var stacksResource = new Stacks("stacksResource", StacksArgs.builder()
        .stacks(Map.of("string", StacksEntryArgs.builder()
            .directory("string")
            .source(gitHubSource)
            .stack("string")
            .config(Map.of("string", "string"))
            .environment(Map.of("string", "string"))
            .image(ImageArgs.builder()
                .reference("string")
                .credentials(ImageCredentialsArgs.builder()
                    .password("string")
                    .username("string")
                    .build())
                .build())
            .preRunCommands("string")
            .runtime(workflowsRuntime)
            .timeout("string")
            .build()))
        .stage(stage)
        .build());
    
    stacks_resource = delivery.Stacks("stacksResource",
        stacks={
            "string": {
                "directory": "string",
                "source": git_hub_source,
                "stack": "string",
                "config": {
                    "string": "string",
                },
                "environment": {
                    "string": "string",
                },
                "image": {
                    "reference": "string",
                    "credentials": {
                        "password": "string",
                        "username": "string",
                    },
                },
                "pre_run_commands": ["string"],
                "runtime": workflows_runtime,
                "timeout": "string",
            },
        },
        stage=stage)
    
    const stacksResource = new delivery.Stacks("stacksResource", {
        stacks: {
            string: {
                directory: "string",
                source: gitHubSource,
                stack: "string",
                config: {
                    string: "string",
                },
                environment: {
                    string: "string",
                },
                image: {
                    reference: "string",
                    credentials: {
                        password: "string",
                        username: "string",
                    },
                },
                preRunCommands: ["string"],
                runtime: workflowsRuntime,
                timeout: "string",
            },
        },
        stage: stage,
    });
    
    type: delivery:Stacks
    properties:
        stacks:
            string:
                config:
                    string: string
                directory: string
                environment:
                    string: string
                image:
                    credentials:
                        password: string
                        username: string
                    reference: string
                preRunCommands:
                    - string
                runtime: ${workflowsRuntime}
                source: ${gitHubSource}
                stack: string
                timeout: string
        stage: ${stage}
    

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

    Stacks Dictionary<string, StacksEntryArgs>
    Entries by name. A name can contain letters, digits, underscores and hyphens. Each entry updates one target stack.
    Stage Pulumi.Delivery.Stage
    Stage that the group runs in.
    Stacks map[string]StacksEntryArgs
    Entries by name. A name can contain letters, digits, underscores and hyphens. Each entry updates one target stack.
    Stage Stage
    Stage that the group runs in.
    stacks map(object)
    Entries by name. A name can contain letters, digits, underscores and hyphens. Each entry updates one target stack.
    stage delivery_stage
    Stage that the group runs in.
    stacks Map<String,StacksEntryArgs>
    Entries by name. A name can contain letters, digits, underscores and hyphens. Each entry updates one target stack.
    stage Stage
    Stage that the group runs in.
    stacks {[key: string]: StacksEntryArgs}
    Entries by name. A name can contain letters, digits, underscores and hyphens. Each entry updates one target stack.
    stage Stage
    Stage that the group runs in.
    stacks Mapping[str, StacksEntryArgs]
    Entries by name. A name can contain letters, digits, underscores and hyphens. Each entry updates one target stack.
    stage Stage
    Stage that the group runs in.
    stacks Map<Property Map>
    Entries by name. A name can contain letters, digits, underscores and hyphens. Each entry updates one target stack.
    stage delivery:Stage
    Stage that the group runs in.

    Outputs

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

    Outputs Dictionary<string, ImmutableDictionary<string, object>>
    Outputs of each entry, by entry name. They are unknown until the group runs.
    Outputs map[string]map[string]interface{}
    Outputs of each entry, by entry name. They are unknown until the group runs.
    outputs map(map(any))
    Outputs of each entry, by entry name. They are unknown until the group runs.
    outputs Map<String,Map<String,Object>>
    Outputs of each entry, by entry name. They are unknown until the group runs.
    outputs {[key: string]: {[key: string]: any}}
    Outputs of each entry, by entry name. They are unknown until the group runs.
    outputs Mapping[str, Mapping[str, Any]]
    Outputs of each entry, by entry name. They are unknown until the group runs.
    outputs Map<Map<Any>>
    Outputs of each entry, by entry name. They are unknown until the group runs.

    Supporting Types

    Image, ImageArgs

    Container image that a member runs in.
    Reference string
    Image reference, for example pulumi/pulumi-nodejs:3.272.0.
    Credentials ImageCredentials
    Credentials for a private registry.
    Reference string
    Image reference, for example pulumi/pulumi-nodejs:3.272.0.
    Credentials ImageCredentials
    Credentials for a private registry.
    reference string
    Image reference, for example pulumi/pulumi-nodejs:3.272.0.
    credentials object
    Credentials for a private registry.
    reference String
    Image reference, for example pulumi/pulumi-nodejs:3.272.0.
    credentials ImageCredentials
    Credentials for a private registry.
    reference string
    Image reference, for example pulumi/pulumi-nodejs:3.272.0.
    credentials ImageCredentials
    Credentials for a private registry.
    reference str
    Image reference, for example pulumi/pulumi-nodejs:3.272.0.
    credentials ImageCredentials
    Credentials for a private registry.
    reference String
    Image reference, for example pulumi/pulumi-nodejs:3.272.0.
    credentials Property Map
    Credentials for a private registry.

    ImageCredentials, ImageCredentialsArgs

    Credentials for a private registry.
    Password string
    Registry password or token. It is a secret.
    Username string
    Registry user name.
    Password string
    Registry password or token. It is a secret.
    Username string
    Registry user name.
    password string
    Registry password or token. It is a secret.
    username string
    Registry user name.
    password String
    Registry password or token. It is a secret.
    username String
    Registry user name.
    password string
    Registry password or token. It is a secret.
    username string
    Registry user name.
    password str
    Registry password or token. It is a secret.
    username str
    Registry user name.
    password String
    Registry password or token. It is a secret.
    username String
    Registry user name.

    StacksEntry, StacksEntryArgs

    One target stack that a Stacks resource updates.
    Directory string
    Directory of the stack project, relative to the repository root.
    Source Pulumi.Delivery.GitHubSource | Pulumi.Delivery.GitLabSource | Pulumi.Delivery.BitbucketSource | Pulumi.Delivery.AzureDevOpsSource
    VCS source to check out. The update uses the commit of the run for this source.
    Stack string
    Target stack as project/stack. It must exist before the first run, in the organization of the pipeline.
    Config Dictionary<string, string>
    Config values that Delivery sets on the target stack before the update. Values are plain strings. Delivery rejects secret values. Keep secrets in the config file of the target stack or in an ESC environment.
    Environment Dictionary<string, string>
    Environment variables for the update, for example cloud credentials. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
    Image Image
    Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
    PreRunCommands List<string>
    Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
    Runtime Pulumi.Delivery.WorkflowsRuntime
    Pool that runs the update.
    Timeout string
    Maximum run time of the update, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.
    Directory string
    Directory of the stack project, relative to the repository root.
    Source GitHubSource | GitLabSource | BitbucketSource | AzureDevOpsSource
    VCS source to check out. The update uses the commit of the run for this source.
    Stack string
    Target stack as project/stack. It must exist before the first run, in the organization of the pipeline.
    Config map[string]string
    Config values that Delivery sets on the target stack before the update. Values are plain strings. Delivery rejects secret values. Keep secrets in the config file of the target stack or in an ESC environment.
    Environment map[string]string
    Environment variables for the update, for example cloud credentials. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
    Image Image
    Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
    PreRunCommands []string
    Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
    Runtime WorkflowsRuntime
    Pool that runs the update.
    Timeout string
    Maximum run time of the update, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.
    directory string
    Directory of the stack project, relative to the repository root.
    source delivery_git_hub_source | delivery_git_lab_source | delivery_bitbucket_source | delivery_azure_dev_ops_source
    VCS source to check out. The update uses the commit of the run for this source.
    stack string
    Target stack as project/stack. It must exist before the first run, in the organization of the pipeline.
    config map(string)
    Config values that Delivery sets on the target stack before the update. Values are plain strings. Delivery rejects secret values. Keep secrets in the config file of the target stack or in an ESC environment.
    environment map(string)
    Environment variables for the update, for example cloud credentials. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
    image object
    Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
    pre_run_commands list(string)
    Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
    runtime delivery_workflows_runtime
    Pool that runs the update.
    timeout string
    Maximum run time of the update, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.
    directory String
    Directory of the stack project, relative to the repository root.
    source GitHubSource | GitLabSource | BitbucketSource | AzureDevOpsSource
    VCS source to check out. The update uses the commit of the run for this source.
    stack String
    Target stack as project/stack. It must exist before the first run, in the organization of the pipeline.
    config Map<String,String>
    Config values that Delivery sets on the target stack before the update. Values are plain strings. Delivery rejects secret values. Keep secrets in the config file of the target stack or in an ESC environment.
    environment Map<String,String>
    Environment variables for the update, for example cloud credentials. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
    image Image
    Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
    preRunCommands List<String>
    Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
    runtime WorkflowsRuntime
    Pool that runs the update.
    timeout String
    Maximum run time of the update, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.
    directory string
    Directory of the stack project, relative to the repository root.
    source GitHubSource | GitLabSource | BitbucketSource | AzureDevOpsSource
    VCS source to check out. The update uses the commit of the run for this source.
    stack string
    Target stack as project/stack. It must exist before the first run, in the organization of the pipeline.
    config {[key: string]: string}
    Config values that Delivery sets on the target stack before the update. Values are plain strings. Delivery rejects secret values. Keep secrets in the config file of the target stack or in an ESC environment.
    environment {[key: string]: string}
    Environment variables for the update, for example cloud credentials. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
    image Image
    Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
    preRunCommands string[]
    Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
    runtime WorkflowsRuntime
    Pool that runs the update.
    timeout string
    Maximum run time of the update, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.
    directory str
    Directory of the stack project, relative to the repository root.
    source GitHubSource | GitLabSource | BitbucketSource | AzureDevOpsSource
    VCS source to check out. The update uses the commit of the run for this source.
    stack str
    Target stack as project/stack. It must exist before the first run, in the organization of the pipeline.
    config Mapping[str, str]
    Config values that Delivery sets on the target stack before the update. Values are plain strings. Delivery rejects secret values. Keep secrets in the config file of the target stack or in an ESC environment.
    environment Mapping[str, str]
    Environment variables for the update, for example cloud credentials. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
    image Image
    Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
    pre_run_commands Sequence[str]
    Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
    runtime WorkflowsRuntime
    Pool that runs the update.
    timeout str
    Maximum run time of the update, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.
    directory String
    Directory of the stack project, relative to the repository root.
    source delivery:GitHubSource | delivery:GitLabSource | delivery:BitbucketSource | delivery:AzureDevOpsSource
    VCS source to check out. The update uses the commit of the run for this source.
    stack String
    Target stack as project/stack. It must exist before the first run, in the organization of the pipeline.
    config Map<String>
    Config values that Delivery sets on the target stack before the update. Values are plain strings. Delivery rejects secret values. Keep secrets in the config file of the target stack or in an ESC environment.
    environment Map<String>
    Environment variables for the update, for example cloud credentials. Secret values stay secret. The names PULUMI_ACCESS_TOKEN and PULUMI_BACKEND_URL, and all names that start with DELIVERY_, are reserved.
    image Property Map
    Container image that the member runs in. The default is the Pulumi image. Use it to pin the Pulumi CLI or language versions, for example pulumi/pulumi-nodejs:3.272.0. The image needs bash, curl, gzip and the Pulumi CLI on PATH.
    preRunCommands List<String>
    Bash commands that run in the project directory after the dependencies are installed and before the Pulumi command or the command of the job. Each command runs as its own step, so environment changes do not carry over to the next step.
    runtime delivery:WorkflowsRuntime
    Pool that runs the update.
    timeout String
    Maximum run time of the update, as a Go duration such as 30m. It must be from 5m to 24h in whole seconds. The default is 2h.

    Package Details

    Repository
    delivery pulumi/pulumi-delivery
    License
    Apache-2.0
    Pulumi Delivery
    Viewing docs for Pulumi Delivery v0.2.0
    published on Wednesday, Nov 18, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial