Skip to content

Provider produced inconsistent result after apply after provider automatically updates Enterprise Search #994

Description

@rgravlin-figure

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

I expected no "inconsistent result" errors when applying the Terraform manifests.

Current Behavior

This happens locally on MacOS w/ Terraform and with our CI tooling that runs it as well.

After the first time seeing it, I updated the providers to the latest version, which also exhibited the same behavior.

╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ module.elasticsearch_deployment_abc_green.ec_deployment.elastic_deployment,
│ provider "provider[\"registry.terraform.io/elastic/ec\"]" produced an
│ unexpected new value: .enterprise_search.http_endpoint: was null, but now
│ cty.StringVal("http://example.gcp.elastic-cloud.com:9200").
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ module.elasticsearch_deployment_abc_green.ec_deployment.elastic_deployment,
│ provider "provider[\"registry.terraform.io/elastic/ec\"]" produced an
│ unexpected new value: .enterprise_search.resource_id: was null, but now
│ cty.StringVal("example").
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ module.elasticsearch_deployment_abc_green.ec_deployment.elastic_deployment,
│ provider "provider[\"registry.terraform.io/elastic/ec\"]" produced an
│ unexpected new value: .enterprise_search.zone_count: was null, but now
│ cty.NumberIntVal(1).
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ module.elasticsearch_deployment_abc_green.ec_deployment.elastic_deployment,
│ provider "provider[\"registry.terraform.io/elastic/ec\"]" produced an
│ unexpected new value: .enterprise_search.https_endpoint: was null, but now
│ cty.StringVal("https://example.gcp.elastic-cloud.com:443").
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ module.elasticsearch_deployment_abc_green.ec_deployment.elastic_deployment,
│ provider "provider[\"registry.terraform.io/elastic/ec\"]" produced an
│ unexpected new value: .enterprise_search.region: was null, but now
│ cty.StringVal("example").
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ module.elasticsearch_deployment_abc_green.ec_deployment.elastic_deployment,
│ provider "provider[\"registry.terraform.io/elastic/ec\"]" produced an
│ unexpected new value: .enterprise_search.node_type_worker: was null, but
│ now cty.True.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ module.elasticsearch_deployment_abc_green.ec_deployment.elastic_deployment,
│ provider "provider[\"registry.terraform.io/elastic/ec\"]" produced an
│ unexpected new value: .enterprise_search.node_type_connector: was null, but
│ now cty.True.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ module.elasticsearch_deployment_abc_green.ec_deployment.elastic_deployment,
│ provider "provider[\"registry.terraform.io/elastic/ec\"]" produced an
│ unexpected new value: .enterprise_search.node_type_appserver: was null, but
│ now cty.True.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.

## Terraform definition

resource "ec_deployment" "elastic_deployment" {
  name                   = var.deployment_name
  region                 = var.region
  version                = var.elastic_stack_version
  deployment_template_id = var.deployment_template_id

  elasticsearch          = var.elasticsearch_config
  kibana                 = var.kibana_config

  enterprise_search      = {}
  integrations_server    = {}
}

Steps to Reproduce

  1. Created cluster with the definition above
  2. Enterprise Search, regardless of configuration will be created (and then automatically spun down after non-use)
  3. Re-run Terraform and it will want to re-create the Enterprise Search component (with no changes)
  4. Run into the error above

I have tried to disable the enterprise_search component but no matter how I configured it, it always comes back and then gets scaled down automatically.

Context

It requires re-running plan and apply to get past the provider bug, which isn't a massive issue but isn't expected behavior and requires more time and notes for other people to know that this is expected.

Your Environment

  • Terraform version: 1.11.5
  • Version used: 0.12.5
  • Running against Elastic Cloud SaaS or Elastic Cloud Enterprise and version: Elastic Cloud SaaS
  • Operating System and version: Linux Atlantis

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions