feat(LXC): add ssh-keys
Some checks failed
CI / build (push) Failing after 3m54s
CI / lint (push) Failing after 3m24s
CI / pkl-validate (push) Successful in 15s
CI / integration-tests (push) Has been skipped
CI / conformance-tests (latest) (push) Has been skipped

This commit is contained in:
2026-02-14 20:59:42 +01:00
parent 7f84ceaafd
commit 48451c6717
3 changed files with 20 additions and 14 deletions

14
lxc.go
View File

@@ -8,6 +8,7 @@ import (
"net/http"
"net/url"
"strconv"
"strings"
"github.com/platform-engineering-labs/formae/pkg/plugin/resource"
)
@@ -67,12 +68,13 @@ func (p *Plugin) CreateLXC(ctx context.Context, req *resource.CreateRequest) (*r
}
urlparams := url.Values{
"vmid": {props.VMID},
"ostemplate": {props.OSTemplate},
"password": {props.Password},
"hostname": {props.Hostname},
"cores": {strconv.Itoa(props.Cores)},
"memory": {strconv.Itoa(props.Memory)},
"vmid": {props.VMID},
"ostemplate": {props.OSTemplate},
"password": {props.Password},
"hostname": {props.Hostname},
"cores": {strconv.Itoa(props.Cores)},
"memory": {strconv.Itoa(props.Memory)},
"ssh-public-keys": {strings.Join(props.SSHKeys, "\n")},
}
if props.Description != "" {
urlparams.Add("description", props.Description)