Skip to content

Commit 51ca55d

Browse files
if a sensitive value is settable, we want to set the returned value (#5835) (#11308)
Signed-off-by: Modular Magician <[email protected]>
1 parent d23e2f7 commit 51ca55d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changelog/5835.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
apikeys: fixed a bug where `google_apikeys_key.key_string` was not being set.
3+
```

google/resource_apikeys_key.go

+3
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,9 @@ func resourceApikeysKeyRead(d *schema.ResourceData, meta interface{}) error {
318318
if err = d.Set("restrictions", flattenApikeysKeyRestrictions(res.Restrictions)); err != nil {
319319
return fmt.Errorf("error setting restrictions in state: %s", err)
320320
}
321+
if err = d.Set("key_string", res.KeyString); err != nil {
322+
return fmt.Errorf("error setting key_string in state: %s", err)
323+
}
321324

322325
return nil
323326
}

0 commit comments

Comments
 (0)