Created
January 30, 2020 08:47
-
-
Save MrHassanMurtaza/78c0d4b143260a3a121e915dbfcd42f6 to your computer and use it in GitHub Desktop.
Deny_If_No_Purpose_Tag
This file contains hidden or 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "NoPurposeTag", | |
"Effect": "Deny", | |
"Action": [ | |
"ec2:RunInstances", | |
"ec2:CreateVolume" | |
], | |
"Condition": { | |
"ForAllValues:StringNotEquals": { | |
"aws:TagKeys": [ | |
"Purpose" | |
] | |
} | |
}, | |
"Resource": [ | |
"arn:aws:ec2:*:*:volume/*", | |
"arn:aws:ec2:*:*:instance/*" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment