forked from bridgecrewio/terragoat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
es.tf
44 lines (39 loc) · 1.25 KB
/
es.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
44
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 = "e6d83b21346fe85d4fe28b16c0b2f1e0662eb1d7"
git_file = "terraform/aws/es.tf"
git_last_modified_at = "2023-04-27 12:47:51"
git_last_modified_by = "nadler@paloaltonetworks.com"
git_modifiers = "nadler/nimrodkor"
git_org = "bridgecrewio"
git_repo = "terragoat"
yor_trace = "95131dec-d7c9-49bb-9aff-eb0e2736603b"
}
}
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
}