1. Packages
  2. AWS
  3. API Docs
  4. cloudformation
  5. Stack
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.cloudformation.Stack

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides a CloudFormation Stack resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const network = new aws.cloudformation.Stack("network", {
        name: "networking-stack",
        parameters: {
            VPCCidr: "10.0.0.0/16",
        },
        templateBody: JSON.stringify({
            Parameters: {
                VPCCidr: {
                    Type: "String",
                    Default: "10.0.0.0/16",
                    Description: "Enter the CIDR block for the VPC. Default is 10.0.0.0/16.",
                },
            },
            Resources: {
                myVpc: {
                    Type: "AWS::EC2::VPC",
                    Properties: {
                        CidrBlock: {
                            Ref: "VPCCidr",
                        },
                        Tags: [{
                            Key: "Name",
                            Value: "Primary_CF_VPC",
                        }],
                    },
                },
            },
        }),
    });
    
    import pulumi
    import json
    import pulumi_aws as aws
    
    network = aws.cloudformation.Stack("network",
        name="networking-stack",
        parameters={
            "VPCCidr": "10.0.0.0/16",
        },
        template_body=json.dumps({
            "Parameters": {
                "VPCCidr": {
                    "Type": "String",
                    "Default": "10.0.0.0/16",
                    "Description": "Enter the CIDR block for the VPC. Default is 10.0.0.0/16.",
                },
            },
            "Resources": {
                "myVpc": {
                    "Type": "AWS::EC2::VPC",
                    "Properties": {
                        "CidrBlock": {
                            "Ref": "VPCCidr",
                        },
                        "Tags": [{
                            "Key": "Name",
                            "Value": "Primary_CF_VPC",
                        }],
                    },
                },
            },
        }))
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudformation"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"Parameters": map[string]interface{}{
    				"VPCCidr": map[string]interface{}{
    					"Type":        "String",
    					"Default":     "10.0.0.0/16",
    					"Description": "Enter the CIDR block for the VPC. Default is 10.0.0.0/16.",
    				},
    			},
    			"Resources": map[string]interface{}{
    				"myVpc": map[string]interface{}{
    					"Type": "AWS::EC2::VPC",
    					"Properties": map[string]interface{}{
    						"CidrBlock": map[string]interface{}{
    							"Ref": "VPCCidr",
    						},
    						"Tags": []map[string]interface{}{
    							map[string]interface{}{
    								"Key":   "Name",
    								"Value": "Primary_CF_VPC",
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = cloudformation.NewStack(ctx, "network", &cloudformation.StackArgs{
    			Name: pulumi.String("networking-stack"),
    			Parameters: pulumi.StringMap{
    				"VPCCidr": pulumi.String("10.0.0.0/16"),
    			},
    			TemplateBody: pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var network = new Aws.CloudFormation.Stack("network", new()
        {
            Name = "networking-stack",
            Parameters = 
            {
                { "VPCCidr", "10.0.0.0/16" },
            },
            TemplateBody = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["Parameters"] = new Dictionary<string, object?>
                {
                    ["VPCCidr"] = new Dictionary<string, object?>
                    {
                        ["Type"] = "String",
                        ["Default"] = "10.0.0.0/16",
                        ["Description"] = "Enter the CIDR block for the VPC. Default is 10.0.0.0/16.",
                    },
                },
                ["Resources"] = new Dictionary<string, object?>
                {
                    ["myVpc"] = new Dictionary<string, object?>
                    {
                        ["Type"] = "AWS::EC2::VPC",
                        ["Properties"] = new Dictionary<string, object?>
                        {
                            ["CidrBlock"] = new Dictionary<string, object?>
                            {
                                ["Ref"] = "VPCCidr",
                            },
                            ["Tags"] = new[]
                            {
                                new Dictionary<string, object?>
                                {
                                    ["Key"] = "Name",
                                    ["Value"] = "Primary_CF_VPC",
                                },
                            },
                        },
                    },
                },
            }),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.cloudformation.Stack;
    import com.pulumi.aws.cloudformation.StackArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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) {
            var network = new Stack("network", StackArgs.builder()
                .name("networking-stack")
                .parameters(Map.of("VPCCidr", "10.0.0.0/16"))
                .templateBody(serializeJson(
                    jsonObject(
                        jsonProperty("Parameters", jsonObject(
                            jsonProperty("VPCCidr", jsonObject(
                                jsonProperty("Type", "String"),
                                jsonProperty("Default", "10.0.0.0/16"),
                                jsonProperty("Description", "Enter the CIDR block for the VPC. Default is 10.0.0.0/16.")
                            ))
                        )),
                        jsonProperty("Resources", jsonObject(
                            jsonProperty("myVpc", jsonObject(
                                jsonProperty("Type", "AWS::EC2::VPC"),
                                jsonProperty("Properties", jsonObject(
                                    jsonProperty("CidrBlock", jsonObject(
                                        jsonProperty("Ref", "VPCCidr")
                                    )),
                                    jsonProperty("Tags", jsonArray(jsonObject(
                                        jsonProperty("Key", "Name"),
                                        jsonProperty("Value", "Primary_CF_VPC")
                                    )))
                                ))
                            ))
                        ))
                    )))
                .build());
    
        }
    }
    
    resources:
      network:
        type: aws:cloudformation:Stack
        properties:
          name: networking-stack
          parameters:
            VPCCidr: 10.0.0.0/16
          templateBody:
            fn::toJSON:
              Parameters:
                VPCCidr:
                  Type: String
                  Default: 10.0.0.0/16
                  Description: Enter the CIDR block for the VPC. Default is 10.0.0.0/16.
              Resources:
                myVpc:
                  Type: AWS::EC2::VPC
                  Properties:
                    CidrBlock:
                      Ref: VPCCidr
                    Tags:
                      - Key: Name
                        Value: Primary_CF_VPC
    

    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: Optional[StackArgs] = None,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Stack(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              capabilities: Optional[Sequence[str]] = None,
              disable_rollback: Optional[bool] = None,
              iam_role_arn: Optional[str] = None,
              name: Optional[str] = None,
              notification_arns: Optional[Sequence[str]] = None,
              on_failure: Optional[str] = None,
              parameters: Optional[Mapping[str, str]] = None,
              policy_body: Optional[str] = None,
              policy_url: Optional[str] = None,
              tags: Optional[Mapping[str, str]] = None,
              template_body: Optional[str] = None,
              template_url: Optional[str] = None,
              timeout_in_minutes: Optional[int] = None)
    func NewStack(ctx *Context, name string, args *StackArgs, opts ...ResourceOption) (*Stack, error)
    public Stack(string name, StackArgs? args = null, CustomResourceOptions? opts = null)
    public Stack(String name, StackArgs args)
    public Stack(String name, StackArgs args, CustomResourceOptions options)
    
    type: aws:cloudformation:Stack
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    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 awsStackResource = new Aws.CloudFormation.Stack("awsStackResource", new()
    {
        Capabilities = new[]
        {
            "string",
        },
        DisableRollback = false,
        IamRoleArn = "string",
        Name = "string",
        NotificationArns = new[]
        {
            "string",
        },
        OnFailure = "string",
        Parameters = 
        {
            { "string", "string" },
        },
        PolicyBody = "string",
        PolicyUrl = "string",
        Tags = 
        {
            { "string", "string" },
        },
        TemplateBody = "string",
        TemplateUrl = "string",
        TimeoutInMinutes = 0,
    });
    
    example, err := cloudformation.NewStack(ctx, "awsStackResource", &cloudformation.StackArgs{
    	Capabilities: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	DisableRollback: pulumi.Bool(false),
    	IamRoleArn:      pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	NotificationArns: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	OnFailure: pulumi.String("string"),
    	Parameters: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	PolicyBody: pulumi.String("string"),
    	PolicyUrl:  pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TemplateBody:     pulumi.String("string"),
    	TemplateUrl:      pulumi.String("string"),
    	TimeoutInMinutes: pulumi.Int(0),
    })
    
    var awsStackResource = new Stack("awsStackResource", StackArgs.builder()
        .capabilities("string")
        .disableRollback(false)
        .iamRoleArn("string")
        .name("string")
        .notificationArns("string")
        .onFailure("string")
        .parameters(Map.of("string", "string"))
        .policyBody("string")
        .policyUrl("string")
        .tags(Map.of("string", "string"))
        .templateBody("string")
        .templateUrl("string")
        .timeoutInMinutes(0)
        .build());
    
    aws_stack_resource = aws.cloudformation.Stack("awsStackResource",
        capabilities=["string"],
        disable_rollback=False,
        iam_role_arn="string",
        name="string",
        notification_arns=["string"],
        on_failure="string",
        parameters={
            "string": "string",
        },
        policy_body="string",
        policy_url="string",
        tags={
            "string": "string",
        },
        template_body="string",
        template_url="string",
        timeout_in_minutes=0)
    
    const awsStackResource = new aws.cloudformation.Stack("awsStackResource", {
        capabilities: ["string"],
        disableRollback: false,
        iamRoleArn: "string",
        name: "string",
        notificationArns: ["string"],
        onFailure: "string",
        parameters: {
            string: "string",
        },
        policyBody: "string",
        policyUrl: "string",
        tags: {
            string: "string",
        },
        templateBody: "string",
        templateUrl: "string",
        timeoutInMinutes: 0,
    });
    
    type: aws:cloudformation:Stack
    properties:
        capabilities:
            - string
        disableRollback: false
        iamRoleArn: string
        name: string
        notificationArns:
            - string
        onFailure: string
        parameters:
            string: string
        policyBody: string
        policyUrl: string
        tags:
            string: string
        templateBody: string
        templateUrl: string
        timeoutInMinutes: 0
    

    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:

    Capabilities List<string>
    A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND
    DisableRollback bool
    Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.
    IamRoleArn string
    The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
    Name string
    Stack name.
    NotificationArns List<string>
    A list of SNS topic ARNs to publish stack related events.
    OnFailure string
    Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.
    Parameters Dictionary<string, string>
    A map of Parameter structures that specify input parameters for the stack.
    PolicyBody string
    Structure containing the stack policy body. Conflicts w/ policy_url.
    PolicyUrl string
    Location of a file containing the stack policy. Conflicts w/ policy_body.
    Tags Dictionary<string, string>
    Map of resource tags to associate with this stack. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TemplateBody string
    Structure containing the template body (max size: 51,200 bytes).
    TemplateUrl string
    Location of a file containing the template body (max size: 460,800 bytes).
    TimeoutInMinutes int
    The amount of time that can pass before the stack status becomes CREATE_FAILED.
    Capabilities []string
    A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND
    DisableRollback bool
    Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.
    IamRoleArn string
    The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
    Name string
    Stack name.
    NotificationArns []string
    A list of SNS topic ARNs to publish stack related events.
    OnFailure string
    Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.
    Parameters map[string]string
    A map of Parameter structures that specify input parameters for the stack.
    PolicyBody string
    Structure containing the stack policy body. Conflicts w/ policy_url.
    PolicyUrl string
    Location of a file containing the stack policy. Conflicts w/ policy_body.
    Tags map[string]string
    Map of resource tags to associate with this stack. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TemplateBody string
    Structure containing the template body (max size: 51,200 bytes).
    TemplateUrl string
    Location of a file containing the template body (max size: 460,800 bytes).
    TimeoutInMinutes int
    The amount of time that can pass before the stack status becomes CREATE_FAILED.
    capabilities List<String>
    A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND
    disableRollback Boolean
    Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.
    iamRoleArn String
    The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
    name String
    Stack name.
    notificationArns List<String>
    A list of SNS topic ARNs to publish stack related events.
    onFailure String
    Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.
    parameters Map<String,String>
    A map of Parameter structures that specify input parameters for the stack.
    policyBody String
    Structure containing the stack policy body. Conflicts w/ policy_url.
    policyUrl String
    Location of a file containing the stack policy. Conflicts w/ policy_body.
    tags Map<String,String>
    Map of resource tags to associate with this stack. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    templateBody String
    Structure containing the template body (max size: 51,200 bytes).
    templateUrl String
    Location of a file containing the template body (max size: 460,800 bytes).
    timeoutInMinutes Integer
    The amount of time that can pass before the stack status becomes CREATE_FAILED.
    capabilities string[]
    A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND
    disableRollback boolean
    Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.
    iamRoleArn string
    The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
    name string
    Stack name.
    notificationArns string[]
    A list of SNS topic ARNs to publish stack related events.
    onFailure string
    Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.
    parameters {[key: string]: string}
    A map of Parameter structures that specify input parameters for the stack.
    policyBody string
    Structure containing the stack policy body. Conflicts w/ policy_url.
    policyUrl string
    Location of a file containing the stack policy. Conflicts w/ policy_body.
    tags {[key: string]: string}
    Map of resource tags to associate with this stack. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    templateBody string
    Structure containing the template body (max size: 51,200 bytes).
    templateUrl string
    Location of a file containing the template body (max size: 460,800 bytes).
    timeoutInMinutes number
    The amount of time that can pass before the stack status becomes CREATE_FAILED.
    capabilities Sequence[str]
    A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND
    disable_rollback bool
    Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.
    iam_role_arn str
    The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
    name str
    Stack name.
    notification_arns Sequence[str]
    A list of SNS topic ARNs to publish stack related events.
    on_failure str
    Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.
    parameters Mapping[str, str]
    A map of Parameter structures that specify input parameters for the stack.
    policy_body str
    Structure containing the stack policy body. Conflicts w/ policy_url.
    policy_url str
    Location of a file containing the stack policy. Conflicts w/ policy_body.
    tags Mapping[str, str]
    Map of resource tags to associate with this stack. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    template_body str
    Structure containing the template body (max size: 51,200 bytes).
    template_url str
    Location of a file containing the template body (max size: 460,800 bytes).
    timeout_in_minutes int
    The amount of time that can pass before the stack status becomes CREATE_FAILED.
    capabilities List<String>
    A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND
    disableRollback Boolean
    Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.
    iamRoleArn String
    The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
    name String
    Stack name.
    notificationArns List<String>
    A list of SNS topic ARNs to publish stack related events.
    onFailure String
    Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.
    parameters Map<String>
    A map of Parameter structures that specify input parameters for the stack.
    policyBody String
    Structure containing the stack policy body. Conflicts w/ policy_url.
    policyUrl String
    Location of a file containing the stack policy. Conflicts w/ policy_body.
    tags Map<String>
    Map of resource tags to associate with this stack. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    templateBody String
    Structure containing the template body (max size: 51,200 bytes).
    templateUrl String
    Location of a file containing the template body (max size: 460,800 bytes).
    timeoutInMinutes Number
    The amount of time that can pass before the stack status becomes CREATE_FAILED.

    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.
    Outputs Dictionary<string, string>
    A map of outputs from the stack.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Id string
    The provider-assigned unique ID for this managed resource.
    Outputs map[string]string
    A map of outputs from the stack.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    id String
    The provider-assigned unique ID for this managed resource.
    outputs Map<String,String>
    A map of outputs from the stack.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    id string
    The provider-assigned unique ID for this managed resource.
    outputs {[key: string]: string}
    A map of outputs from the stack.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    id str
    The provider-assigned unique ID for this managed resource.
    outputs Mapping[str, str]
    A map of outputs from the stack.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    id String
    The provider-assigned unique ID for this managed resource.
    outputs Map<String>
    A map of outputs from the stack.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing Stack Resource

    Get an existing Stack resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: StackState, opts?: CustomResourceOptions): Stack
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            capabilities: Optional[Sequence[str]] = None,
            disable_rollback: Optional[bool] = None,
            iam_role_arn: Optional[str] = None,
            name: Optional[str] = None,
            notification_arns: Optional[Sequence[str]] = None,
            on_failure: Optional[str] = None,
            outputs: Optional[Mapping[str, str]] = None,
            parameters: Optional[Mapping[str, str]] = None,
            policy_body: Optional[str] = None,
            policy_url: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            template_body: Optional[str] = None,
            template_url: Optional[str] = None,
            timeout_in_minutes: Optional[int] = None) -> Stack
    func GetStack(ctx *Context, name string, id IDInput, state *StackState, opts ...ResourceOption) (*Stack, error)
    public static Stack Get(string name, Input<string> id, StackState? state, CustomResourceOptions? opts = null)
    public static Stack get(String name, Output<String> id, StackState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Capabilities List<string>
    A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND
    DisableRollback bool
    Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.
    IamRoleArn string
    The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
    Name string
    Stack name.
    NotificationArns List<string>
    A list of SNS topic ARNs to publish stack related events.
    OnFailure string
    Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.
    Outputs Dictionary<string, string>
    A map of outputs from the stack.
    Parameters Dictionary<string, string>
    A map of Parameter structures that specify input parameters for the stack.
    PolicyBody string
    Structure containing the stack policy body. Conflicts w/ policy_url.
    PolicyUrl string
    Location of a file containing the stack policy. Conflicts w/ policy_body.
    Tags Dictionary<string, string>
    Map of resource tags to associate with this stack. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    TemplateBody string
    Structure containing the template body (max size: 51,200 bytes).
    TemplateUrl string
    Location of a file containing the template body (max size: 460,800 bytes).
    TimeoutInMinutes int
    The amount of time that can pass before the stack status becomes CREATE_FAILED.
    Capabilities []string
    A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND
    DisableRollback bool
    Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.
    IamRoleArn string
    The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
    Name string
    Stack name.
    NotificationArns []string
    A list of SNS topic ARNs to publish stack related events.
    OnFailure string
    Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.
    Outputs map[string]string
    A map of outputs from the stack.
    Parameters map[string]string
    A map of Parameter structures that specify input parameters for the stack.
    PolicyBody string
    Structure containing the stack policy body. Conflicts w/ policy_url.
    PolicyUrl string
    Location of a file containing the stack policy. Conflicts w/ policy_body.
    Tags map[string]string
    Map of resource tags to associate with this stack. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    TemplateBody string
    Structure containing the template body (max size: 51,200 bytes).
    TemplateUrl string
    Location of a file containing the template body (max size: 460,800 bytes).
    TimeoutInMinutes int
    The amount of time that can pass before the stack status becomes CREATE_FAILED.
    capabilities List<String>
    A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND
    disableRollback Boolean
    Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.
    iamRoleArn String
    The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
    name String
    Stack name.
    notificationArns List<String>
    A list of SNS topic ARNs to publish stack related events.
    onFailure String
    Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.
    outputs Map<String,String>
    A map of outputs from the stack.
    parameters Map<String,String>
    A map of Parameter structures that specify input parameters for the stack.
    policyBody String
    Structure containing the stack policy body. Conflicts w/ policy_url.
    policyUrl String
    Location of a file containing the stack policy. Conflicts w/ policy_body.
    tags Map<String,String>
    Map of resource tags to associate with this stack. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    templateBody String
    Structure containing the template body (max size: 51,200 bytes).
    templateUrl String
    Location of a file containing the template body (max size: 460,800 bytes).
    timeoutInMinutes Integer
    The amount of time that can pass before the stack status becomes CREATE_FAILED.
    capabilities string[]
    A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND
    disableRollback boolean
    Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.
    iamRoleArn string
    The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
    name string
    Stack name.
    notificationArns string[]
    A list of SNS topic ARNs to publish stack related events.
    onFailure string
    Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.
    outputs {[key: string]: string}
    A map of outputs from the stack.
    parameters {[key: string]: string}
    A map of Parameter structures that specify input parameters for the stack.
    policyBody string
    Structure containing the stack policy body. Conflicts w/ policy_url.
    policyUrl string
    Location of a file containing the stack policy. Conflicts w/ policy_body.
    tags {[key: string]: string}
    Map of resource tags to associate with this stack. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    templateBody string
    Structure containing the template body (max size: 51,200 bytes).
    templateUrl string
    Location of a file containing the template body (max size: 460,800 bytes).
    timeoutInMinutes number
    The amount of time that can pass before the stack status becomes CREATE_FAILED.
    capabilities Sequence[str]
    A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND
    disable_rollback bool
    Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.
    iam_role_arn str
    The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
    name str
    Stack name.
    notification_arns Sequence[str]
    A list of SNS topic ARNs to publish stack related events.
    on_failure str
    Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.
    outputs Mapping[str, str]
    A map of outputs from the stack.
    parameters Mapping[str, str]
    A map of Parameter structures that specify input parameters for the stack.
    policy_body str
    Structure containing the stack policy body. Conflicts w/ policy_url.
    policy_url str
    Location of a file containing the stack policy. Conflicts w/ policy_body.
    tags Mapping[str, str]
    Map of resource tags to associate with this stack. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    template_body str
    Structure containing the template body (max size: 51,200 bytes).
    template_url str
    Location of a file containing the template body (max size: 460,800 bytes).
    timeout_in_minutes int
    The amount of time that can pass before the stack status becomes CREATE_FAILED.
    capabilities List<String>
    A list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, or CAPABILITY_AUTO_EXPAND
    disableRollback Boolean
    Set to true to disable rollback of the stack if stack creation failed. Conflicts with on_failure.
    iamRoleArn String
    The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
    name String
    Stack name.
    notificationArns List<String>
    A list of SNS topic ARNs to publish stack related events.
    onFailure String
    Action to be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. Conflicts with disable_rollback.
    outputs Map<String>
    A map of outputs from the stack.
    parameters Map<String>
    A map of Parameter structures that specify input parameters for the stack.
    policyBody String
    Structure containing the stack policy body. Conflicts w/ policy_url.
    policyUrl String
    Location of a file containing the stack policy. Conflicts w/ policy_body.
    tags Map<String>
    Map of resource tags to associate with this stack. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    templateBody String
    Structure containing the template body (max size: 51,200 bytes).
    templateUrl String
    Location of a file containing the template body (max size: 460,800 bytes).
    timeoutInMinutes Number
    The amount of time that can pass before the stack status becomes CREATE_FAILED.

    Import

    Using pulumi import, import Cloudformation Stacks using the name. For example:

    $ pulumi import aws:cloudformation/stack:Stack stack networking-stack
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi