chore(terraform): use a util func to build internal terraform id (#869)

This commit is contained in:
Ruben Hönle 2025-06-12 14:41:57 +02:00 committed by GitHub
parent 801ef6033d
commit b313ef6a39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
72 changed files with 205 additions and 538 deletions

View file

@ -4,7 +4,6 @@ import (
"context"
"fmt"
"net/http"
"strings"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
serverupdateUtils "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverupdate/utils"
@ -209,10 +208,7 @@ func mapSchedulesDatasourceFields(ctx context.Context, schedules *serverupdate.G
projectId := model.ProjectId.ValueString()
serverId := model.ServerId.ValueString()
idParts := []string{projectId, region, serverId}
model.ID = types.StringValue(
strings.Join(idParts, core.Separator),
)
model.ID = utils.BuildInternalTerraformId(projectId, region, serverId)
model.Region = types.StringValue(region)
for _, schedule := range *schedules.Items {