Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added examples for "Parameter" rules #541

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pmagyar
Copy link

@pmagyar pmagyar commented Jul 27, 2024

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:

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

@pmagyar
Copy link
Author

pmagyar commented Oct 7, 2024

Hey,

i have pushed fixes for my typos. Please review/approve again :)
Thanks.

Best regards,

Patrick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant