-
Notifications
You must be signed in to change notification settings - Fork 121
Description
Describe the bug
After upgrading from Elastic v7.17.3 > v8.1.1, when running an apply
on a custom module which uses the Elasticstack provider, the resource elastistack_elasticsearch_security_user
generates the following error message: Error : Unable to find a user in the cluster.
.
For context, the user existed when we were on V7.17.3, and it was lost as part of the upgrade. We had not seen this error before.
Remediation
In order to resolve the issue, we had to manually re-create the security user in the Elastic console, then when I subsequently ran a plan
and apply
, Terraform was able to see the user and the apply
was successful.
I would expect Terraform to be able to see the drift in state and real-world, such that the user had been deleted as part of the V8.1.1 upgrade, and subsequently force a replacement. Instead of giving us the error message above.
Debug output
Error : Unable to find a user in the cluster.
…in resource "elastistack_elasticsearch_security_user" "user":
1: resource "elastistack_elasticsearch_security_user" "user" {
Unable to get user: 'user-XXX' from the cluster.
Versions:
- Terraform Version 1.0.8
- Provider version 0.3.3
- Elasticsearch Version 8.1.1
If you require further information, please @ me in the comments. Thanks