1. Packages
  2. Packages
  3. Pulumi Cloud (Pulumi Service provider)
  4. API Docs
  5. api
  6. api/stacks
  7. Stack

This provider is currently in preview.

Viewing docs for Pulumi Cloud v1.1.0
published on Thursday, May 21, 2026 by Pulumi
pulumiservice logo

This provider is currently in preview.

Viewing docs for Pulumi Cloud v1.1.0
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 stack
    • encryptedKey: 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)
    public Stack(String name, StackArgs args)
    public Stack(String name, StackArgs args, CustomResourceOptions options)
    
    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:

    OrgName string
    The organization name
    ProjectName string
    The project name
    StackName 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.
    Tags 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.
    OrgName string
    The organization name
    ProjectName string
    The project name
    StackName 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.
    Tags 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.
    tags 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.
    orgName String
    The organization name
    projectName String
    The project name
    stackName 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.
    tags 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.
    orgName string
    The organization name
    projectName string
    The project name
    stackName 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.
    tags {[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.
    tags 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.
    orgName String
    The organization name
    projectName String
    The project name
    stackName 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.
    tags 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:

    ActiveUpdate string
    The active update
    Id string
    The provider-assigned unique ID for this managed resource.
    Version int
    The version number
    CurrentOperation object
    CurrentOperation provides information about a stack operation in-progress, as applicable.
    ActiveUpdate string
    The active update
    Id string
    The provider-assigned unique ID for this managed resource.
    Version int
    The version number
    CurrentOperation 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.
    activeUpdate String
    The active update
    id String
    The provider-assigned unique ID for this managed resource.
    version Integer
    The version number
    currentOperation Object
    CurrentOperation provides information about a stack operation in-progress, as applicable.
    activeUpdate string
    The active update
    id string
    The provider-assigned unique ID for this managed resource.
    version number
    The version number
    currentOperation 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.
    activeUpdate String
    The active update
    id String
    The provider-assigned unique ID for this managed resource.
    version Number
    The version number
    currentOperation Any
    CurrentOperation provides information about a stack operation in-progress, as applicable.

    Package Details

    Repository
    pulumiservice pulumi/pulumi-pulumiservice
    License
    Apache-2.0
    pulumiservice logo

    This provider is currently in preview.

    Viewing docs for Pulumi Cloud v1.1.0
    published on Thursday, May 21, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial