Terraform rules working

This commit is contained in:
2025-05-16 14:00:50 +03:00
commit f4d28d47a9
13 changed files with 857 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# Deny if VM does not have a backup strategy
deny[msg] {
vm := get_vms[_]
not vm.values.backup
msg := sprintf("VM '%s' must have backup enabled for disaster recovery.", [vm.name])
}
# Deny if VM does not have proper tags for identification
deny[msg] {
vm := get_vms[_]
is_empty(vm.values.tags)
msg := sprintf("VM '%s' must have tags for proper identification and management.", [vm.name])
}