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

Unable to create a deployment from a snapshot #787

Closed
4 tasks done
tobio opened this issue Feb 27, 2024 · 0 comments · Fixed by #788
Closed
4 tasks done

Unable to create a deployment from a snapshot #787

tobio opened this issue Feb 27, 2024 · 0 comments · Fixed by #788
Labels
bug Something isn't working

Comments

@tobio
Copy link
Member

tobio commented Feb 27, 2024

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

Creating a deployment from a snapshot should 'work', i.e:

  • The deployment is created
  • The snapshot is restored into the new deployment
  • Terraform continues to manage the deployment

Current Behavior

Terraform

# Create an Elastic Cloud deployment
resource "ec_deployment" "elastic_snap" {
  # Optional name.
  name = "xclustered-test-snap"

  # Mandatory fields
  region                 = "gcp-europe-west1"
  version                = var.es_cloud_version
  deployment_template_id = "gcp-general-purpose-v7"
  alias                  = "tvg-xclustered-snap"


  elasticsearch = {
    hot = {
      size        = "2g"
      zone_count  = 1
      autoscaling = {
        max_size = "120g"
        min_size = null
        max_size_resource = "memory"
        min_size_resource = null
        policy_override_json = null
      }
    }
    ml = {
      size        = "2g"
      zone_count  = 1
      autoscaling = {
        max_size = "64g"
        min_size = "0g"
        max_size_resource = "memory"
        min_size_resource = "memory"
        policy_override_json = null
      }
    }
    warm = {
      size        = "2g"
      zone_count  = 1
      autoscaling = {
        max_size = "120g"
        min_size = null
        max_size_resource = "memory"
        min_size_resource = null
        policy_override_json = null
      }
    }
    snapshot_source= {
      source_elasticsearch_cluster_id = "xxx"
      snapshot_name = "yyy"
    }
  }
#
kibana = {
    size        = "1g"
    zone_count  = 1

 }

integrations_server = {
    size        = "2g"
    zone_count  = 1
  }

}

Terraform apply results in:

│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to ec_deployment.elastic_snap, provider "provider[\"registry.terraform.io/elastic/ec\"]" produced an unexpected new value: .elasticsearch.snapshot_source: was
│ cty.ObjectVal(map[string]cty.Value{"snapshot_name":cty.StringVal("yyy"), "source_elasticsearch_cluster_id":cty.StringVal("xxx")}), but
│ now null.
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
@tobio tobio added the bug Something isn't working label Feb 27, 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

Successfully merging a pull request may close this issue.

1 participant