feat: initial copy of v0.1.0
This commit is contained in:
parent
4cc801a7f3
commit
7d4cbb6b08
538 changed files with 63361 additions and 55213 deletions
|
|
@ -11,7 +11,8 @@ import (
|
|||
"github.com/hashicorp/terraform-plugin-framework/attr"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
|
||||
|
||||
"tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/core"
|
||||
)
|
||||
|
||||
func ToString(ctx context.Context, v attr.Value) (string, error) {
|
||||
|
|
@ -89,6 +90,16 @@ func StringValueToPointer(s basetypes.StringValue) *string {
|
|||
return &value
|
||||
}
|
||||
|
||||
// Int32ValueToPointer converts basetypes.Int64Value to a pointer to int64.
|
||||
// It returns nil if the value is null or unknown.
|
||||
func Int32ValueToPointer(s basetypes.Int32Value) *int32 {
|
||||
if s.IsNull() || s.IsUnknown() {
|
||||
return nil
|
||||
}
|
||||
value := s.ValueInt32()
|
||||
return &value
|
||||
}
|
||||
|
||||
// Int64ValueToPointer converts basetypes.Int64Value to a pointer to int64.
|
||||
// It returns nil if the value is null or unknown.
|
||||
func Int64ValueToPointer(s basetypes.Int64Value) *int64 {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-framework/diag"
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
|
||||
|
||||
"tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/core"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/hashicorp/terraform-plugin-framework/attr"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue