Skip to content

Commit

Permalink
if a sensitive value is settable, we want to set the returned value (#…
Browse files Browse the repository at this point in the history
…5835) (#4139)

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Mar 18, 2022
1 parent 31c8ab0 commit 46235f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/5835.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
apikeys: fixed a bug where `google_apikeys_key.key_string` was not being set.
```
3 changes: 3 additions & 0 deletions google-beta/resource_apikeys_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,9 @@ func resourceApikeysKeyRead(d *schema.ResourceData, meta interface{}) error {
if err = d.Set("restrictions", flattenApikeysKeyRestrictions(res.Restrictions)); err != nil {
return fmt.Errorf("error setting restrictions in state: %s", err)
}
if err = d.Set("key_string", res.KeyString); err != nil {
return fmt.Errorf("error setting key_string in state: %s", err)
}

return nil
}
Expand Down

0 comments on commit 46235f2

Please sign in to comment.