Show / Hide Table of Contents

Class GetStack

Inheritance
System.Object
GetStack
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.CloudFormation
Assembly: Pulumi.Aws.dll
Syntax
public static class GetStack

Methods

View Source

InvokeAsync(GetStackArgs, InvokeOptions)

The CloudFormation Stack data source allows access to stack outputs and other useful data including the template body.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var network = Output.Create(Aws.CloudFormation.GetStack.InvokeAsync(new Aws.CloudFormation.GetStackArgs
    {
        Name = "my-network-stack",
    }));
    var web = new Aws.Ec2.Instance("web", new Aws.Ec2.InstanceArgs
    {
        Ami = "ami-abb07bcb",
        InstanceType = "t1.micro",
        SubnetId = network.Apply(network => network.Outputs.SubnetId),
        Tags = 
        {
            { "Name", "HelloWorld" },
        },
    });
}

}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetStackResult> InvokeAsync(GetStackArgs args, InvokeOptions options = null)
Parameters
Type Name Description
GetStackArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetStackResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.