Difference between revisions of "Cfn-lint"
Jump to navigation
Jump to search
Line 75: | Line 75: | ||
== See also == | == See also == | ||
+ | * {{cfn-lint}} | ||
* {{aws cloudformation}} | * {{aws cloudformation}} | ||
* {{CloudFormation}} | * {{CloudFormation}} | ||
[[Category:CloudFormation]] | [[Category:CloudFormation]] |
Revision as of 17:47, 10 August 2021
https://github.com/aws-cloudformation/cfn-lint
- Installation:
pip install cfn-lint
cfn-lint file_with_your_stack.yml
cfn-lint -t
cfn-lint --version
cfn-lint --help
Configuration files:
Help
cfn-lint usage: Basic: cfn-lint test.yaml Ignore a rule: cfn-lint -i E3012 -- test.yaml Configure a rule: cfn-lint -x E3012:strict=false -t test.yaml Lint all yaml files in a folder: cfn-lint dir/**/*.yaml CloudFormation Linter optional arguments: -h, --help show this help message and exit Standard: TEMPLATE The CloudFormation template to be linted -t TEMPLATE [TEMPLATE ...], --template TEMPLATE [TEMPLATE ...] The CloudFormation template to be linted -b, --ignore-bad-template Ignore failures with Bad template --ignore-templates IGNORE_TEMPLATES [IGNORE_TEMPLATES ...] Ignore templates -f {quiet,parseable,json,junit,pretty}, --format {quiet,parseable,json,junit,pretty} Output Format -l, --list-rules list all the rules -r REGIONS [REGIONS ...], --regions REGIONS [REGIONS ...] list the regions to validate against. -i IGNORE_CHECKS [IGNORE_CHECKS ...], --ignore-checks IGNORE_CHECKS [IGNORE_CHECKS ...] only check rules whose id do not match these values -c INCLUDE_CHECKS [INCLUDE_CHECKS ...], --include-checks INCLUDE_CHECKS [INCLUDE_CHECKS ...] include rules whose id match these values -m MANDATORY_CHECKS [MANDATORY_CHECKS ...], --mandatory-checks MANDATORY_CHECKS [MANDATORY_CHECKS ...] always check rules whose id match these values, regardless of template exclusions -e, --include-experimental Include experimental rules -x CONFIGURE_RULES [CONFIGURE_RULES ...], --configure-rule CONFIGURE_RULES [CONFIGURE_RULES ...] Provide configuration for a rule. Format RuleId:key=value. Example: E3012:strict=false --config-file CONFIG_FILE Specify the cfnlintrc file to use -z CUSTOM_RULES, --custom-rules CUSTOM_RULES Allows specification of a custom rule file. -v, --version Version of cfn-lint --output-file OUTPUT_FILE Writes the output to the specified file, ideal for producing reports --merge-configs Merges lists between configuration layers Advanced / Debugging: -D, --debug Enable debug logging -I, --info Enable information logging -a APPEND_RULES [APPEND_RULES ...], --append-rules APPEND_RULES [APPEND_RULES ...] specify one or more rules directories using one or more --append-rules arguments. -o OVERRIDE_SPEC, --override-spec OVERRIDE_SPEC A CloudFormation Spec override file that allows customization -g, --build-graph Creates a file in the same directory as the template that models the template's resources in DOT format -s REGISTRY_SCHEMAS [REGISTRY_SCHEMAS ...], --registry-schemas REGISTRY_SCHEMAS [REGISTRY_SCHEMAS ...] one or more directories of CloudFormation Registry Schemas -u, --update-specs Update the CloudFormation Specs
See also
cfn-lint
,cfn-lint --help
- AWS CloudFormation: [
aws cloudformation
|create-stack
|list-stacks
|delete-stack
|update-stack
|list-types
|estimate-template-cost
|validate-template
|describe-stacks
|deploy
|drift detection
],aws cloudformation get-template-summary, aws cloudformation describe-stack-events
- AWS CloudFormation,
AWS::CloudFormation
AWS CloudFormation Designer, Drift detection, AWS Cloud Development Kit (CDK),aws cloudformation
,ServicesStack:
, AWS CloudFormation Linter (cfn-lint
), Former2, CloudCraft, Change sets, AWS CloudFormation Public Registry, CloudFormation snippets, CloudFormation templates, StackSets,Outputs:
,Type:
,Fn::Sub
,!Ref
, CloudFormation Parameters, AWS CloudFormation Templates, CloudFormation functions
Advertising: