-
Notifications
You must be signed in to change notification settings - Fork 549
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
fix identityGroupExists #1567
fix identityGroupExists #1567
Conversation
vault/resource_identity_group.go
Outdated
} | ||
|
||
log.Printf("[DEBUG] Checking if IdentityGroup %q exists", key) | ||
resp, err := readIdentityGroup(client, id, true) | ||
resp, err := client.Logical().Read(path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will break the client controlled consistency (CCC) bits. We may need to take a closer look at the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are no longer supporting schema.Resource.Exists
, we can just call d.SetId("")
in identityGroupRead()
when resp
is nil. Then drop identityGroupExists()
all together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Thanks @benashz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me and seems to resolve the underlying issue. Thank you for your contribution to HashiCorp! :)
Community Note
Closes #1525
Release note for CHANGELOG: