aws-cloudformation / cloudformation-guard

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
Apache License 2.0
1.29k stars 180 forks source link

feat(cfn-guard): Initial implementation of date functions #561

Closed dannyvassallo closed 1 month ago

dannyvassallo commented 2 months ago

Issue #, if available:

https://github.com/aws-cloudformation/cloudformation-guard/issues/521

Description of changes:

Introduces 2 date functions to Guard:

  1. parse_epoch parses dates from templates into Unix timestamps.
  2. now returns the current Unix timestamp.

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

justinmburrous commented 1 month ago

@dannyvassallo Yes this looks exactly like what we were looking for. Sorry for the delay here.