terraform-provider-ec icon indicating copy to clipboard operation
terraform-provider-ec copied to clipboard

ec_deployment: Allow users to reset the Elasticsearch password

Open marclop opened this issue 5 years ago • 1 comments

Overview

To help support cases where the user might have either imported the deployment or changed the password independently, and terraform doesn't have an elasticsearch_password or it's outdated, it would be good to allow users to reset their Elasticsearch password by setting a field boolean field to true.

The endpoint is at /deployments/{deployment_id}/elasticsearch/{ref_id}/_reset-password.

Possible Implementation

Creating a field reset_elasticseach_password of type Bool, where setting the field will reset the Elasticsearch credentials.

marclop avatar Sep 28 '20 16:09 marclop

This would fix my current situation after I imported an existing deployment.

raynigon avatar May 04 '22 13:05 raynigon

In my case, after importing deployment, as mentioned in the docs, credentials are empty, but we can workaround this by terraform state pull > state.json, manually add/change credentials, increment serial number and finally terraform state push state.json

mac2000 avatar Mar 27 '23 08:03 mac2000

In my case, after importing deployment, as mentioned in the docs, credentials are empty, but we can workaround this by terraform state pull > state.json, manually add/change credentials, increment serial number and finally terraform state push state.json

Thanks for sharing this workaround, but I think its too "hacky" to be used in general.

IMHO this should be implemented, especially since there is no migration implemented from 0.5.X to 0.6.X

raynigon avatar Mar 29 '23 07:03 raynigon