Skip to content

Instantly share code, notes, and snippets.

@Dirga36
Created July 8, 2026 08:59
Show Gist options
  • Select an option

  • Save Dirga36/e8123bac12c1582c83b8b5e38cf61d5c to your computer and use it in GitHub Desktop.

Select an option

Save Dirga36/e8123bac12c1582c83b8b5e38cf61d5c to your computer and use it in GitHub Desktop.
package terraform.finops
deny[msg] {
resource := input.resource_changes[_]
resource.type == "aws_instance"
allowed_types := {"t3.micro", "t3.small", "t3.medium"}
not allowed_types[resource.change.after.instance_type]
msg := sprintf(
"Instance type %v is not in the approved list for this environment",
[resource.change.after.instance_type]
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment