Skip to content

Instantly share code, notes, and snippets.

@houey
Created April 8, 2024 14:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save houey/3ceaaf44957c6b1646e464b0dfaa2d62 to your computer and use it in GitHub Desktop.
Save houey/3ceaaf44957c6b1646e464b0dfaa2d62 to your computer and use it in GitHub Desktop.
data perimeter_draft_ec2
{
"Version": "2012-10-17",
"Statement": [
{
"NotAction": [
"dax:*",
"es:ESHttp*"
],
"Resource": "*",
"Effect": "Deny",
"Condition": {
"NotIpAddress": {
"aws:SourceIp": [
"<CIDR1>",
"<CIDR2>"
]
},
"StringNotEquals": {
"aws:ec2InstanceSourceVPC": "${aws:SourceVpc}"
},
"Null": {
"ec2:SourceInstanceARN": false,
"aws:PrincipalTag/iam-reserved:IP-Restriction": true
},
"Bool": {
"aws:ViaAWSService": false
},
"ArnNotLike": {
"aws:PrincipalArn": "arn:aws:iam::*:role/aws:ec2-infrastructure"
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment