Created
April 13, 2016 03:07
-
-
Save pschipitsch/ecbdf3db6ab1ec61e09acb611f3994e7 to your computer and use it in GitHub Desktop.
AWS Elasticsearch Service Access Policy Terraform Template
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": [ | |
{ | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": [ | |
"es:ESHttpGet", | |
"es:ESHttpHead", | |
"es:ESHttpPost", | |
"es:ESHttpPut" | |
], | |
"Resource": "arn:aws:es:${region}:*:domain/${domain_name}/*", | |
"Condition": { | |
"IpAddress": { | |
"aws:SourceIp": [${logstash_ips}] | |
} | |
} | |
}, | |
{ | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": [ | |
"es:ESHttpGet", | |
"es:ESHttpHead" | |
], | |
"Resource": "arn:aws:es:${region}:*:domain/${domain_name}/*", | |
"Condition": { | |
"IpAddress": { | |
"aws:SourceIp": [${kibana_ips}] | |
} | |
} | |
}, | |
{ | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "es:ESHttpPost", | |
"Resource": "arn:aws:es:${region}:*:domain/${domain_name}/*/_msearch", | |
"Condition": { | |
"IpAddress": { | |
"aws:SourceIp": [${kibana_ips}] | |
} | |
} | |
}, | |
{ | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": [ | |
"es:ESHttpDelete", | |
"es:ESHttpGet", | |
"es:ESHttpHead", | |
"es:ESHttpPost", | |
"es:ESHttpPut" | |
], | |
"Resource": "arn:aws:es:${region}:*:domain/${domain_name}/.kibana-4/*", | |
"Condition": { | |
"IpAddress": { | |
"aws:SourceIp": [${kibana_ips}] | |
} | |
} | |
}, | |
{ | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "es:ESHttpPost", | |
"Resource": "arn:aws:es:${region}:*:domain/${domain_name}/.kibana-4", | |
"Condition": { | |
"IpAddress": { | |
"aws:SourceIp": [${kibana_ips}] | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment