1. Registry
  2. Packages
  3. Pulumi Cloud (Pulumi Service provider)
  4. API Docs
  5. getStack
Viewing docs for Pulumi Cloud v1.8.0
published on Thursday, Nov 19, 2026 by Pulumi
pulumiservice logo pulumiservice logo
Viewing docs for Pulumi Cloud v1.8.0
published on Thursday, Nov 19, 2026 by Pulumi

    Looks up an existing stack in Pulumi Cloud. Use its stackId to scope role permissions to the stack with an id entity rule in buildRolePermissions.

    Using getStack

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getStack(args: GetStackArgs, opts?: InvokeOptions): Promise<GetStackResult>
    function getStackOutput(args: GetStackOutputArgs, opts?: InvokeOutputOptions): Output<GetStackResult>
    def get_stack(organization_name: Optional[str] = None,
                  project_name: Optional[str] = None,
                  stack_name: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetStackResult
    def get_stack_output(organization_name: pulumi.Input[Optional[str]] = None,
                  project_name: pulumi.Input[Optional[str]] = None,
                  stack_name: pulumi.Input[Optional[str]] = None,
                  opts: Optional[InvokeOutputOptions] = None) -> Output[GetStackResult]
    func LookupStack(ctx *Context, args *LookupStackArgs, opts ...InvokeOption) (*LookupStackResult, error)
    func LookupStackOutput(ctx *Context, args *LookupStackOutputArgs, opts ...InvokeOption) LookupStackResultOutput

    > Note: This function is named LookupStack in the Go SDK.

    public static class GetStack 
    {
        public static Task<GetStackResult> InvokeAsync(GetStackArgs args, InvokeOptions? opts = null)
        public static Output<GetStackResult> Invoke(GetStackInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetStackResult> Invoke(GetStackInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetStackResult> getStack(GetStackArgs args, InvokeOptions options)
    public static Output<GetStackResult> getStack(GetStackArgs args, InvokeOptions options)
    public static Output<GetStackResult> getStack(GetStackArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: pulumiservice:getStack
      arguments:
        # arguments dictionary
    data "pulumiservice_get_stack" "name" {
        # arguments
    }

    The following arguments are supported:

    OrganizationName string
    The Pulumi Cloud organization name.
    ProjectName string
    The project name.
    StackName string
    The stack name.
    OrganizationName string
    The Pulumi Cloud organization name.
    ProjectName string
    The project name.
    StackName string
    The stack name.
    organization_name string
    The Pulumi Cloud organization name.
    project_name string
    The project name.
    stack_name string
    The stack name.
    organizationName String
    The Pulumi Cloud organization name.
    projectName String
    The project name.
    stackName String
    The stack name.
    organizationName string
    The Pulumi Cloud organization name.
    projectName string
    The project name.
    stackName string
    The stack name.
    organization_name str
    The Pulumi Cloud organization name.
    project_name str
    The project name.
    stack_name str
    The stack name.
    organizationName String
    The Pulumi Cloud organization name.
    projectName String
    The project name.
    stackName String
    The stack name.

    getStack Result

    The following output properties are available:

    OrganizationName string
    The Pulumi Cloud organization name.
    ProjectName string
    The project name.
    StackId string
    The stack's unique Pulumi Cloud identifier, which is distinct from the organization/project/stack name.
    StackName string
    The stack name.
    Tags Dictionary<string, string>
    The stack's tags.
    OrganizationName string
    The Pulumi Cloud organization name.
    ProjectName string
    The project name.
    StackId string
    The stack's unique Pulumi Cloud identifier, which is distinct from the organization/project/stack name.
    StackName string
    The stack name.
    Tags map[string]string
    The stack's tags.
    organization_name string
    The Pulumi Cloud organization name.
    project_name string
    The project name.
    stack_id string
    The stack's unique Pulumi Cloud identifier, which is distinct from the organization/project/stack name.
    stack_name string
    The stack name.
    tags map(string)
    The stack's tags.
    organizationName String
    The Pulumi Cloud organization name.
    projectName String
    The project name.
    stackId String
    The stack's unique Pulumi Cloud identifier, which is distinct from the organization/project/stack name.
    stackName String
    The stack name.
    tags Map<String,String>
    The stack's tags.
    organizationName string
    The Pulumi Cloud organization name.
    projectName string
    The project name.
    stackId string
    The stack's unique Pulumi Cloud identifier, which is distinct from the organization/project/stack name.
    stackName string
    The stack name.
    tags {[key: string]: string}
    The stack's tags.
    organization_name str
    The Pulumi Cloud organization name.
    project_name str
    The project name.
    stack_id str
    The stack's unique Pulumi Cloud identifier, which is distinct from the organization/project/stack name.
    stack_name str
    The stack name.
    tags Mapping[str, str]
    The stack's tags.
    organizationName String
    The Pulumi Cloud organization name.
    projectName String
    The project name.
    stackId String
    The stack's unique Pulumi Cloud identifier, which is distinct from the organization/project/stack name.
    stackName String
    The stack name.
    tags Map<String>
    The stack's tags.

    Package Details

    Repository
    pulumiservice pulumi/pulumi-pulumiservice
    License
    Apache-2.0
    pulumiservice logo pulumiservice logo
    Viewing docs for Pulumi Cloud v1.8.0
    published on Thursday, Nov 19, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial