Skip to content

Commit

Permalink
fix failing case where resource needs to be recreated
Browse files Browse the repository at this point in the history
  • Loading branch information
fairclothjm committed Feb 22, 2024
1 parent 22a3c6a commit b478ba2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vault/resource_mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,15 @@ func readMount(d *schema.ResourceData, meta interface{}, excludeType bool) error
log.Printf("[DEBUG] Reading mount %s from Vault", path)

mount, err := getMountIfPresent(client, path)
if err != nil {
return err
}

if mount == nil {
d.SetId("")
return nil
}

if err != nil {
return err
}

if !excludeType {
if cfgType, ok := d.GetOk("type"); ok {
// kv-v2 is an alias for kv, version 2. Vault will report it back as "kv"
Expand Down

0 comments on commit b478ba2

Please sign in to comment.