Commit 0695b1f
fix: Import all fields when importing a public key (#104)
The setPublicKeyResourceData function previously set the PublicKeyUser,
PublicKey, and PublicKeyReadOnlyFlag values from the terraform data
itself. While this works fine for data created with terraform, it
doesn't work when importing existing public keys. Imported keys would
have zero values for those fields, forcing a re-create. While this is
not a problem on its own, the delete part of the re-create would then
crash due to an empty username.
This fixes the import so the username and the key are imported from
Gitea's API.
Reviewed-on: https://gitea.com/gitea/terraform-provider-gitea/pulls/104
Co-authored-by: Mathieu Lemay <[email protected]>
Co-committed-by: Mathieu Lemay <[email protected]>1 parent 21ba4bb commit 0695b1f
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
| 93 | + | |
| 94 | + | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
0 commit comments