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

Fixed #252 #254

Merged
merged 1 commit into from
Jul 8, 2022
Merged

Fixed #252 #254

merged 1 commit into from
Jul 8, 2022

Conversation

wkexiang
Copy link
Contributor

@wkexiang wkexiang commented Jul 8, 2022

Issue #, if available:
#252

Description of changes:
Added one space between Message and =. Also did the same for when Error should be emitted.

$ cargo run --package cfn-guard --bin cfn-guard -- validate -d template.json -r rules.guard
template.json Status = FAIL
FAILED rules
rules.guard/aws_s3_bucket_versioning_defined    FAIL
---
Evaluating data template.json against rules rules.guard
Number of non-compliant resources 1
Resource = WebsiteBucket4326D7C2 {
  Type      = AWS::S3::Bucket
  CDK-Path  = LandingPageFrontend/Website/Bucket/Resource
  Rule = aws_s3_bucket_versioning_defined {
    ALL {
      Check =  VersioningConfiguration EXISTS   {
        Message = VersioningConfiguration is not defined
        RequiredPropertyError {
          PropertyPath = /Resources/WebsiteBucket4326D7C2/Properties[L:5,C:20]
          MissingProperty = VersioningConfiguration
          Reason = Could not find key VersioningConfiguration inside struct at path /Resources/WebsiteBucket4326D7C2/Properties[L:5,C:20]
          Code:
                3.    "WebsiteBucket4326D7C2": {
                4.      "Type": "AWS::S3::Bucket",
                5.      "Properties": {
                6.      },
                7.      "Metadata": {
                8.        "aws:cdk:path": "LandingPageFrontend/Website/Bucket/Resource"
        }
      }
    }
  }
}

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@wkexiang wkexiang requested a review from akshayrane July 8, 2022 17:37
@razcloud razcloud self-requested a review July 8, 2022 17:40
@akshayrane
Copy link
Collaborator

LGTM

Copy link
Contributor

@razcloud razcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gtg

@wkexiang wkexiang merged commit bc712cc into main Jul 8, 2022
@wkexiang wkexiang deleted the 252 branch July 8, 2022 17:51
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.

None yet

3 participants