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:
parent
68859a3fad
commit
435de4c9eb
15 changed files with 1436 additions and 45 deletions
|
|
@ -26,7 +26,7 @@ func AdaptRegion(ctx context.Context, configRegion types.String, planRegion *typ
|
|||
|
||||
// check if the currently configured region corresponds to the planned region
|
||||
// on mismatch override the planned region with the intended region
|
||||
// and force a replace of the resource
|
||||
// and force a replacement of the resource
|
||||
p := path.Root("region")
|
||||
if !intendedRegion.Equal(*planRegion) {
|
||||
resp.RequiresReplace.Append(p)
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
|
||||
"github.com/stackitcloud/stackit-sdk-go/core/utils"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
const (
|
||||
SKEServiceId = "cloud.stackit.ske"
|
||||
SKEServiceId = "cloud.stackit.ske"
|
||||
ModelServingServiceId = "cloud.stackit.model-serving"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -72,7 +72,7 @@ func ListValuetoStringSlice(list basetypes.ListValue) ([]string, error) {
|
|||
return result, nil
|
||||
}
|
||||
|
||||
// Remove leading 0s from backup schedule numbers (e.g. "00 00 * * *" becomes "0 0 * * *")
|
||||
// SimplifyBackupSchedule removes leading 0s from backup schedule numbers (e.g. "00 00 * * *" becomes "0 0 * * *")
|
||||
// Needed as the API does it internally and would otherwise cause inconsistent result in Terraform
|
||||
func SimplifyBackupSchedule(schedule string) string {
|
||||
regex := regexp.MustCompile(`0+\d+`) // Matches series of one or more zeros followed by a series of one or more digits
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue