feat: generating code
This commit is contained in:
parent
c329d58970
commit
51663cd8d0
1221 changed files with 271709 additions and 2444 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -15,12 +15,12 @@ import (
|
|||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
"github.com/hashicorp/terraform-plugin-log/tflog"
|
||||
postgresflex "github.com/mhenselin/terraform-provider-stackitprivatepreview/pkg/postgresflexalpha"
|
||||
"github.com/mhenselin/terraform-provider-stackitprivatepreview/pkg/postgresflexalpha/wait"
|
||||
"github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/conversion"
|
||||
"github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/core"
|
||||
postgresflexalpha "github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha/instance/resources_gen"
|
||||
postgresflexUtils "github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha/utils"
|
||||
"github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/utils"
|
||||
wait "github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/wait/postgresflexalpha"
|
||||
"github.com/stackitcloud/stackit-sdk-go/core/oapierror"
|
||||
)
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ func (r *instanceResource) Create(
|
|||
|
||||
func modelToCreateInstancePayload(netAcl []string, model postgresflexalpha.InstanceModel, replVal int32) postgresflex.CreateInstanceRequestPayload {
|
||||
payload := postgresflex.CreateInstanceRequestPayload{
|
||||
Acl: &netAcl,
|
||||
// Acl: &netAcl,
|
||||
BackupSchedule: model.BackupSchedule.ValueStringPointer(),
|
||||
Encryption: &postgresflex.InstanceEncryption{
|
||||
KekKeyId: model.Encryption.KekKeyId.ValueStringPointer(),
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,33 @@
|
|||
package postgresflexalpha
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
// The fwresource import alias is so there is no collision
|
||||
// with the more typical acceptance testing import:
|
||||
// "github.com/hashicorp/terraform-plugin-testing/helper/resource"
|
||||
fwresource "github.com/hashicorp/terraform-plugin-framework/resource"
|
||||
)
|
||||
|
||||
func TestInstanceResourceSchema(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx := context.Background()
|
||||
schemaRequest := fwresource.SchemaRequest{}
|
||||
schemaResponse := &fwresource.SchemaResponse{}
|
||||
|
||||
// Instantiate the resource.Resource and call its Schema method
|
||||
NewInstanceResource().Schema(ctx, schemaRequest, schemaResponse)
|
||||
|
||||
if schemaResponse.Diagnostics.HasError() {
|
||||
t.Fatalf("Schema method diagnostics: %+v", schemaResponse.Diagnostics)
|
||||
}
|
||||
|
||||
// Validate the schema
|
||||
diagnostics := schemaResponse.Schema.ValidateImplementation(ctx)
|
||||
|
||||
if diagnostics.HasError() {
|
||||
t.Fatalf("Schema validation diagnostics: %+v", diagnostics)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue