Guard offers a policy-as-code domain-specific language (DSL) to write rules and validate JSON- and YAML-formatted data such as CloudFormation Templates, K8s configurations, and Terraform JSON plans/configurations against those rules. Take this survey to provide feedback about cfn-guard: https://amazonmr.au1.qualtrics.com/jfe/form/SV_bpyzpfoYGGuuUl0
Hello,
i have noticed, that there are no examples, how to check the existence of Parameters and there configuration.
It is usefull if you have multiple templates and you want to have in every template the same parameters. (e.g. tagging or name schema)
Hope that will help someone.
Best regards,
Patrick
Test output:
python3-virtualenv ~/git_other/cloudformation-guard/guard-examples/parameter-schemas on parameter_schema ✓ ❯ cfn-guard test -r check-default-parameters.guard -t check-default-parameters-tests.yaml
Test Case #1
PASS Rules:
assert_default_parameter_configuration: Expected = SKIP
assert_default_parameters_exists: Expected = SKIP
assert_ConstraintDescription: Expected = SKIP
Test Case #2
PASS Rules:
assert_ConstraintDescription: Expected = SKIP
assert_default_parameters_exists: Expected = PASS
assert_default_parameter_configuration: Expected = FAIL
Test Case #3
PASS Rules:
assert_default_parameters_exists: Expected = FAIL
assert_default_parameter_configuration: Expected = SKIP
assert_ConstraintDescription: Expected = SKIP
Test Case #4
PASS Rules:
assert_ConstraintDescription: Expected = PASS
assert_default_parameters_exists: Expected = PASS
assert_default_parameter_configuration: Expected = PASS
Test Case #5
PASS Rules:
assert_default_parameters_exists: Expected = PASS
assert_default_parameter_configuration: Expected = FAIL
assert_ConstraintDescription: Expected = FAIL
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
Description of changes:
Hello, i have noticed, that there are no examples, how to check the existence of Parameters and there configuration. It is usefull if you have multiple templates and you want to have in every template the same parameters. (e.g. tagging or name schema)
Hope that will help someone.
Best regards,
Patrick
Test output:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license