github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/aws/r/cloudformation_stack.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_cloudformation_stack" 4 sidebar_current: "docs-aws-resource-cloudformation-stack" 5 description: |- 6 Provides a CloudFormation Stack resource. 7 --- 8 9 # aws\_cloudformation\_stack 10 11 Provides a CloudFormation Stack resource. 12 13 ## Example Usage 14 15 ``` 16 resource "aws_cloudformation_stack" "network" { 17 name = "networking-stack" 18 19 parameters { 20 VPCCidr = "10.0.0.0/16" 21 } 22 23 template_body = <<STACK 24 { 25 "Parameters" : { 26 "VPCCidr" : { 27 "Type" : "String", 28 "Default" : "10.0.0.0/16", 29 "Description" : "Enter the CIDR block for the VPC. Default is 10.0.0.0/16." 30 } 31 }, 32 "Resources" : { 33 "my-vpc": { 34 "Type" : "AWS::EC2::VPC", 35 "Properties" : { 36 "CidrBlock" : { "Ref" : "VPCCidr" }, 37 "Tags" : [ 38 {"Key": "Name", "Value": "Primary_CF_VPC"} 39 ] 40 } 41 } 42 } 43 } 44 STACK 45 } 46 ``` 47 48 ## Argument Reference 49 50 The following arguments are supported: 51 52 * `name` - (Required) Stack name. 53 * `template_body` - (Optional) Structure containing the template body (max size: 51,200 bytes). 54 * `template_url` - (Optional) Location of a file containing the template body (max size: 460,800 bytes). 55 * `capabilities` - (Optional) A list of capabilities. 56 Currently, the only valid value is `CAPABILITY_IAM` 57 * `disable_rollback` - (Optional) Set to true to disable rollback of the stack if stack creation failed. 58 Conflicts with `on_failure`. 59 * `notification_arns` - (Optional) A list of SNS topic ARNs to publish stack related events. 60 * `on_failure` - (Optional) Action to be taken if stack creation fails. This must be 61 one of: `DO_NOTHING`, `ROLLBACK`, or `DELETE`. Conflicts with `disable_rollback`. 62 * `parameters` - (Optional) A list of Parameter structures that specify input parameters for the stack. 63 * `policy_body` - (Optional) Structure containing the stack policy body. 64 Conflicts w/ `policy_url`. 65 * `policy_url` - (Optional) Location of a file containing the stack policy. 66 Conflicts w/ `policy_body`. 67 * `tags` - (Optional) A list of tags to associate with this stack. 68 * `timeout_in_minutes` - (Optional) The amount of time that can pass before the stack status becomes `CREATE_FAILED`. 69 70 ## Attributes Reference 71 72 The following attributes are exported: 73 74 * `id` - A unique identifier of the stack. 75 * `outputs` - A list of output structures.