Skip to content

Commit 51fc264

Browse files
author
Jarl
committed
documentation
1 parent 81b077d commit 51fc264

File tree

3 files changed

+90
-8
lines changed

3 files changed

+90
-8
lines changed

README.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Kinesis Firehose - Elasticsearch Terraform Module
2+
3+
Kinesis Firehose - Elasticsearch Terraform Module provision an Amazon Elasticsearch Service and a Kinesis Foirehose delivery stream that load streaming data into Amazon S3 and Amazon Elasticsearch Service.
4+
5+
## Module
6+
7+
The module will create a Kinesis Foirehose delivery stream and an Amazon Elasticsearch Service. Additionally it will create one S3 bucket for the compressed json logs and configure Kinesis Firehose to load the streaming data into the S3 bucket and into the Elasticsearch cluster. All IAM roles and access policies will be configured in order to work.
8+
9+
### Input Variables
10+
11+
The following table list the configurable parameters and their default values.
12+
13+
| Name | Description | Default |
14+
| --- | --- | --- |
15+
| region | AWS Region | eu-west-1 |
16+
| es_name | Domain name for Elasticsearch | cxcloud |
17+
| es_ver | Elasticsearch Version | 6.5 |
18+
| es_instance_type | Instance type for Elasticsearch | t2.small.elasticsearch |
19+
| es_instance_count | Amount of Elasticsearch nodes | 1 |
20+
| es_dedicated_master_enabled | Use dedicated master | false |
21+
| es_ebs_size | Size of EBS volume per instance | 35 |
22+
| es_snapshot_start_hour | Start time of snapshot | 23 |
23+
| es_name_tag | Name tag | cxcloud |
24+
| es_whitelisted_ips | Whitelisted IPs to access ES | [] |
25+
| stream_name | Kinesis Firehose Stream Name | cxcloud |
26+
| s3_bucket | S3 bucket name for logs | "" |
27+
| s3_buffer_size | S3 Buffer Size | 10 |
28+
| s3_buffer_interval | S3 buffer interval | 60 |
29+
| s3_compression_format | S3 log compression format | GZIP |
30+
| es_index_name | Elasticsearch index name | cxcloud |
31+
| es_type_name | Elasticsearch index type | logs |
32+
| es_buffering_size | Elasticsearch buffering size | 10 |
33+
| es_buffering_interval | Elasticsearch buffering interval | 60 |
34+
| s3_backup_mode | S3 backup mode | AllDocuments |
35+
| whitelisted_aws_account_arns | Whitelisted AWS ARNs to assume role for Kinesis Firehose access | [] |
36+
37+
### Output Variables
38+
39+
The following table list the output variables
40+
41+
| Name | Description |
42+
| --- | --- |
43+
| es_arn | Elasticsearch AWS ARN |
44+
| endpoint | Elasticsearch Endpoint |
45+
| domain_id | Elasticsearch domain id |
46+
| domain_name | Elasticsearch Domain Name |
47+
| kinesis_arn | Kineses Firehose Stream ARN |
48+
49+
### Example
50+
51+
The following example show how the module can be used. In this example release 1.0.0 is used.
52+
53+
```console
54+
module "kinesis-firehose-elasticsearch" {
55+
source = "github.com/cxcloud/terraform-kinesis-firehose-elasticsearch?ref=1.0.0"
56+
region = "eu-west-1"
57+
es_name = "cxcloud"
58+
es_ver = 6.5
59+
es_instance_type = "t2.small.elasticsearch"
60+
es_instance_count = 1
61+
es_dedicated_master_enabled = false
62+
es_ebs_size = 35
63+
es_snapshot_start_hour = 23
64+
es_name_tag = "CX Cloud"
65+
es_whitelisted_ips = ["34.240.135.89/32"]
66+
stream_name = "cxcloud"
67+
s3_bucket = "sandbox-logging"
68+
s3_buffer_size = 10
69+
s3_buffer_interval = 60
70+
s3_compression_format = "GZIP"
71+
es_index_name = "cxcloud"
72+
es_type_name = "logs"
73+
es_buffering_size = 10
74+
es_buffering_interval = 60
75+
s3_backup_mode = "AllDocuments"
76+
whitelisted_aws_account_arns = ["arn:aws:iam::012345678901:root"]
77+
}
78+
```

outputs.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
output "es_arn" {
2-
description = "ES ARN"
2+
description = "Elasticsearch ARN"
33
value = "${module.es.arn}"
44
}
55

66
output "endpoint" {
7-
description = "ES Endpoint"
7+
description = "Elasticsearch Endpoint"
88
value = "${module.es.endpoint}"
99
}
1010

1111
output "domain_id" {
12-
description = "ES ARN"
12+
description = "Elasticsearch Domain ID"
1313
value = "${module.es.domain_id}"
1414
}
1515

1616
output "domain_name" {
17-
description = "ES ARN"
17+
description = "Elasticsearch Domain Name"
1818
value = "${module.es.domain_name}"
1919
}
2020

variables.tf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,32 @@
33
variable "region" {
44
type = "string"
55
description = "AWS Region"
6+
default = "eu-west-1"
67
}
78

89
# Elasticsearch variables
910

1011
variable "es_name" {
1112
type = "string"
12-
description = "Domain name for Elasticsearch"
13+
description = "Cluster name for Elasticsearch"
1314
default = "cxcloud"
1415
}
1516

1617
variable "es_ver" {
1718
type = "string"
18-
description = "Elasticsearch Version"
19+
description = "Elasticsearch version"
1920
default = 6.5
2021
}
2122

2223
variable "es_instance_type" {
2324
type = "string"
24-
description = "Instance type for ES"
25+
description = "Instance type for Elasticsearch"
26+
default = "t2.small.elasticsearch"
2527
}
2628

2729
variable "es_instance_count" {
2830
type = "string"
29-
description = "Amount of ES nodes"
31+
description = "Amount of Elasticsearch nodes"
3032
default = 1
3133
}
3234

@@ -39,6 +41,7 @@ variable "es_dedicated_master_enabled" {
3941
variable "es_ebs_size" {
4042
type = "string"
4143
description = "Size of EBS volume per instance"
44+
default = 35
4245
}
4346

4447
variable "es_snapshot_start_hour" {
@@ -56,6 +59,7 @@ variable "es_name_tag" {
5659
variable "es_whitelisted_ips" {
5760
type = "list"
5861
description = "Whitelisted IPs to access ES"
62+
default = []
5963
}
6064

6165
# Kinesis Firehose variables

0 commit comments

Comments
 (0)