1. Registry
  2. Packages
  3. Pulumi Delivery
  4. API Docs
  5. Stage
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

    Declares a stage of the pipeline. The from stages set the order of promotion, and when adds an optional rule, such as an approval. A stage with several upstream stages waits until the same release converges in all of them.

    Example Usage

    import * as delivery from "@pulumi/delivery";
    
    const dev = new delivery.Stage("dev", { pipeline });
    new delivery.Stage("prod", {
        pipeline,
        from: [dev],
        when: delivery.approval({ approvers: ["your-username"] }),
    });
    

    Create Stage Resource

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

    Constructor syntax

    new Stage(name: string, args: StageArgs, opts?: ComponentResourceOptions);
    @overload
    def Stage(resource_name: str,
              args: StageArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Stage(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              pipeline: Optional[Pipeline] = None,
              from_: Optional[Sequence[Stage]] = None,
              when: Optional[RuleArgs] = None)
    func NewStage(ctx *Context, name string, args StageArgs, opts ...ResourceOption) (*Stage, error)
    public Stage(string name, StageArgs args, ComponentResourceOptions? opts = null)
    public Stage(String name, StageArgs args)
    public Stage(String name, StageArgs args, ComponentResourceOptions options)
    
    type: delivery:Stage
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "delivery_stage" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args StageArgs
    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 StageArgs
    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 StageArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StageArgs
    The arguments to resource properties.
    opts ComponentResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StageArgs
    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 stageResource = new Delivery.Stage("stageResource", new()
    {
        Pipeline = pipeline,
        From = new[]
        {
            stage,
        },
        When = new Delivery.Inputs.RuleArgs
        {
            Kind = "string",
            Description = "string",
            Questions = 
            {
                { "string", new Delivery.Inputs.DecisionQuestionArgs
                {
                    Instructions = "string",
                    MaximumRisk = 0.0,
                } },
            },
            Count = 0,
            Approvers = new[]
            {
                "string",
            },
            Headers = 
            {
                { "string", "string" },
            },
            HeadersEnvironment = "string",
            Context = 
            {
                { "string", "any" },
            },
            Method = "string",
            Interval = "string",
            Name = "string",
            Body = "string",
            Rules = new[]
            {
                rule,
            },
            SuccessExpression = "string",
            Timeout = "string",
            Url = "string",
        },
    });
    
    example, err := delivery.NewStage(ctx, "stageResource", &delivery.StageArgs{
    	Pipeline: pulumi.Any(pipeline),
    	From: delivery.StageArray{
    		stage,
    	},
    	When: &delivery.RuleArgs{
    		Kind:        pulumi.String("string"),
    		Description: pulumi.String("string"),
    		Questions: delivery.DecisionQuestionMap{
    			"string": &delivery.DecisionQuestionArgs{
    				Instructions: pulumi.String("string"),
    				MaximumRisk:  pulumi.Float64(0),
    			},
    		},
    		Count: pulumi.Int(0),
    		Approvers: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Headers: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		HeadersEnvironment: pulumi.String("string"),
    		Context: pulumi.Map{
    			"string": pulumi.Any("any"),
    		},
    		Method:   pulumi.String("string"),
    		Interval: pulumi.String("string"),
    		Name:     pulumi.String("string"),
    		Body:     pulumi.String("string"),
    		Rules: delivery.RuleArray{
    			rule,
    		},
    		SuccessExpression: pulumi.String("string"),
    		Timeout:           pulumi.String("string"),
    		Url:               pulumi.String("string"),
    	},
    })
    
    resource "delivery_stage" "stageResource" {
      lifecycle {
        create_before_destroy = true
      }
      pipeline = pipeline
      from     = [stage]
      when = {
        kind        = "string"
        description = "string"
        questions = {
          "string" = {
            instructions = "string"
            maximum_risk = 0
          }
        }
        count     = 0
        approvers = ["string"]
        headers = {
          "string" = "string"
        }
        headers_environment = "string"
        context = {
          "string" = "any"
        }
        method             = "string"
        interval           = "string"
        name               = "string"
        body               = "string"
        rules              = [rule]
        success_expression = "string"
        timeout            = "string"
        url                = "string"
      }
    }
    
    var stageResource = new Stage("stageResource", StageArgs.builder()
        .pipeline(pipeline)
        .from(stage)
        .when(RuleArgs.builder()
            .kind("string")
            .description("string")
            .questions(Map.of("string", DecisionQuestionArgs.builder()
                .instructions("string")
                .maximumRisk(0.0)
                .build()))
            .count(0)
            .approvers("string")
            .headers(Map.of("string", "string"))
            .headersEnvironment("string")
            .context(Map.of("string", "any"))
            .method("string")
            .interval("string")
            .name("string")
            .body("string")
            .rules(rule)
            .successExpression("string")
            .timeout("string")
            .url("string")
            .build())
        .build());
    
    stage_resource = delivery.Stage("stageResource",
        pipeline=pipeline,
        from_=[stage],
        when={
            "kind": "string",
            "description": "string",
            "questions": {
                "string": {
                    "instructions": "string",
                    "maximum_risk": float(0),
                },
            },
            "count": 0,
            "approvers": ["string"],
            "headers": {
                "string": "string",
            },
            "headers_environment": "string",
            "context": {
                "string": "any",
            },
            "method": "string",
            "interval": "string",
            "name": "string",
            "body": "string",
            "rules": [rule],
            "success_expression": "string",
            "timeout": "string",
            "url": "string",
        })
    
    const stageResource = new delivery.Stage("stageResource", {
        pipeline: pipeline,
        from: [stage],
        when: {
            kind: "string",
            description: "string",
            questions: {
                string: {
                    instructions: "string",
                    maximumRisk: 0,
                },
            },
            count: 0,
            approvers: ["string"],
            headers: {
                string: "string",
            },
            headersEnvironment: "string",
            context: {
                string: "any",
            },
            method: "string",
            interval: "string",
            name: "string",
            body: "string",
            rules: [rule],
            successExpression: "string",
            timeout: "string",
            url: "string",
        },
    });
    
    type: delivery:Stage
    properties:
        from:
            - ${stage}
        pipeline: ${pipeline}
        when:
            approvers:
                - string
            body: string
            context:
                string: any
            count: 0
            description: string
            headers:
                string: string
            headersEnvironment: string
            interval: string
            kind: string
            method: string
            name: string
            questions:
                string:
                    instructions: string
                    maximumRisk: 0
            rules:
                - ${rule}
            successExpression: string
            timeout: string
            url: string
    

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

    Pipeline Pulumi.Delivery.Pipeline
    Pipeline that the stage belongs to.
    From List<Pulumi.Delivery.Stage>
    Upstream stages. Omit for an entry stage.
    When Rule
    Optional rule that must pass before the release enters this stage.
    Pipeline Pipeline
    Pipeline that the stage belongs to.
    From []*Stage
    Upstream stages. Omit for an entry stage.
    When RuleArgs
    Optional rule that must pass before the release enters this stage.
    pipeline delivery_pipeline
    Pipeline that the stage belongs to.
    from list(delivery_stage)
    Upstream stages. Omit for an entry stage.
    when object
    Optional rule that must pass before the release enters this stage.
    pipeline Pipeline
    Pipeline that the stage belongs to.
    from List<Stage>
    Upstream stages. Omit for an entry stage.
    when Rule
    Optional rule that must pass before the release enters this stage.
    pipeline Pipeline
    Pipeline that the stage belongs to.
    from Stage[]
    Upstream stages. Omit for an entry stage.
    when Rule
    Optional rule that must pass before the release enters this stage.
    pipeline Pipeline
    Pipeline that the stage belongs to.
    from_ Sequence[Stage]
    Upstream stages. Omit for an entry stage.
    when RuleArgs
    Optional rule that must pass before the release enters this stage.
    pipeline delivery:Pipeline
    Pipeline that the stage belongs to.
    from List<delivery:Stage>
    Upstream stages. Omit for an entry stage.
    when Property Map
    Optional rule that must pass before the release enters this stage.

    Outputs

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

    Supporting Types

    DecisionQuestion, DecisionQuestionArgs

    One narrow judgment in a decision rule.
    Instructions string
    Question instructions for Delivery's configured decision engine.
    MaximumRisk double
    Largest permitted probability that the judgment is true, from zero to one.
    Instructions string
    Question instructions for Delivery's configured decision engine.
    MaximumRisk float64
    Largest permitted probability that the judgment is true, from zero to one.
    instructions string
    Question instructions for Delivery's configured decision engine.
    maximum_risk number
    Largest permitted probability that the judgment is true, from zero to one.
    instructions String
    Question instructions for Delivery's configured decision engine.
    maximumRisk Double
    Largest permitted probability that the judgment is true, from zero to one.
    instructions string
    Question instructions for Delivery's configured decision engine.
    maximumRisk number
    Largest permitted probability that the judgment is true, from zero to one.
    instructions str
    Question instructions for Delivery's configured decision engine.
    maximum_risk float
    Largest permitted probability that the judgment is true, from zero to one.
    instructions String
    Question instructions for Delivery's configured decision engine.
    maximumRisk Number
    Largest permitted probability that the judgment is true, from zero to one.

    Rule, RuleArgs

    Rule that a release must pass to enter a stage. A rule can contain other rules, up to three levels deep.
    Kind string | Pulumi.Delivery.RuleKind
    Kind of the rule. Valid values are approval, decision, http, manual, all, and any.
    Approvers List<string>
    Pulumi usernames or team names in the organization. If the list is empty, anyone with the pipeline:approve permission on the pipeline stack can approve.
    Body string
    HTTP request body. Secret values stay secret.
    Context Dictionary<string, object>
    Optional JSON-like context for a decision rule. Delivery rejects secret values and limits its encoded size to 16 KiB. Do not use it for credentials or other secrets.
    Count int
    Number of approvals required. If you omit it or set it to zero, one approval is required. Applies to approval rules.
    Description string
    Text for the person who continues a manual gate, for example what to check first.
    Headers Dictionary<string, string>
    HTTP request headers. Secret values stay secret.
    HeadersEnvironment string
    Name of an ESC environment that exports values.headers. Delivery sends these headers first, then the headers of the rule.
    Interval string
    Time between HTTP requests, as a Go duration, such as 1m. Use a whole number of seconds. The minimum is 60 seconds.
    Method string
    HTTP request method. The default is GET.
    Name string
    Rule name. Omit it to let Delivery assign one.
    Questions Dictionary<string, DecisionQuestion>
    Named judgments and their deterministic risk thresholds for a decision rule.
    Rules List<Rule>
    Child rules for all and any rules. At least one is required.
    SuccessExpression string
    JMESPath expression that Delivery evaluates on the status, headers and body of the HTTP response. The rule passes when the result is true. Required for http rules.
    Timeout string
    Timeout of each HTTP request, as a Go duration, such as 10s. Use a whole number of seconds from 1 to 20.
    Url string
    URL to call. Required for http rules.
    Kind string | RuleKind
    Kind of the rule. Valid values are approval, decision, http, manual, all, and any.
    Approvers []string
    Pulumi usernames or team names in the organization. If the list is empty, anyone with the pipeline:approve permission on the pipeline stack can approve.
    Body string
    HTTP request body. Secret values stay secret.
    Context map[string]interface{}
    Optional JSON-like context for a decision rule. Delivery rejects secret values and limits its encoded size to 16 KiB. Do not use it for credentials or other secrets.
    Count int
    Number of approvals required. If you omit it or set it to zero, one approval is required. Applies to approval rules.
    Description string
    Text for the person who continues a manual gate, for example what to check first.
    Headers map[string]string
    HTTP request headers. Secret values stay secret.
    HeadersEnvironment string
    Name of an ESC environment that exports values.headers. Delivery sends these headers first, then the headers of the rule.
    Interval string
    Time between HTTP requests, as a Go duration, such as 1m. Use a whole number of seconds. The minimum is 60 seconds.
    Method string
    HTTP request method. The default is GET.
    Name string
    Rule name. Omit it to let Delivery assign one.
    Questions map[string]DecisionQuestion
    Named judgments and their deterministic risk thresholds for a decision rule.
    Rules []Rule
    Child rules for all and any rules. At least one is required.
    SuccessExpression string
    JMESPath expression that Delivery evaluates on the status, headers and body of the HTTP response. The rule passes when the result is true. Required for http rules.
    Timeout string
    Timeout of each HTTP request, as a Go duration, such as 10s. Use a whole number of seconds from 1 to 20.
    Url string
    URL to call. Required for http rules.
    kind string | "approval" | "decision" | "http" | "manual" | "all" | "any"
    Kind of the rule. Valid values are approval, decision, http, manual, all, and any.
    approvers list(string)
    Pulumi usernames or team names in the organization. If the list is empty, anyone with the pipeline:approve permission on the pipeline stack can approve.
    body string
    HTTP request body. Secret values stay secret.
    context map(any)
    Optional JSON-like context for a decision rule. Delivery rejects secret values and limits its encoded size to 16 KiB. Do not use it for credentials or other secrets.
    count number
    Number of approvals required. If you omit it or set it to zero, one approval is required. Applies to approval rules.
    description string
    Text for the person who continues a manual gate, for example what to check first.
    headers map(string)
    HTTP request headers. Secret values stay secret.
    headers_environment string
    Name of an ESC environment that exports values.headers. Delivery sends these headers first, then the headers of the rule.
    interval string
    Time between HTTP requests, as a Go duration, such as 1m. Use a whole number of seconds. The minimum is 60 seconds.
    method string
    HTTP request method. The default is GET.
    name string
    Rule name. Omit it to let Delivery assign one.
    questions map(object)
    Named judgments and their deterministic risk thresholds for a decision rule.
    rules list(object)
    Child rules for all and any rules. At least one is required.
    success_expression string
    JMESPath expression that Delivery evaluates on the status, headers and body of the HTTP response. The rule passes when the result is true. Required for http rules.
    timeout string
    Timeout of each HTTP request, as a Go duration, such as 10s. Use a whole number of seconds from 1 to 20.
    url string
    URL to call. Required for http rules.
    kind String | RuleKind
    Kind of the rule. Valid values are approval, decision, http, manual, all, and any.
    approvers List<String>
    Pulumi usernames or team names in the organization. If the list is empty, anyone with the pipeline:approve permission on the pipeline stack can approve.
    body String
    HTTP request body. Secret values stay secret.
    context Map<String,Object>
    Optional JSON-like context for a decision rule. Delivery rejects secret values and limits its encoded size to 16 KiB. Do not use it for credentials or other secrets.
    count Integer
    Number of approvals required. If you omit it or set it to zero, one approval is required. Applies to approval rules.
    description String
    Text for the person who continues a manual gate, for example what to check first.
    headers Map<String,String>
    HTTP request headers. Secret values stay secret.
    headersEnvironment String
    Name of an ESC environment that exports values.headers. Delivery sends these headers first, then the headers of the rule.
    interval String
    Time between HTTP requests, as a Go duration, such as 1m. Use a whole number of seconds. The minimum is 60 seconds.
    method String
    HTTP request method. The default is GET.
    name String
    Rule name. Omit it to let Delivery assign one.
    questions Map<String,DecisionQuestion>
    Named judgments and their deterministic risk thresholds for a decision rule.
    rules List<Rule>
    Child rules for all and any rules. At least one is required.
    successExpression String
    JMESPath expression that Delivery evaluates on the status, headers and body of the HTTP response. The rule passes when the result is true. Required for http rules.
    timeout String
    Timeout of each HTTP request, as a Go duration, such as 10s. Use a whole number of seconds from 1 to 20.
    url String
    URL to call. Required for http rules.
    kind string | RuleKind
    Kind of the rule. Valid values are approval, decision, http, manual, all, and any.
    approvers string[]
    Pulumi usernames or team names in the organization. If the list is empty, anyone with the pipeline:approve permission on the pipeline stack can approve.
    body string
    HTTP request body. Secret values stay secret.
    context {[key: string]: any}
    Optional JSON-like context for a decision rule. Delivery rejects secret values and limits its encoded size to 16 KiB. Do not use it for credentials or other secrets.
    count number
    Number of approvals required. If you omit it or set it to zero, one approval is required. Applies to approval rules.
    description string
    Text for the person who continues a manual gate, for example what to check first.
    headers {[key: string]: string}
    HTTP request headers. Secret values stay secret.
    headersEnvironment string
    Name of an ESC environment that exports values.headers. Delivery sends these headers first, then the headers of the rule.
    interval string
    Time between HTTP requests, as a Go duration, such as 1m. Use a whole number of seconds. The minimum is 60 seconds.
    method string
    HTTP request method. The default is GET.
    name string
    Rule name. Omit it to let Delivery assign one.
    questions {[key: string]: DecisionQuestion}
    Named judgments and their deterministic risk thresholds for a decision rule.
    rules Rule[]
    Child rules for all and any rules. At least one is required.
    successExpression string
    JMESPath expression that Delivery evaluates on the status, headers and body of the HTTP response. The rule passes when the result is true. Required for http rules.
    timeout string
    Timeout of each HTTP request, as a Go duration, such as 10s. Use a whole number of seconds from 1 to 20.
    url string
    URL to call. Required for http rules.
    kind str | RuleKind
    Kind of the rule. Valid values are approval, decision, http, manual, all, and any.
    approvers Sequence[str]
    Pulumi usernames or team names in the organization. If the list is empty, anyone with the pipeline:approve permission on the pipeline stack can approve.
    body str
    HTTP request body. Secret values stay secret.
    context Mapping[str, Any]
    Optional JSON-like context for a decision rule. Delivery rejects secret values and limits its encoded size to 16 KiB. Do not use it for credentials or other secrets.
    count int
    Number of approvals required. If you omit it or set it to zero, one approval is required. Applies to approval rules.
    description str
    Text for the person who continues a manual gate, for example what to check first.
    headers Mapping[str, str]
    HTTP request headers. Secret values stay secret.
    headers_environment str
    Name of an ESC environment that exports values.headers. Delivery sends these headers first, then the headers of the rule.
    interval str
    Time between HTTP requests, as a Go duration, such as 1m. Use a whole number of seconds. The minimum is 60 seconds.
    method str
    HTTP request method. The default is GET.
    name str
    Rule name. Omit it to let Delivery assign one.
    questions Mapping[str, DecisionQuestion]
    Named judgments and their deterministic risk thresholds for a decision rule.
    rules Sequence[Rule]
    Child rules for all and any rules. At least one is required.
    success_expression str
    JMESPath expression that Delivery evaluates on the status, headers and body of the HTTP response. The rule passes when the result is true. Required for http rules.
    timeout str
    Timeout of each HTTP request, as a Go duration, such as 10s. Use a whole number of seconds from 1 to 20.
    url str
    URL to call. Required for http rules.
    kind String | "approval" | "decision" | "http" | "manual" | "all" | "any"
    Kind of the rule. Valid values are approval, decision, http, manual, all, and any.
    approvers List<String>
    Pulumi usernames or team names in the organization. If the list is empty, anyone with the pipeline:approve permission on the pipeline stack can approve.
    body String
    HTTP request body. Secret values stay secret.
    context Map<Any>
    Optional JSON-like context for a decision rule. Delivery rejects secret values and limits its encoded size to 16 KiB. Do not use it for credentials or other secrets.
    count Number
    Number of approvals required. If you omit it or set it to zero, one approval is required. Applies to approval rules.
    description String
    Text for the person who continues a manual gate, for example what to check first.
    headers Map<String>
    HTTP request headers. Secret values stay secret.
    headersEnvironment String
    Name of an ESC environment that exports values.headers. Delivery sends these headers first, then the headers of the rule.
    interval String
    Time between HTTP requests, as a Go duration, such as 1m. Use a whole number of seconds. The minimum is 60 seconds.
    method String
    HTTP request method. The default is GET.
    name String
    Rule name. Omit it to let Delivery assign one.
    questions Map<Property Map>
    Named judgments and their deterministic risk thresholds for a decision rule.
    rules List<Property Map>
    Child rules for all and any rules. At least one is required.
    successExpression String
    JMESPath expression that Delivery evaluates on the status, headers and body of the HTTP response. The rule passes when the result is true. Required for http rules.
    timeout String
    Timeout of each HTTP request, as a Go duration, such as 10s. Use a whole number of seconds from 1 to 20.
    url String
    URL to call. Required for http rules.

    RuleKind, RuleKindArgs

    Kind of a rule.
    NameValue
    Approvalapproval
    Decisiondecision
    Httphttp
    Manualmanual
    Allall
    Anyany
    NameValue
    RuleKindApprovalapproval
    RuleKindDecisiondecision
    RuleKindHttphttp
    RuleKindManualmanual
    RuleKindAllall
    RuleKindAnyany
    Value
    approval
    decision
    http
    manual
    all
    any
    NameValue
    Approvalapproval
    Decisiondecision
    Httphttp
    Manualmanual
    Allall
    Anyany
    NameValue
    Approvalapproval
    Decisiondecision
    Httphttp
    Manualmanual
    Allall
    Anyany
    NameValue
    APPROVALapproval
    DECISIONdecision
    HTTPhttp
    MANUALmanual
    ALLall
    ANYany
    Value
    approval
    decision
    http
    manual
    all
    any

    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