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

Remove a keystore key is not possible #888

Open
4 tasks done
kuisathaverat opened this issue Feb 11, 2025 · 0 comments
Open
4 tasks done

Remove a keystore key is not possible #888

kuisathaverat opened this issue Feb 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@kuisathaverat
Copy link
Contributor

kuisathaverat commented Feb 11, 2025

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

When you remove a key from the keystone configuration, it should be removed from the deployment.

Current Behavior

The key is not removed

## Terraform definition

Create configuration A

terraform {
  required_version = ">= 0.12.29"

  required_providers {
    ec = {
      source  = "elastic/ec"
      version = "0.12.2"
    }
  }
}

provider "ec" {
  endpoint = "https://my.ece-environment.corp"
  insecure = true
  apikey = "my-apikey"
}

data "ec_stack" "latest" {
  version_regex = "latest"
  region        = "us-east-1"
}

resource "ec_deployment" "example_minimal" {
  name = "my_example_deployment"
  region                 = "us-east-1"
  version                = data.ec_stack.latest.version
  deployment_template_id = "aws-io-optimized-v2"
  elasticsearch = {
    hot = {
      autoscaling = {}
    }
    keystore_contents = {
    "gcs.client.external.credentials_file" = {
      value         = file("./gcp-credentials.json")
      as_file       = true
    }
  }
}

Update configuration B without the key

terraform {
  required_version = ">= 0.12.29"

  required_providers {
    ec = {
      source  = "elastic/ec"
      version = "0.12.2"
    }
  }
}

provider "ec" {
  endpoint = "https://my.ece-environment.corp"
  insecure = true
  apikey = "my-apikey"
}

data "ec_stack" "latest" {
  version_regex = "latest"
  region        = "us-east-1"
}

resource "ec_deployment" "example_minimal" {
  name = "my_example_deployment"
  region                 = "us-east-1"
  version                = data.ec_stack.latest.version
  deployment_template_id = "aws-io-optimized-v2"
  elasticsearch = {
    hot = {
      autoscaling = {}
    }
}

Steps to Reproduce

  1. create a deployment with the configuration A (see below)
  2. update the deployment with the configuration B
  3. Check that the keystore still contains the key gcs.client.external.credentials_file

Context

Possible Solution

The workaround is remove the key manually from the UI.

Your Environment

  • Version used: 0.12.2
  • Running against Elastic Cloud SaaS or Elastic Cloud Enterprise and version: ECH production
  • Environment name and version (e.g. Go 1.9):
  • Server type and version:
  • Operating System and version:
  • Link to your project:
@kuisathaverat kuisathaverat added the bug Something isn't working label Feb 11, 2025
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