fix(LXC): network deletion
Some checks failed
CI / build (push) Failing after 3m44s
CI / lint (push) Failing after 3m14s
CI / pkl-validate (push) Successful in 11s
CI / integration-tests (push) Has been skipped
CI / conformance-tests (latest) (push) Has been skipped

This commit is contained in:
2026-02-23 22:44:30 +01:00
parent b8b1bbcdf7
commit 821f0e9f59
3 changed files with 5 additions and 2 deletions

2
lxc.go
View File

@@ -305,7 +305,7 @@ func (p *Plugin) UpdateLXC(ctx context.Context, req *resource.UpdateRequest) (*r
}
toDelete := []string{}
for i := range min(MAX_NETWORK_COUNT, len(desir.Networks)) {
for i := range min(MAX_NETWORK_COUNT, max(len(desir.Networks), len(prior.Networks))) {
if i < len(desir.Networks) {
urlparams.Add(fmt.Sprintf("net%d", i), desir.Networks[i])
} else {