start simple policy logic
This commit is contained in:
parent
6b69bbf7df
commit
b2b09cbf64
2
ebs-volume-required-tags.voldo
Normal file
2
ebs-volume-required-tags.voldo
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Quantifier, resource, key to require, value to require
|
||||
all aws_ebs_volume resources have required tag "foo" with required value "bar"
|
|
@ -11,6 +11,11 @@ sub get-resource-type (@resource-list, Str $resource-type, Str $mode="managed")
|
|||
@resource-list.grep: { $_<mode> eq $mode && $_<type> eq $resource-type }
|
||||
}
|
||||
|
||||
# This will ultimately need to parse rule text and perform operations based on that. Example rule:
|
||||
# all aws_ebs_volume resources have required tag "foo" with required value "bar"
|
||||
sub read-rule (Str $rule-text) {
|
||||
|
||||
}
|
||||
|
||||
sub check-tags ($resource, %required_tags) {
|
||||
return True if %required_tags.grep($resource<change><after><tags_all><foo>); # or $resource.change.after.tags<foo> eq "bar";
|
||||
|
|
Loading…
Reference in a new issue