#5 fixed state handling for public keys
This commit is contained in:
parent
08dffb3e3a
commit
0208cbd960
2
Makefile
2
Makefile
@ -3,7 +3,7 @@ GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
|
|||||||
|
|
||||||
GOFMT ?= gofmt -s
|
GOFMT ?= gofmt -s
|
||||||
|
|
||||||
VERSION = 0.6.0
|
VERSION = 0.6.1
|
||||||
|
|
||||||
test: fmt-check
|
test: fmt-check
|
||||||
go test -i $(TEST) || exit 1
|
go test -i $(TEST) || exit 1
|
||||||
|
@ -2,7 +2,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
gitea = {
|
gitea = {
|
||||||
source = "terraform.local/lerentis/gitea"
|
source = "terraform.local/lerentis/gitea"
|
||||||
version = "0.6.0"
|
version = "0.6.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,9 +91,9 @@ func resourcePublicKeyDelete(d *schema.ResourceData, meta interface{}) (err erro
|
|||||||
func setPublicKeyResourceData(pubKey *gitea.PublicKey, d *schema.ResourceData) (err error) {
|
func setPublicKeyResourceData(pubKey *gitea.PublicKey, d *schema.ResourceData) (err error) {
|
||||||
d.SetId(fmt.Sprintf("%d", pubKey.ID))
|
d.SetId(fmt.Sprintf("%d", pubKey.ID))
|
||||||
d.Set(PublicKeyUser, d.Get(PublicKeyUser).(string))
|
d.Set(PublicKeyUser, d.Get(PublicKeyUser).(string))
|
||||||
d.Set(PublicKey, pubKey.Key)
|
d.Set(PublicKey, d.Get(PublicKey).(string))
|
||||||
d.Set(PublicKeyTitle, pubKey.Title)
|
d.Set(PublicKeyTitle, pubKey.Title)
|
||||||
d.Set(PublicKeyReadOnlyFlag, pubKey.ReadOnly)
|
d.Set(PublicKeyReadOnlyFlag, d.Get(PublicKeyReadOnlyFlag).(bool))
|
||||||
d.Set(PublicKeyCreated, pubKey.Created)
|
d.Set(PublicKeyCreated, pubKey.Created)
|
||||||
d.Set(PublicKeyFingerprint, pubKey.Fingerprint)
|
d.Set(PublicKeyFingerprint, pubKey.Fingerprint)
|
||||||
d.Set(PublicKeyType, pubKey.KeyType)
|
d.Set(PublicKeyType, pubKey.KeyType)
|
||||||
|
Loading…
Reference in New Issue
Block a user