Stack Without Template

  • Query id: 91bea7b8-0c31-4863-adc9-93f6177266c4
  • Query name: Stack Without Template
  • Platform: Terraform
  • Severity: Medium
  • Category: Build Process
  • URL: Github

Description

AWS CloudFormation should have a template defined through the attribute template_url or attribute template_body
Documentation

Code samples

Code samples with security vulnerabilities

Postitive test num. 1 - tf file
resource "aws_cloudformation_stack" "positive1" {

  name = "networking-stack"

  parameters = {
    VPCCidr = "10.0.0.0/16"
  }

}

Code samples without security vulnerabilities

Negative test num. 1 - tf file
resource "aws_cloudformation_stack" "negative1" {

     name = "networking-stack"

     parameters = {
     VPCCidr = "10.0.0.0/16"
     }

     template_url = "sometemplateurl"
}



resource "aws_cloudformation_stack" "negative2" {

     name = "networking-stack"

     parameters = {
     VPCCidr = "10.0.0.0/16"
     }

     template_body = "sometemplatebody"
}