Skip to content

Commit dacadc2

Browse files
authored
Create tagging.rego
1 parent 93ac355 commit dacadc2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

aws/policies/tagging.rego

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package infracost
2+
3+
required_tags = ["owner", "environment", "cost_center"]
4+
5+
deny[msg] {
6+
tag := required_tags[_]
7+
not input.tags[tag]
8+
msg := sprintf("Resource %s is missing the tag: %s", [input.name, tag])
9+
}

0 commit comments

Comments
 (0)