Comments (4)
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.
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.
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.
@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)
- [Documentation] Update docs for all public facing functions, and structs
- [BUG] SAM CLI deployed lambda returns InvalidEntryPoint error HOT 3
- [Enhancement] Add support to retrieve the key of a given node HOT 2
- [BUG] '!=' does not work as expected even for same type while using 2 literals. HOT 2
- [Enhancement] Make variables mutable HOT 1
- [Enhancement] Support for CloudFormation Pseudo Parameters HOT 1
- [GENERAL ISSUE] String concatenation with literal and variable HOT 2
- [BUG] OR is not working HOT 8
- [BUG] "true" does not equal true HOT 2
- Best practice for cfn-guard rules for CDK synthesized resources that are wrapped in a CustomResource, e.g. aws-eks.Cluster HOT 1
- [BUG] Problem with --show-summary HOT 2
- Question about specificity in wildcards. HOT 4
- Trying to search an If statement for a value HOT 2
- [GENERAL ISSUE] cfn-guard and Terraform JSON output HOT 2
- [Enhancement] Introduce date-time and or parse_timestamp (to epoch) function (parser). HOT 2
- [BUG] cfn-guard-lambda breaks on parsing templates with `verbose: false` HOT 4
- Current tagging strategy does not work well with pre-commit autoupdate HOT 6
- [BUG] When using cfn-guard with pre-commit, repeated `--rules` are ignored HOT 3
- [Enhancement] Github action should support single rule and template files for validation HOT 1
- [GENERAL ISSUE] Missing Documentation for Input Parameters Feature HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudformation-guard.