We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55333b6 commit eef1dbfCopy full SHA for eef1dbf
data.tf
@@ -1,3 +1,19 @@
1
data "aws_vpc" "this" {
2
id = "${var.vpc_id}"
3
}
4
+
5
+data "aws_iam_policy_document" "this" {
6
+ statement {
7
+ actions = [
8
+ "logs:CreateLogStream",
9
+ "logs:PutLogEvents",
10
+ ]
11
12
+ resources = ["${aws_cloudwatch_log_group.this.arn}:*"]
13
14
+ principals {
15
+ identifiers = ["es.amazonaws.com"]
16
+ type = "Service"
17
+ }
18
19
+}
main.tf
@@ -164,3 +164,8 @@ resource "aws_elasticsearch_domain_policy" "this" {
164
165
POLICIES
166
167
168
+resource "aws_cloudwatch_log_resource_policy" "this" {
169
+ policy_document = "${data.aws_iam_policy_document.this.json}"
170
+ policy_name = "${local.id}-ElasticSearch-Index-Logs"
171
0 commit comments