Skip to content

Commit

Permalink
refactor: Rename packages
Browse files Browse the repository at this point in the history
  • Loading branch information
adeatcu-ionos committed Jan 29, 2025
1 parent a15eb21 commit 05a059c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ionoscloud/data_source_certificate_manager_auto_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import (
"fmt"
"strings"

certsdk "github.com/ionos-cloud/sdk-go-bundle/products/cert/v2"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
certSDK "github.com/ionos-cloud/sdk-go-bundle/products/cert/v2"

"github.com/ionos-cloud/terraform-provider-ionoscloud/v6/services"
certService "github.com/ionos-cloud/terraform-provider-ionoscloud/v6/services/cert"
certservice "github.com/ionos-cloud/terraform-provider-ionoscloud/v6/services/cert"
)

func dataSourceCertificateManagerAutoCertificate() *schema.Resource {
Expand Down Expand Up @@ -82,7 +83,7 @@ func dataSourceAutoCertificateRead(ctx context.Context, d *schema.ResourceData,
return diag.FromErr(fmt.Errorf("please provide either the auto-certificate ID or name"))
}

var autoCertificate certSDK.AutoCertificateRead
var autoCertificate certsdk.AutoCertificateRead
var err error

if idOk {
Expand All @@ -96,7 +97,7 @@ func dataSourceAutoCertificateRead(ctx context.Context, d *schema.ResourceData,
if err != nil {
return diag.FromErr(fmt.Errorf("an error occurred while fetching auto-certificates: %w", err))
}
var results []certSDK.AutoCertificateRead
var results []certsdk.AutoCertificateRead
if autoCertificates.Items != nil {
for _, autoCertificateItem := range autoCertificates.Items {
if strings.EqualFold(autoCertificateItem.Properties.Name, name.(string)) {
Expand All @@ -114,7 +115,7 @@ func dataSourceAutoCertificateRead(ctx context.Context, d *schema.ResourceData,
autoCertificate = results[0]
}

if err := certService.SetAutoCertificateData(d, autoCertificate); err != nil {
if err := certservice.SetAutoCertificateData(d, autoCertificate); err != nil {
return diag.FromErr(err)
}
return nil
Expand Down

0 comments on commit 05a059c

Please sign in to comment.