github.com/ves/terraform@v0.8.0-beta2/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 parameters { 19 VPCCidr = "10.0.0.0/16" 20 } 21 template_body = <<STACK 22 { 23 "Parameters" : { 24 "VPCCidr" : { 25 "Type" : "String", 26 "Default" : "10.0.0.0/16", 27 "Description" : "Enter the CIDR block for the VPC. Default is 10.0.0.0/16." 28 } 29 }, 30 "Resources" : { 31 "my-vpc": { 32 "Type" : "AWS::EC2::VPC", 33 "Properties" : { 34 "CidrBlock" : { "Ref" : "VPCCidr" }, 35 "Tags" : [ 36 {"Key": "Name", "Value": "Primary_CF_VPC"} 37 ] 38 } 39 } 40 } 41 } 42 STACK 43 } 44 ``` 45 46 ## Argument Reference 47 48 The following arguments are supported: 49 50 * `name` - (Required) Stack name. 51 * `template_body` - (Optional) Structure containing the template body (max size: 51,200 bytes). 52 * `template_url` - (Optional) Location of a file containing the template body (max size: 460,800 bytes). 53 * `capabilities` - (Optional) A list of capabilities. 54 Currently, the only valid value is `CAPABILITY_IAM` 55 * `disable_rollback` - (Optional) Set to true to disable rollback of the stack if stack creation failed. 56 Conflicts with `on_failure`. 57 * `notification_arns` - (Optional) A list of SNS topic ARNs to publish stack related events. 58 * `on_failure` - (Optional) Action to be taken if stack creation fails. This must be 59 one of: `DO_NOTHING`, `ROLLBACK`, or `DELETE`. Conflicts with `disable_rollback`. 60 * `parameters` - (Optional) A list of Parameter structures that specify input parameters for the stack. 61 * `policy_body` - (Optional) Structure containing the stack policy body. 62 Conflicts w/ `policy_url`. 63 * `policy_url` - (Optional) Location of a file containing the stack policy. 64 Conflicts w/ `policy_body`. 65 * `tags` - (Optional) A list of tags to associate with this stack. 66 * `timeout_in_minutes` - (Optional) The amount of time that can pass before the stack status becomes `CREATE_FAILED`. 67 68 ## Attributes Reference 69 70 The following attributes are exported: 71 72 * `id` - A unique identifier of the stack. 73 * `outputs` - A list of output structures.