The AWS::CloudFormation::Stack resource nests a stack as a resource in a top-level template.
Creates a CloudFormation stack with VPC as a resource in it.
resource "awscc_cloudformation_stack" "example" {
stack_name = "example-stack"
description = "Example stack"
enable_termination_protection = false
parameters = {
VPCCidr = "10.0.0.0/16"
}
template_body = jsonencode({
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"
}
]
}
}
}
})
tags = [{
key = "Modified By"
value = "AWSCC"
}]
}
stack_name
(String)capabilities
(List of String)description
(String)disable_rollback
(Boolean)enable_termination_protection
(Boolean)notification_ar_ns
(List of String)parameters
(Map of String)role_arn
(String)stack_policy_body
(String)stack_policy_url
(String)stack_status_reason
(String)tags
(Attributes List) (see below for nested schema)template_body
(String)template_url
(String)timeout_in_minutes
(Number)change_set_id
(String)creation_time
(String)id
(String) Uniquely identifies the resource.last_update_time
(String)outputs
(Attributes List) (see below for nested schema)parent_id
(String)root_id
(String)stack_id
(String)stack_status
(String)tags
Required:
key
(String)value
(String)outputs
Read-Only:
description
(String)export_name
(String)output_key
(String)output_value
(String)Import is supported using the following syntax:
$ terraform import awscc_cloudformation_stack.example <resource ID>