Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ML is setup in a deployment without any notification. #872

Open
4 tasks done
massifazio opened this issue Nov 6, 2024 · 0 comments
Open
4 tasks done

ML is setup in a deployment without any notification. #872

massifazio opened this issue Nov 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@massifazio
Copy link

Readiness Checklist

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I am reporting the issue to the correct repository (for multi-repository projects)

Expected Behavior

Deployment is managed by terraform and during creation I got an ML node which has a cost I did not expect
There is a cost that I never setup and I did not receive any notification about it.

ML
Memory 4 GB
Hourly rate $0.2760

I try to remove it using terraform, but I find this error

Error: Provider produced inconsistent result after apply
│
│ When applying changes to module.elastic_cloud.ec_deployment.deployment,
│ provider
│ "module.elastic_cloud.provider[\"[registry.terraform.io/elastic/ec](https://registry.terraform.io/elastic/ec)\"]"
│ produced an unexpected new value: .[elasticsearch.ml](https://elasticsearch.ml/): was null, but now
│ cty.ObjectVal(map[string]cty.Value{"autoscaling":cty.ObjectVal(map[string]cty.Value{"autoscale":cty.NullVal(cty.Bool),
│ "max_size":cty.StringVal("64g"),
│ "max_size_resource":cty.StringVal("memory"),
│ "min_size":cty.StringVal("0g"),
│ "min_size_resource":cty.StringVal("memory"),
│ "policy_override_json":cty.NullVal(cty.String)}),
│ "instance_configuration_id":cty.StringVal("aws.es.ml.c5d"),
│ "instance_configuration_version":cty.NumberIntVal(1),
│ "latest_instance_configuration_id":cty.StringVal("aws.es.ml.c5d"),
│ "latest_instance_configuration_version":cty.NumberIntVal(1),
│ "node_roles":cty.SetVal([]cty.Value{cty.StringVal("ml"),
│ cty.StringVal("remote_cluster_client")}),
│ "node_type_data":cty.NullVal(cty.String),
│ "node_type_ingest":cty.NullVal(cty.String),
│ "node_type_master":cty.NullVal(cty.String),
│ "node_type_ml":cty.NullVal(cty.String), "size":cty.StringVal("4g"),
│ "size_resource":cty.StringVal("memory"),
│ "zone_count":cty.NumberIntVal(1)}).
│
│ This is a bug in the provider, which should be reported in the provider's

Current Behavior

## Terraform definition

resource "ec_deployment" "deployment" {
provider = ec
depends_on = [ ec_deployment_traffic_filter.ip_traffic_filter ]
#
name = "${var.deployment_name}-${var.environment}"
region = "${var.aws_region}"
version = data.ec_stack.latest_patch.version
deployment_template_id = "${var.deployment_template}"
traffic_filter = [ ec_deployment_traffic_filter.ip_traffic_filter.id ]
elasticsearch = {
autoscale = "true"
hot = {
zone_count = "${var.elasticsearch_hot_content.zone_count}"
size = "${var.elasticsearch_hot_content.min_size}"
autoscaling = {
# min_size is not used with autoscale = true
max_size = "${var.elasticsearch_hot_content.max_size}"
max_size_resource = "memory"
}
}
warm = {
zone_count = "${var.elasticsearch_warm_content.zone_count}"
size = "${var.elasticsearch_warm_content.min_size}"
autoscaling = {
# min_size is not used with autoscale = true
max_size = "${var.elasticsearch_warm_content.max_size}"
max_size_resource = "memory"
}
}
master = {
zone_count = "${var.elasticsearch_master_content.zone_count}"
size = "${var.elasticsearch_master_content.size}"
autoscaling = {}
}
}
kibana = {
zone_count = "${var.kibana.zone_count}"
size = "${var.kibana.size}"
version = data.ec_stack.latest_patch.version
}
tags = merge(
{
Name = "elastic-cloud-deployment",
Environment = "${var.environment}",
Deployment = "${var.deployment_name}-${var.environment}"
},
"${var.tags}",
)
}

And here some values that we use
#
environment = "**********"
aws_region = "*********"
deployment_name = "*****"
deployment_version = "8.15.0"
deployment_template = "aws-storage-optimized-dense"
elasticsearch_hot_content = {
zone_count = 3
min_size = "30g"
max_size = "60g"
}
elasticsearch_warm_content = {
zone_count = 3
min_size = "60g"
max_size = "120g"
}
elasticsearch_master_content = {
zone_count = 3
size = "4g"
}
kibana = {
zone_count = 1
size = "4g"
}

Steps to Reproduce

  1. Creating a deployment without creating an ML
  2. deployment is created with ML

Context

Possible Solution

Your Environment

  • Version used: 8.15.0
  • Running against Elastic Cloud SaaS or Elastic Cloud Enterprise and version: ESS
  • Environment name and version (e.g. Go 1.9):
  • Server type and version:
  • Operating System and version:
  • Link to your project:
@massifazio massifazio added the bug Something isn't working label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant