Description
To create a CloudFormation stack with Terraform, supply a template through template_body or template_url.
Potential impact
The stack cannot be created if the template is missing or CloudFormation cannot read it.
Remediation
Validate the resources and parameters before deployment. If you use a URL, confirm CloudFormation can read the S3 template object.
Examples
Replace the second example’s URL with your template URL. The template must declare the VPCCidr passed to networking-stack.
Before
hcl
resource "aws_cloudformation_stack" "example" {
name = "networking-stack"
parameters = {
VPCCidr = "10.0.0.0/16"
}
}
After
hcl
resource "aws_cloudformation_stack" "example" {
name = "networking-stack"
parameters = {
VPCCidr = "10.0.0.0/16"
}
template_url = "https://example-bucket.s3.amazonaws.com/networking-stack.yaml"
}