1. Packages
  2. Cloudfoundry Provider
  3. API Docs
  4. getStack
cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community

cloudfoundry.getStack

Explore with Pulumi AI

cloudfoundry logo
cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community

    Gets information on a particular Cloud Foundry stack.

    Example Usage

    The following example looks up a stack named ‘my_custom_stack’.

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudfoundry from "@pulumi/cloudfoundry";
    
    const mystack = cloudfoundry.getStack({
        name: "my_custom_stack",
    });
    
    import pulumi
    import pulumi_cloudfoundry as cloudfoundry
    
    mystack = cloudfoundry.get_stack(name="my_custom_stack")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/cloudfoundry/cloudfoundry"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudfoundry.GetStack(ctx, &cloudfoundry.GetStackArgs{
    			Name: "my_custom_stack",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudfoundry = Pulumi.Cloudfoundry;
    
    return await Deployment.RunAsync(() => 
    {
        var mystack = Cloudfoundry.GetStack.Invoke(new()
        {
            Name = "my_custom_stack",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudfoundry.CloudfoundryFunctions;
    import com.pulumi.cloudfoundry.inputs.GetStackArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var mystack = CloudfoundryFunctions.getStack(GetStackArgs.builder()
                .name("my_custom_stack")
                .build());
    
        }
    }
    
    variables:
      mystack:
        fn::invoke:
          function: cloudfoundry:getStack
          arguments:
            name: my_custom_stack
    

    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?: InvokeOptions): Output<GetStackResult>
    def get_stack(annotations: Optional[Mapping[str, str]] = None,
                  id: Optional[str] = None,
                  labels: Optional[Mapping[str, str]] = None,
                  name: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetStackResult
    def get_stack_output(annotations: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                  id: Optional[pulumi.Input[str]] = None,
                  labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                  name: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetStackResult]
    func GetStack(ctx *Context, args *GetStackArgs, opts ...InvokeOption) (*GetStackResult, error)
    func GetStackOutput(ctx *Context, args *GetStackOutputArgs, opts ...InvokeOption) GetStackResultOutput

    > Note: This function is named GetStack 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 CompletableFuture<GetStackResult> getStack(GetStackArgs args, InvokeOptions options)
    public static Output<GetStackResult> getStack(GetStackArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudfoundry:index/getStack:getStack
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the stack to look up
    Annotations Dictionary<string, string>
    Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
    Id string
    The GUID of the stack
    Labels Dictionary<string, string>
    Map of labels as described here. Works only on cloud foundry with api >= v3.63.
    Name string
    The name of the stack to look up
    Annotations map[string]string
    Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
    Id string
    The GUID of the stack
    Labels map[string]string
    Map of labels as described here. Works only on cloud foundry with api >= v3.63.
    name String
    The name of the stack to look up
    annotations Map<String,String>
    Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
    id String
    The GUID of the stack
    labels Map<String,String>
    Map of labels as described here. Works only on cloud foundry with api >= v3.63.
    name string
    The name of the stack to look up
    annotations {[key: string]: string}
    Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
    id string
    The GUID of the stack
    labels {[key: string]: string}
    Map of labels as described here. Works only on cloud foundry with api >= v3.63.
    name str
    The name of the stack to look up
    annotations Mapping[str, str]
    Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
    id str
    The GUID of the stack
    labels Mapping[str, str]
    Map of labels as described here. Works only on cloud foundry with api >= v3.63.
    name String
    The name of the stack to look up
    annotations Map<String>
    Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
    id String
    The GUID of the stack
    labels Map<String>
    Map of labels as described here. Works only on cloud foundry with api >= v3.63.

    getStack Result

    The following output properties are available:

    Description string
    The description of the stack
    Id string
    The GUID of the stack
    Name string
    Annotations Dictionary<string, string>
    Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
    Labels Dictionary<string, string>
    Map of labels as described here. Works only on cloud foundry with api >= v3.63.
    Description string
    The description of the stack
    Id string
    The GUID of the stack
    Name string
    Annotations map[string]string
    Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
    Labels map[string]string
    Map of labels as described here. Works only on cloud foundry with api >= v3.63.
    description String
    The description of the stack
    id String
    The GUID of the stack
    name String
    annotations Map<String,String>
    Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
    labels Map<String,String>
    Map of labels as described here. Works only on cloud foundry with api >= v3.63.
    description string
    The description of the stack
    id string
    The GUID of the stack
    name string
    annotations {[key: string]: string}
    Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
    labels {[key: string]: string}
    Map of labels as described here. Works only on cloud foundry with api >= v3.63.
    description str
    The description of the stack
    id str
    The GUID of the stack
    name str
    annotations Mapping[str, str]
    Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
    labels Mapping[str, str]
    Map of labels as described here. Works only on cloud foundry with api >= v3.63.
    description String
    The description of the stack
    id String
    The GUID of the stack
    name String
    annotations Map<String>
    Map of annotations as described here. Works only on cloud foundry with api >= v3.63.
    labels Map<String>
    Map of labels as described here. Works only on cloud foundry with api >= v3.63.

    Package Details

    Repository
    cloudfoundry cloudfoundry-community/terraform-provider-cloudfoundry
    License
    Notes
    This Pulumi package is based on the cloudfoundry Terraform Provider.
    cloudfoundry logo
    cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community