rulegen - Amazon CloudFormation Guard
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

rulegen

Takes a JSON- or YAML-formatted Amazon CloudFormation template file and autogenerates a set of Amazon CloudFormation Guard rules that match the properties of the template resources. This command is a useful way to get started with rule writing or to create ready-to-use rules from known good templates.

Syntax

cfn-guard rulegen --output <value> --template <value>

Parameters

-h, --help

Prints help information.

-V, --version

Prints version information.

Options

-o, --output

Writes the generated rules to an output file. Given the potential for hundreds or even thousands of rules to emerge, we recommend using this option.

-t, --template

Provides the path to a CloudFormation template file in JSON or YAML format.

Examples

cfn-guard rulegen --output rules.guard --template template.json