fix: adjust to new generator and sdk use
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 5s
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 3m33s
CI Workflow / CI run tests (pull_request) Failing after 4m51s
CI Workflow / CI run build and linting (pull_request) Failing after 4m37s
CI Workflow / Code coverage report (pull_request) Has been skipped
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 5s
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 3m33s
CI Workflow / CI run tests (pull_request) Failing after 4m51s
CI Workflow / CI run build and linting (pull_request) Failing after 4m37s
CI Workflow / Code coverage report (pull_request) Has been skipped
This commit is contained in:
parent
ca0f646526
commit
826bb5b36a
36 changed files with 2089 additions and 1166 deletions
|
|
@ -14,7 +14,7 @@ import (
|
|||
"tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/core"
|
||||
"tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/utils"
|
||||
|
||||
sqlserverflexalphaPkg "tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/pkg_gen/sqlserverflexalpha"
|
||||
"github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/v3alpha1api"
|
||||
|
||||
sqlserverflexalphaGen "tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/services/sqlserverflexalpha/instance/datasources_gen"
|
||||
)
|
||||
|
|
@ -34,7 +34,7 @@ type dataSourceModel struct {
|
|||
}
|
||||
|
||||
type instanceDataSource struct {
|
||||
client *sqlserverflexalphaPkg.APIClient
|
||||
client *v3alpha1api.APIClient
|
||||
providerData core.ProviderData
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ func (d *instanceDataSource) Configure(
|
|||
config.WithRegion(d.providerData.GetRegion()),
|
||||
)
|
||||
}
|
||||
apiClient, err := sqlserverflexalphaPkg.NewAPIClient(apiClientConfigOptions...)
|
||||
apiClient, err := v3alpha1api.NewAPIClient(apiClientConfigOptions...)
|
||||
if err != nil {
|
||||
resp.Diagnostics.AddError(
|
||||
"Error configuring API client",
|
||||
|
|
@ -112,7 +112,7 @@ func (d *instanceDataSource) Read(ctx context.Context, req datasource.ReadReques
|
|||
ctx = tflog.SetField(ctx, "region", region)
|
||||
ctx = tflog.SetField(ctx, "instance_id", instanceId)
|
||||
|
||||
instanceResp, err := d.client.GetInstanceRequest(ctx, projectId, region, instanceId).Execute()
|
||||
instanceResp, err := d.client.DefaultAPI.GetInstanceRequest(ctx, projectId, region, instanceId).Execute()
|
||||
if err != nil {
|
||||
utils.LogError(
|
||||
ctx,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue