-
Notifications
You must be signed in to change notification settings - Fork 0
/
blank.tf
44 lines (39 loc) · 1.24 KB
/
blank.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
resource "aws_elasticsearch_domain" "monitoring-framework" {
domain_name = "tg-${var.environment}-es"
elasticsearch_version = "2.3"
cluster_config {
instance_type = "t2.small.elasticsearch"
instance_count = 1
dedicated_master_enabled = false
dedicated_master_type = "m4.large.elasticsearch"
dedicated_master_count = 1
}
ebs_options {
ebs_enabled = true
volume_size = 30
}
tags = {
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/es.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "118fd7f8-b3d7-43d9-b418-7dd16a646a4c"
}
}
data aws_iam_policy_document "policy" {
statement {
actions = ["es:*"]
principals {
type = "AWS"
identifiers = ["*"]
}
resources = ["*"]
}
}
resource "aws_elasticsearch_domain_policy" "monitoring-framework-policy" {
domain_name = aws_elasticsearch_domain.monitoring-framework.domain_name
access_policies = data.aws_iam_policy_document.policy.json
}