Skip to content

Commit

Permalink
Merge pull request #8 from dapperlabs-platform/enable-autoscaling
Browse files Browse the repository at this point in the history
Enable autoscaling by default
  • Loading branch information
Alexander Grieco authored Jun 2, 2022
2 parents f10b558 + 94fbd62 commit 8468643
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ resource "ec_deployment" "elastic_cloud_deployment" {
user_settings_yaml = file("${path.module}/elasticsearch.yml")
}
}
// If a topology is set, this ensures autoscaling will be turned off since turning on autoscaling when a topology is set causes
// issues with the Elastic Cloud provider. Issue: https://github.com/elastic/terraform-provider-ec/issues/467
autoscale = var.elastic_autoscaling && length(var.elastic_topology) == 0
}

kibana {
Expand Down
17 changes: 7 additions & 10 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ variable "enable_anonymous_access" {
default = false
}

variable "elastic_autoscaling" {
description = "This will enable autoscaling on the elasticsearch instances. If elastic_toplogy is set, this should not be set to true"
type = bool
default = true
}

variable "elastic_topology" {
description = "Configuration settings list for desired Elasticsearch topologies. See https://registry.terraform.io/providers/elastic/ec/latest/docs/resources/ec_deployment#topology for definitions of topology settings."
type = list(object({
Expand All @@ -76,16 +82,7 @@ variable "elastic_topology" {
max_size = string
})
}))
default = [
{
id = "hot_content"
size = "4g"
zone_count = 3
autoscaling = {
max_size = "64g"
}
}
]
default = []
}

variable "kibana_topology" {
Expand Down

0 comments on commit 8468643

Please sign in to comment.