This provider is currently in preview.
published on Thursday, May 21, 2026 by Pulumi
This provider is currently in preview.
published on Thursday, May 21, 2026 by Pulumi
Creates a new stack within a project in the organization. If the project does not exist, it will be created. A stack is an isolated, independently configurable instance of a Pulumi program, typically representing a deployment environment (e.g., development, staging, production). The stack name must be unique within the project.
The optional config object supports:
environment: reference to an ESC environment for storing stack configuration (must not already exist)secretsProvider: the secrets provider for the stackencryptedKey: KMS-encrypted ciphertext for the data key (cloud-based secrets providers only)encryptionSalt: base64-encoded encryption salt (passphrase-based secrets providers only)
Create Stack Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Stack(name: string, args: StackArgs, opts?: CustomResourceOptions);@overload
def Stack(resource_name: str,
args: StackArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Stack(resource_name: str,
opts: Optional[ResourceOptions] = None,
org_name: Optional[str] = None,
project_name: Optional[str] = None,
stack_name: Optional[str] = None,
config: Optional[Any] = None,
state: Optional[Any] = None,
tags: Optional[Mapping[str, Any]] = None,
teams: Optional[Sequence[str]] = None)func NewStack(ctx *Context, name string, args StackArgs, opts ...ResourceOption) (*Stack, error)public Stack(string name, StackArgs args, CustomResourceOptions? opts = null)type: pulumiservice:api/stacks:Stack
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "pulumiservice_api_stacks_stack" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args StackArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args StackArgs
- 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 StackArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StackArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args StackArgs
- 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 stackResource = new PulumiService.Api.Stacks.Stack("stackResource", new()
{
OrgName = "string",
ProjectName = "string",
StackName = "string",
Config = "any",
State = "any",
Tags =
{
{ "string", "any" },
},
Teams = new[]
{
"string",
},
});
example, err := stacks.NewStack(ctx, "stackResource", &stacks.StackArgs{
OrgName: pulumi.String("string"),
ProjectName: pulumi.String("string"),
StackName: pulumi.String("string"),
Config: pulumi.Any("any"),
State: pulumi.Any("any"),
Tags: pulumi.Map{
"string": pulumi.Any("any"),
},
Teams: pulumi.StringArray{
pulumi.String("string"),
},
})
resource "pulumiservice_api_stacks_stack" "stackResource" {
org_name = "string"
project_name = "string"
stack_name = "string"
config = "any"
state = "any"
tags = {
"string" = "any"
}
teams = ["string"]
}
var stackResource = new com.pulumi.pulumiservice.api.Stack("stackResource", com.pulumi.pulumiservice.api.StackArgs.builder()
.orgName("string")
.projectName("string")
.stackName("string")
.config("any")
.state("any")
.tags(Map.of("string", "any"))
.teams("string")
.build());
stack_resource = pulumiservice.api.stacks.Stack("stackResource",
org_name="string",
project_name="string",
stack_name="string",
config="any",
state="any",
tags={
"string": "any",
},
teams=["string"])
const stackResource = new pulumiservice.api.stacks.Stack("stackResource", {
orgName: "string",
projectName: "string",
stackName: "string",
config: "any",
state: "any",
tags: {
string: "any",
},
teams: ["string"],
});
type: pulumiservice:api/stacks:Stack
properties:
config: any
orgName: string
projectName: string
stackName: string
state: any
tags:
string: any
teams:
- string
Stack 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 Stack resource accepts the following input properties:
- Org
Name string - The organization name
- Project
Name string - The project name
- Stack
Name string - The name of the stack being created.
- Config object
- The configuration for the new stack.
- State object
- An optional state to initialize the stack with.
- Dictionary<string, object>
- An optional set of tags to apply to the stack.
- Teams List<string>
- An optional set of teams to assign to the stack.
- Org
Name string - The organization name
- Project
Name string - The project name
- Stack
Name string - The name of the stack being created.
- Config interface{}
- The configuration for the new stack.
- State interface{}
- An optional state to initialize the stack with.
- map[string]interface{}
- An optional set of tags to apply to the stack.
- Teams []string
- An optional set of teams to assign to the stack.
- org_
name string - The organization name
- project_
name string - The project name
- stack_
name string - The name of the stack being created.
- config any
- The configuration for the new stack.
- state any
- An optional state to initialize the stack with.
- map(any)
- An optional set of tags to apply to the stack.
- teams list(string)
- An optional set of teams to assign to the stack.
- org
Name String - The organization name
- project
Name String - The project name
- stack
Name String - The name of the stack being created.
- config Object
- The configuration for the new stack.
- state Object
- An optional state to initialize the stack with.
- Map<String,Object>
- An optional set of tags to apply to the stack.
- teams List<String>
- An optional set of teams to assign to the stack.
- org
Name string - The organization name
- project
Name string - The project name
- stack
Name string - The name of the stack being created.
- config any
- The configuration for the new stack.
- state any
- An optional state to initialize the stack with.
- {[key: string]: any}
- An optional set of tags to apply to the stack.
- teams string[]
- An optional set of teams to assign to the stack.
- org_
name str - The organization name
- project_
name str - The project name
- stack_
name str - The name of the stack being created.
- config Any
- The configuration for the new stack.
- state Any
- An optional state to initialize the stack with.
- Mapping[str, Any]
- An optional set of tags to apply to the stack.
- teams Sequence[str]
- An optional set of teams to assign to the stack.
- org
Name String - The organization name
- project
Name String - The project name
- stack
Name String - The name of the stack being created.
- config Any
- The configuration for the new stack.
- state Any
- An optional state to initialize the stack with.
- Map<Any>
- An optional set of tags to apply to the stack.
- teams List<String>
- An optional set of teams to assign to the stack.
Outputs
All input properties are implicitly available as output properties. Additionally, the Stack resource produces the following output properties:
- Active
Update string - The active update
- Id string
- The provider-assigned unique ID for this managed resource.
- Version int
- The version number
- Current
Operation object - CurrentOperation provides information about a stack operation in-progress, as applicable.
- Active
Update string - The active update
- Id string
- The provider-assigned unique ID for this managed resource.
- Version int
- The version number
- Current
Operation interface{} - CurrentOperation provides information about a stack operation in-progress, as applicable.
- active_
update string - The active update
- id string
- The provider-assigned unique ID for this managed resource.
- version number
- The version number
- current_
operation any - CurrentOperation provides information about a stack operation in-progress, as applicable.
- active
Update String - The active update
- id String
- The provider-assigned unique ID for this managed resource.
- version Integer
- The version number
- current
Operation Object - CurrentOperation provides information about a stack operation in-progress, as applicable.
- active
Update string - The active update
- id string
- The provider-assigned unique ID for this managed resource.
- version number
- The version number
- current
Operation any - CurrentOperation provides information about a stack operation in-progress, as applicable.
- active_
update str - The active update
- id str
- The provider-assigned unique ID for this managed resource.
- version int
- The version number
- current_
operation Any - CurrentOperation provides information about a stack operation in-progress, as applicable.
- active
Update String - The active update
- id String
- The provider-assigned unique ID for this managed resource.
- version Number
- The version number
- current
Operation Any - CurrentOperation provides information about a stack operation in-progress, as applicable.
Package Details
- Repository
- pulumiservice pulumi/pulumi-pulumiservice
- License
- Apache-2.0
This provider is currently in preview.
published on Thursday, May 21, 2026 by Pulumi