published on Wednesday, Nov 18, 2026 by Pulumi
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)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 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.
- Maximum
Risk double - Largest permitted probability that the judgment is true, from zero to one.
- Instructions string
- Question instructions for Delivery's configured decision engine.
- Maximum
Risk 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.
- maximum
Risk Double - 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 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.
- maximum
Risk 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. Rule Kind - 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.
- 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
Dictionary<string, Decision
Question> - 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.
- 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 | Rule
Kind - 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.
- 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[string]Decision
Question - 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.
- 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 | "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 | Rule
Kind - 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.
- 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<String,Decision
Question> - 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.
- 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 | Rule
Kind - 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.
- 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
{[key: string]: Decision
Question} - 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.
- 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
str | Rule
Kind - 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, Decision
Question] - 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.
- 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<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.
- 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.
RuleKind, RuleKindArgs
Kind of a rule.| Name | Value |
|---|---|
| Approval | approval |
| Decision | decision |
| Http | http |
| Manual | manual |
| All | all |
| Any | any |
| Name | Value |
|---|---|
| Rule | approval |
| Rule | decision |
| Rule | http |
| Rule | manual |
| Rule | all |
| Rule | any |
| Value |
|---|
approval |
decision |
http |
manual |
all |
any |
| Name | Value |
|---|---|
| Approval | approval |
| Decision | decision |
| Http | http |
| Manual | manual |
| All | all |
| Any | any |
| Name | Value |
|---|---|
| Approval | approval |
| Decision | decision |
| Http | http |
| Manual | manual |
| All | all |
| Any | any |
| Name | Value |
|---|---|
| APPROVAL | approval |
| DECISION | decision |
| HTTP | http |
| MANUAL | manual |
| ALL | all |
| ANY | any |
| Value |
|---|
approval |
decision |
http |
manual |
all |
any |
Package Details
- Repository
- delivery pulumi/pulumi-delivery
- License
- Apache-2.0
published on Wednesday, Nov 18, 2026 by Pulumi