Giter Club home page Giter Club logo

Comments (4)

joshfried-aws avatar joshfried-aws commented on July 4, 2024

Hi @GITOffMuhLawn thanks for the feedback. We are always open to looking into how we can better improve our documentation. I see that the way to handle regex is one of them.

That said while guard in fact does not use a passthrough to the standard rust regex crate, it does use a passthrough to the fancy regex crate. Guard uses /regex/ syntax to tell the engine that we're comparing against a regex pattern.

That said, it's important to note that you have a syntax error here in your example.

the following rule would pass

let bucket = Resources.*[ type == "AWS::S3::Bucket" ]

%bucket !empty

let tag = %bucket.Properties.Tags[ key == /(?i)description/ ]

%tag !empty

using the following yaml file as a test file

Resources:
  bucket:
    Type: "AWS::S3::Bucket"
    Properties:
      Tags:
        - Key: "DeScrIption"
          Value: "my_s3_bucket"

Hope this was sufficient. Please let me know if you'd like any further clarifications.

from cloudformation-guard.

joshfried-aws avatar joshfried-aws commented on July 4, 2024

Hi, I'm going to assume the above answer was sufficient and will close this issue.

Feel free to reopen if you require any further clarifications

Thanks,

from cloudformation-guard.

GITOffMuhLawn avatar GITOffMuhLawn commented on July 4, 2024

Apologies for the delay. Appreciate the response on this and the clarification on what regex it uses. I was able to figure out after a bit. I genuinely do appreciate you clarifying so I know for sure and I'm not just guessing.
FWIW once I figured out the syntax through a bit of rough trial and error I thought the regex support was far better than what the cfn-guard documentation said it supported. From what I read the guard documentation made it sound like regex was very limited/barely supported.

The problem I've seen with a lot of your documentation is that you all are way too smart and you don't know how to think like someone that isn't very smart (like me). Once someone that's involved with something from the AWS side explains it, it makes complete sense, but you guys are just on a whole other level. Anyone that can create a concept is next level.

from cloudformation-guard.

joshfried-aws avatar joshfried-aws commented on July 4, 2024

@GITOffMuhLawn no problem. Appreciate the feedback here on ways we can improve our documentation whether that means adding more of it, or making it easier to understand.

Glad you were able to unblock yourself.

from cloudformation-guard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.