1. Packages
  2. Pulumi Cloud (Pulumi Service provider)
  3. API Docs
  4. Stack

This provider is currently in preview.

Pulumi Cloud v0.29.2 published on Thursday, Apr 10, 2025 by Pulumi

pulumiservice.Stack

Explore with Pulumi AI

This provider is currently in preview.

Pulumi Cloud v0.29.2 published on Thursday, Apr 10, 2025 by Pulumi

A stack is a collection of resources that share a common lifecycle. Stacks are uniquely identified by their name and the project they belong to.

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,
          organization_name: Optional[str] = None,
          project_name: Optional[str] = None,
          stack_name: Optional[str] = None,
          force_destroy: Optional[bool] = None)
func NewStack(ctx *Context, name string, args StackArgs, opts ...ResourceOption) (*Stack, error)
public Stack(string name, StackArgs args, CustomResourceOptions? opts = null)
public Stack(String name, StackArgs args)
public Stack(String name, StackArgs args, CustomResourceOptions options)
type: pulumiservice:Stack
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. StackArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. StackArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. StackArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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.Stack("stackResource", new()
{
    OrganizationName = "string",
    ProjectName = "string",
    StackName = "string",
    ForceDestroy = false,
});
Copy
example, err := pulumiservice.NewStack(ctx, "stackResource", &pulumiservice.StackArgs{
	OrganizationName: pulumi.String("string"),
	ProjectName:      pulumi.String("string"),
	StackName:        pulumi.String("string"),
	ForceDestroy:     pulumi.Bool(false),
})
Copy
var stackResource = new Stack("stackResource", StackArgs.builder()
    .organizationName("string")
    .projectName("string")
    .stackName("string")
    .forceDestroy(false)
    .build());
Copy
stack_resource = pulumiservice.Stack("stackResource",
    organization_name="string",
    project_name="string",
    stack_name="string",
    force_destroy=False)
Copy
const stackResource = new pulumiservice.Stack("stackResource", {
    organizationName: "string",
    projectName: "string",
    stackName: "string",
    forceDestroy: false,
});
Copy
type: pulumiservice:Stack
properties:
    forceDestroy: false
    organizationName: string
    projectName: string
    stackName: string
Copy

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:

OrganizationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the organization.
ProjectName
This property is required.
Changes to this property will trigger replacement.
string
The name of the project.
StackName
This property is required.
Changes to this property will trigger replacement.
string
The name of the stack.
ForceDestroy bool
Optional. Flag indicating whether to delete the stack even if it still contains resources.
OrganizationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the organization.
ProjectName
This property is required.
Changes to this property will trigger replacement.
string
The name of the project.
StackName
This property is required.
Changes to this property will trigger replacement.
string
The name of the stack.
ForceDestroy bool
Optional. Flag indicating whether to delete the stack even if it still contains resources.
organizationName
This property is required.
Changes to this property will trigger replacement.
String
The name of the organization.
projectName
This property is required.
Changes to this property will trigger replacement.
String
The name of the project.
stackName
This property is required.
Changes to this property will trigger replacement.
String
The name of the stack.
forceDestroy Boolean
Optional. Flag indicating whether to delete the stack even if it still contains resources.
organizationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the organization.
projectName
This property is required.
Changes to this property will trigger replacement.
string
The name of the project.
stackName
This property is required.
Changes to this property will trigger replacement.
string
The name of the stack.
forceDestroy boolean
Optional. Flag indicating whether to delete the stack even if it still contains resources.
organization_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the organization.
project_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the project.
stack_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the stack.
force_destroy bool
Optional. Flag indicating whether to delete the stack even if it still contains resources.
organizationName
This property is required.
Changes to this property will trigger replacement.
String
The name of the organization.
projectName
This property is required.
Changes to this property will trigger replacement.
String
The name of the project.
stackName
This property is required.
Changes to this property will trigger replacement.
String
The name of the stack.
forceDestroy Boolean
Optional. Flag indicating whether to delete the stack even if it still contains resources.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Package Details

Repository
pulumiservice pulumi/pulumi-pulumiservice
License
Apache-2.0

This provider is currently in preview.

Pulumi Cloud v0.29.2 published on Thursday, Apr 10, 2025 by Pulumi