Skip to content

Commit 18b2d63

Browse files
authored
fix: add var to be able to disable es resources (#181)
Signed-off-by: Bünyamin Dökmetaş <[email protected]>
1 parent 0ce90ca commit 18b2d63

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Terraform module which creates a ecs app
3636
| <a name="module_ecs_service_task_predefined_autoscaling"></a> [ecs\_service\_task\_predefined\_autoscaling](#module\_ecs\_service\_task\_predefined\_autoscaling) | justtrackio/ecs-autoscaling/aws | 1.2.0 |
3737
| <a name="module_ecs_service_task_schedule"></a> [ecs\_service\_task\_schedule](#module\_ecs\_service\_task\_schedule) | justtrackio/ecs-autoscaling/aws | 1.2.0 |
3838
| <a name="module_iam_policy_ecs_access"></a> [iam\_policy\_ecs\_access](#module\_iam\_policy\_ecs\_access) | terraform-aws-modules/iam/aws//modules/iam-policy | 5.52.2 |
39-
| <a name="module_monitoring"></a> [monitoring](#module\_monitoring) | justtrackio/ecs-gosoline-monitoring/aws | 2.7.2 |
39+
| <a name="module_monitoring"></a> [monitoring](#module\_monitoring) | justtrackio/ecs-gosoline-monitoring/aws | 2.7.3 |
4040
| <a name="module_sentry"></a> [sentry](#module\_sentry) | justtrackio/project/sentry | 1.4.2 |
4141
| <a name="module_service_task"></a> [service\_task](#module\_service\_task) | justtrackio/ecs-alb-service-task/aws | 1.6.0 |
4242
| <a name="module_ssm_label"></a> [ssm\_label](#module\_ssm\_label) | justtrackio/label/null | 0.26.0 |
@@ -119,6 +119,7 @@ Terraform module which creates a ecs app
119119
| <a name="input_domain"></a> [domain](#input\_domain) | The default domain | `string` | n/a | yes |
120120
| <a name="input_ecr_repository_lifecycle_policy"></a> [ecr\_repository\_lifecycle\_policy](#input\_ecr\_repository\_lifecycle\_policy) | The policy document. This is a JSON formatted string. See more details about [Policy Parameters](http://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html#lifecycle_policy_parameters) in the official AWS docs | `string` | `null` | no |
121121
| <a name="input_ecs_access_policy_enabled"></a> [ecs\_access\_policy\_enabled](#input\_ecs\_access\_policy\_enabled) | Defines if the ecs tasks should have the ecs access policy | `bool` | `false` | no |
122+
| <a name="input_elasticsearch_data_stream_enabled"></a> [elasticsearch\_data\_stream\_enabled](#input\_elasticsearch\_data\_stream\_enabled) | Defines whether there will be a elasticsearch data\_stream, index template, index lifecycle policy created | `bool` | `true` | no |
122123
| <a name="input_elasticsearch_host"></a> [elasticsearch\_host](#input\_elasticsearch\_host) | Defines the elasticsearch host to query for logs | `string` | `null` | no |
123124
| <a name="input_elasticsearch_index_template"></a> [elasticsearch\_index\_template](#input\_elasticsearch\_index\_template) | This defines the properties used within the index template (Only used if create\_elasticsearch\_data\_stream is true) | <pre>object({<br/> additional_fields = map(any)<br/> name = string<br/> priority = number<br/> node_name = string<br/> number_of_shards = number<br/> number_of_replicas = number<br/> })</pre> | <pre>{<br/> "additional_fields": {},<br/> "name": "",<br/> "node_name": "*",<br/> "number_of_replicas": 1,<br/> "number_of_shards": 1,<br/> "priority": 250<br/>}</pre> | no |
124125
| <a name="input_elasticsearch_lifecycle_policy"></a> [elasticsearch\_lifecycle\_policy](#input\_elasticsearch\_lifecycle\_policy) | This defines the properties used within the index lifecycle management policy (Only used if create\_elasticsearch\_data\_stream is true) | <pre>object({<br/> delete_phase_min_age = string<br/> hot_phase_max_primary_shard_size = string<br/> hot_phase_max_age = optional(string)<br/> warm_phase_min_age = string<br/> warm_phase_number_of_replicas = number<br/> })</pre> | <pre>{<br/> "delete_phase_min_age": "28d",<br/> "hot_phase_max_primary_shard_size": "10gb",<br/> "warm_phase_min_age": "0d",<br/> "warm_phase_number_of_replicas": 0<br/>}</pre> | no |

monitoring.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ locals {
1212
module "monitoring" {
1313
count = var.monitoring_enabled ? 1 : 0
1414
source = "justtrackio/ecs-gosoline-monitoring/aws"
15-
version = "2.7.2"
15+
version = "2.7.3"
1616

1717
context = module.this.context
1818

@@ -25,9 +25,10 @@ module "monitoring" {
2525
alarm_kinsumer = var.alarm_kinsumer
2626
alarm_scheduled = var.alarm_scheduled
2727

28-
elasticsearch_index_template = var.elasticsearch_index_template
29-
elasticsearch_lifecycle_policy = var.elasticsearch_lifecycle_policy
30-
elasticsearch_host = local.elasticsearch_host
28+
elasticsearch_data_stream_enabled = var.elasticsearch_data_stream_enabled
29+
elasticsearch_index_template = var.elasticsearch_index_template
30+
elasticsearch_lifecycle_policy = var.elasticsearch_lifecycle_policy
31+
elasticsearch_host = local.elasticsearch_host
3132

3233
kibana_data_view_enabled = var.kibana_data_view_enabled
3334
kibana_space_id = var.kibana_space_id

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,12 @@ variable "ecs_access_policy_enabled" {
362362
description = "Defines if the ecs tasks should have the ecs access policy"
363363
}
364364

365+
variable "elasticsearch_data_stream_enabled" {
366+
type = bool
367+
default = true
368+
description = "Defines whether there will be a elasticsearch data_stream, index template, index lifecycle policy created"
369+
}
370+
365371
variable "elasticsearch_host" {
366372
type = string
367373
default = null

0 commit comments

Comments
 (0)