-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Derek Morgan
committed
Oct 19, 2024
1 parent
db0c866
commit 9cfc649
Showing
3 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package terraform | ||
|
||
import future.keywords.in | ||
|
||
allowed_instance_types := {"t3.micro", "t3.small"} | ||
|
||
deny[msg] { | ||
some resource in input.resource_changes | ||
resource.type == "aws_instance" | ||
instance_type := resource.change.after.instance_type | ||
not instance_type in allowed_instance_types | ||
msg := sprintf("AWS instance type '%s' is not allowed. Only 't3.micro' or 't3.small' are permitted.", [instance_type]) | ||
} |