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

Handle datastore id mismatch #31

Merged
merged 1 commit into from
Aug 27, 2024
Merged

Conversation

stuart-mclaren-hpe
Copy link
Contributor

Handle the corner case where a returned datastore id may not match the id
in the current terraform state. This should never happen because id's are immutable.

If it does ever occur we will not overwrite any state and will instead raise this error:

Error: error reading datastore

  with hpegl_pc_datastore.test,
  on terraform_plugin_test.tf line 21, in resource "hpegl_pc_datastore" "test":
  21:   resource "hpegl_pc_datastore" "test" {

'id' mismatch: 698de955-87b5-5fe6-b683-78c3948beede !=
698de955-87b5-5fe6-b683-78c3948beede

@stuart-mclaren-hpe stuart-mclaren-hpe force-pushed the write-datastore-id branch 2 times, most recently from bffd608 to e91f78b Compare August 27, 2024 15:05
Handle the corner case where a returned datastore id
may not match the id in the current terraform state.
This should never happen because id's are immutable.

If it does ever occur we will not overwrite any state
and will instead raise this error:

```
Error: error reading datastore

  with hpegl_pc_datastore.test,
  on terraform_plugin_test.tf line 21, in resource "hpegl_pc_datastore" "test":
  21:   resource "hpegl_pc_datastore" "test" {

'id' mismatch: 698de955-87b5-5fe6-b683-78c3948beede !=
698de955-87b5-5fe6-b683-78c3948beede
```
@stuart-mclaren-hpe stuart-mclaren-hpe merged commit 145108d into main Aug 27, 2024
4 checks passed
@stuart-mclaren-hpe stuart-mclaren-hpe deleted the write-datastore-id branch August 27, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants