-
-
Save logogin/3cca0675de0eaf81b590eb878b5f16fd to your computer and use it in GitHub Desktop.
AWS Elasticsearch Service Access Policy Terraform Template
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
{ | |
"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