feat: add model serving resource

* add model serving

* add right provider config

* rename model_serving to modelserving

* add model serving custom endpoint everywhere

* rename file

* add default region, docs for model serving

* add right order of wait handler

* rotate after to token

* fixes

* add initial doc files

* address code comments

* refactor region description

* remove warning for not found resources

* add service enablement

* address code comments

* address code comments

* fix datasource

* fix acc test

* review changes

* review changes

* review changes

* review changes

* review changes

* review changes

* review changes

* review changes

* review changes

* embed markdown description

* go tidy

---------

Co-authored-by: Mauritz Uphoff <mauritz.uphoff@me.com>
Co-authored-by: Mauritz Uphoff <39736813+h3adex@users.noreply.github.com>
This commit is contained in:
Patrick Koss 2025-03-28 16:20:25 +01:00 committed by GitHub
parent 68859a3fad
commit 435de4c9eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 1436 additions and 45 deletions

View file

@ -295,3 +295,21 @@ func FileExists() *Validator {
},
}
}
func ValidDurationString() *Validator {
description := "value must be in a valid duration string. Such as \"300ms\", \"-1.5h\" or \"2h45m\".\nValid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\"."
return &Validator{
description: description,
validate: func(_ context.Context, req validator.StringRequest, resp *validator.StringResponse) {
_, err := time.ParseDuration(req.ConfigValue.ValueString())
if err != nil {
resp.Diagnostics.Append(validatordiag.InvalidAttributeValueDiagnostic(
req.Path,
description,
req.ConfigValue.ValueString(),
))
}
},
}
}