Onboard Argus (ACL): fix edge cases (#314)

* fix empty acl update/create, update CIDR validator

* fix sigsegv in test, acl description

* Split field mapping, better handle edge cases

* Update stackit/internal/services/argus/instance/resource.go

Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>

---------

Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>
This commit is contained in:
Diogo Ferrão 2024-03-26 13:54:09 +00:00 committed by GitHub
parent 056c000acc
commit 394d5bf8d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 99 additions and 24 deletions

View file

@ -189,7 +189,7 @@ func CIDR() *Validator {
if err != nil {
resp.Diagnostics.Append(validatordiag.InvalidAttributeValueDiagnostic(
req.Path,
fmt.Sprintf("parsing value in CIDR notation: %s", err.Error()),
"parsing value in CIDR notation: invalid CIDR address",
req.ConfigValue.ValueString(),
))
}