Skip to content

Commit

Permalink
Make apm-data usage optional
Browse files Browse the repository at this point in the history
  • Loading branch information
axw committed Apr 22, 2024
1 parent 0423d59 commit fdababf
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
8 changes: 5 additions & 3 deletions testing/benchmark/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ module "ec_deployment" {
apm_server_expvar = true
apm_server_pprof = true

elasticsearch_size = var.elasticsearch_size
elasticsearch_zone_count = var.elasticsearch_zone_count
elasticsearch_dedicated_masters = var.elasticsearch_dedicated_masters
elasticsearch_size = var.elasticsearch_size
elasticsearch_zone_count = var.elasticsearch_zone_count
elasticsearch_dedicated_masters = var.elasticsearch_dedicated_masters
elasticsearch_user_settings_yaml = var.use_elasticsearch_apmdata_plugin ? "xpack.apm_data.enabled: true" : ""
delete_integration_index_templates = var.use_elasticsearch_apmdata_plugin

docker_image = var.docker_image_override
docker_image_tag_override = var.docker_image_tag_override
Expand Down
7 changes: 7 additions & 0 deletions testing/benchmark/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ variable "apm_server_zone_count" {
description = "Optional apm server zone count"
}

# TODO(axw) disable by default
variable "use_elasticsearch_apmdata_plugin" {
default = true
type = bool
description = "Enable the Elasticsearch apm-data plugin, and delete integration package index templates."
}

variable "elasticsearch_size" {
default = "8g"
type = string
Expand Down
12 changes: 4 additions & 8 deletions testing/cloud/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,16 @@ module "ec_deployment" {
region = var.ess_region
stack_version = local.stack_version

# TODO(axw) make this optional
delete_integration_index_templates = true
elasticsearch_user_settings_yaml = <<EOF
xpack.apm_data.enabled: true
EOF

deployment_template = var.deployment_template
deployment_name_prefix = "apm-server-testing"

apm_server_size = var.apm_server_size
apm_server_zone_count = var.apm_server_zone_count

elasticsearch_size = var.elasticsearch_size
elasticsearch_zone_count = var.elasticsearch_zone_count
elasticsearch_size = var.elasticsearch_size
elasticsearch_zone_count = var.elasticsearch_zone_count
elasticsearch_user_settings_yaml = var.use_elasticsearch_apmdata_plugin ? "xpack.apm_data.enabled: true" : ""
delete_integration_index_templates = var.use_elasticsearch_apmdata_plugin

observability_deployment = var.observability_deployment

Expand Down
12 changes: 6 additions & 6 deletions testing/cloud/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ variable "apm_server_zone_count" {
description = "Optional apm server zone count"
}

# TODO(axw) make it configurable
#variable "use_elasticsearch_apmdata_plugin" {
# default = false
# type = bool
# description = "Enable the Elasticsearch apm-data plugin, and disable integration package index templates."
#}
# TODO(axw) disable by default
variable "use_elasticsearch_apmdata_plugin" {
default = true
type = bool
description = "Enable the Elasticsearch apm-data plugin, and delete integration package index templates."
}

variable "elasticsearch_size" {
default = "8g"
Expand Down

0 comments on commit fdababf

Please sign in to comment.