chore(terraform): use a util func to build internal terraform id (#869)
This commit is contained in:
parent
801ef6033d
commit
b313ef6a39
72 changed files with 205 additions and 538 deletions
|
|
@ -8,6 +8,8 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/utils"
|
||||
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
|
||||
cdnUtils "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/cdn/utils"
|
||||
|
||||
|
|
@ -274,9 +276,7 @@ func mapCustomDomainFields(customDomain *cdn.CustomDomain, model *CustomDomainMo
|
|||
return fmt.Errorf("Status missing in response")
|
||||
}
|
||||
|
||||
id := model.ProjectId.ValueString() + core.Separator + model.DistributionId.ValueString() + core.Separator + *customDomain.Name
|
||||
|
||||
model.ID = types.StringValue(id)
|
||||
model.ID = utils.BuildInternalTerraformId(model.ProjectId.ValueString(), model.DistributionId.ValueString(), *customDomain.Name)
|
||||
model.Status = types.StringValue(string(*customDomain.Status))
|
||||
|
||||
customDomainErrors := []attr.Value{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue