chore: work save
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 4s
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 3m57s
CI Workflow / CI run tests (pull_request) Failing after 5m5s
CI Workflow / CI run build and linting (pull_request) Failing after 4m50s
CI Workflow / Code coverage report (pull_request) Has been skipped
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 4s
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 3m57s
CI Workflow / CI run tests (pull_request) Failing after 5m5s
CI Workflow / CI run build and linting (pull_request) Failing after 4m50s
CI Workflow / Code coverage report (pull_request) Has been skipped
This commit is contained in:
parent
411e99739a
commit
d6d3a795bb
118 changed files with 3101 additions and 18065 deletions
|
|
@ -40,7 +40,7 @@ func InstanceDataSourceSchema(ctx context.Context) schema.Schema {
|
|||
Description: "The host of the instance.",
|
||||
MarkdownDescription: "The host of the instance.",
|
||||
},
|
||||
"port": schema.Int64Attribute{
|
||||
"port": schema.Int32Attribute{
|
||||
Computed: true,
|
||||
Description: "The port of the instance.",
|
||||
MarkdownDescription: "The port of the instance.",
|
||||
|
|
@ -164,12 +164,12 @@ func InstanceDataSourceSchema(ctx context.Context) schema.Schema {
|
|||
),
|
||||
},
|
||||
},
|
||||
"replicas": schema.Int64Attribute{
|
||||
"replicas": schema.Int32Attribute{
|
||||
Computed: true,
|
||||
Description: "How many replicas the instance should have.",
|
||||
MarkdownDescription: "How many replicas the instance should have.",
|
||||
},
|
||||
"retention_days": schema.Int64Attribute{
|
||||
"retention_days": schema.Int32Attribute{
|
||||
Computed: true,
|
||||
Description: "How long backups are retained. The value can only be between 32 and 365 days.",
|
||||
MarkdownDescription: "How long backups are retained. The value can only be between 32 and 365 days.",
|
||||
|
|
@ -186,7 +186,7 @@ func InstanceDataSourceSchema(ctx context.Context) schema.Schema {
|
|||
Description: "The storage class for the storage.",
|
||||
MarkdownDescription: "The storage class for the storage.",
|
||||
},
|
||||
"size": schema.Int64Attribute{
|
||||
"size": schema.Int32Attribute{
|
||||
Computed: true,
|
||||
Description: "The storage size in Gigabytes.",
|
||||
MarkdownDescription: "The storage size in Gigabytes.",
|
||||
|
|
@ -223,8 +223,8 @@ type InstanceModel struct {
|
|||
Network NetworkValue `tfsdk:"network"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
Region types.String `tfsdk:"region"`
|
||||
Replicas types.Int64 `tfsdk:"replicas"`
|
||||
RetentionDays types.Int64 `tfsdk:"retention_days"`
|
||||
Replicas types.Int32 `tfsdk:"replicas"`
|
||||
RetentionDays types.Int32 `tfsdk:"retention_days"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
Storage StorageValue `tfsdk:"storage"`
|
||||
Version types.String `tfsdk:"version"`
|
||||
|
|
@ -634,12 +634,12 @@ func (t WriteType) ValueFromObject(ctx context.Context, in basetypes.ObjectValue
|
|||
return nil, diags
|
||||
}
|
||||
|
||||
portVal, ok := portAttribute.(basetypes.Int64Value)
|
||||
portVal, ok := portAttribute.(basetypes.Int32Value)
|
||||
|
||||
if !ok {
|
||||
diags.AddError(
|
||||
"Attribute Wrong Type",
|
||||
fmt.Sprintf(`port expected to be basetypes.Int64Value, was: %T`, portAttribute))
|
||||
fmt.Sprintf(`port expected to be basetypes.Int32Value, was: %T`, portAttribute))
|
||||
}
|
||||
|
||||
if diags.HasError() {
|
||||
|
|
@ -744,12 +744,12 @@ func NewWriteValue(attributeTypes map[string]attr.Type, attributes map[string]at
|
|||
return NewWriteValueUnknown(), diags
|
||||
}
|
||||
|
||||
portVal, ok := portAttribute.(basetypes.Int64Value)
|
||||
portVal, ok := portAttribute.(basetypes.Int32Value)
|
||||
|
||||
if !ok {
|
||||
diags.AddError(
|
||||
"Attribute Wrong Type",
|
||||
fmt.Sprintf(`port expected to be basetypes.Int64Value, was: %T`, portAttribute))
|
||||
fmt.Sprintf(`port expected to be basetypes.Int32Value, was: %T`, portAttribute))
|
||||
}
|
||||
|
||||
if diags.HasError() {
|
||||
|
|
@ -832,7 +832,7 @@ var _ basetypes.ObjectValuable = WriteValue{}
|
|||
|
||||
type WriteValue struct {
|
||||
Host basetypes.StringValue `tfsdk:"host"`
|
||||
Port basetypes.Int64Value `tfsdk:"port"`
|
||||
Port basetypes.Int32Value `tfsdk:"port"`
|
||||
state attr.ValueState
|
||||
}
|
||||
|
||||
|
|
@ -843,7 +843,7 @@ func (v WriteValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error)
|
|||
var err error
|
||||
|
||||
attrTypes["host"] = basetypes.StringType{}.TerraformType(ctx)
|
||||
attrTypes["port"] = basetypes.Int64Type{}.TerraformType(ctx)
|
||||
attrTypes["port"] = basetypes.Int32Type{}.TerraformType(ctx)
|
||||
|
||||
objectType := tftypes.Object{AttributeTypes: attrTypes}
|
||||
|
||||
|
|
@ -898,7 +898,7 @@ func (v WriteValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, d
|
|||
|
||||
attributeTypes := map[string]attr.Type{
|
||||
"host": basetypes.StringType{},
|
||||
"port": basetypes.Int64Type{},
|
||||
"port": basetypes.Int32Type{},
|
||||
}
|
||||
|
||||
if v.IsNull() {
|
||||
|
|
@ -956,7 +956,7 @@ func (v WriteValue) Type(ctx context.Context) attr.Type {
|
|||
func (v WriteValue) AttributeTypes(ctx context.Context) map[string]attr.Type {
|
||||
return map[string]attr.Type{
|
||||
"host": basetypes.StringType{},
|
||||
"port": basetypes.Int64Type{},
|
||||
"port": basetypes.Int32Type{},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2020,12 +2020,12 @@ func (t StorageType) ValueFromObject(ctx context.Context, in basetypes.ObjectVal
|
|||
return nil, diags
|
||||
}
|
||||
|
||||
sizeVal, ok := sizeAttribute.(basetypes.Int64Value)
|
||||
sizeVal, ok := sizeAttribute.(basetypes.Int32Value)
|
||||
|
||||
if !ok {
|
||||
diags.AddError(
|
||||
"Attribute Wrong Type",
|
||||
fmt.Sprintf(`size expected to be basetypes.Int64Value, was: %T`, sizeAttribute))
|
||||
fmt.Sprintf(`size expected to be basetypes.Int32Value, was: %T`, sizeAttribute))
|
||||
}
|
||||
|
||||
if diags.HasError() {
|
||||
|
|
@ -2130,12 +2130,12 @@ func NewStorageValue(attributeTypes map[string]attr.Type, attributes map[string]
|
|||
return NewStorageValueUnknown(), diags
|
||||
}
|
||||
|
||||
sizeVal, ok := sizeAttribute.(basetypes.Int64Value)
|
||||
sizeVal, ok := sizeAttribute.(basetypes.Int32Value)
|
||||
|
||||
if !ok {
|
||||
diags.AddError(
|
||||
"Attribute Wrong Type",
|
||||
fmt.Sprintf(`size expected to be basetypes.Int64Value, was: %T`, sizeAttribute))
|
||||
fmt.Sprintf(`size expected to be basetypes.Int32Value, was: %T`, sizeAttribute))
|
||||
}
|
||||
|
||||
if diags.HasError() {
|
||||
|
|
@ -2218,7 +2218,7 @@ var _ basetypes.ObjectValuable = StorageValue{}
|
|||
|
||||
type StorageValue struct {
|
||||
PerformanceClass basetypes.StringValue `tfsdk:"performance_class"`
|
||||
Size basetypes.Int64Value `tfsdk:"size"`
|
||||
Size basetypes.Int32Value `tfsdk:"size"`
|
||||
state attr.ValueState
|
||||
}
|
||||
|
||||
|
|
@ -2229,7 +2229,7 @@ func (v StorageValue) ToTerraformValue(ctx context.Context) (tftypes.Value, erro
|
|||
var err error
|
||||
|
||||
attrTypes["performance_class"] = basetypes.StringType{}.TerraformType(ctx)
|
||||
attrTypes["size"] = basetypes.Int64Type{}.TerraformType(ctx)
|
||||
attrTypes["size"] = basetypes.Int32Type{}.TerraformType(ctx)
|
||||
|
||||
objectType := tftypes.Object{AttributeTypes: attrTypes}
|
||||
|
||||
|
|
@ -2284,7 +2284,7 @@ func (v StorageValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue,
|
|||
|
||||
attributeTypes := map[string]attr.Type{
|
||||
"performance_class": basetypes.StringType{},
|
||||
"size": basetypes.Int64Type{},
|
||||
"size": basetypes.Int32Type{},
|
||||
}
|
||||
|
||||
if v.IsNull() {
|
||||
|
|
@ -2342,6 +2342,6 @@ func (v StorageValue) Type(ctx context.Context) attr.Type {
|
|||
func (v StorageValue) AttributeTypes(ctx context.Context) map[string]attr.Type {
|
||||
return map[string]attr.Type{
|
||||
"performance_class": basetypes.StringType{},
|
||||
"size": basetypes.Int64Type{},
|
||||
"size": basetypes.Int32Type{},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ func InstancesDataSourceSchema(ctx context.Context) schema.Schema {
|
|||
Description: "List of owned instances and their current status.",
|
||||
MarkdownDescription: "List of owned instances and their current status.",
|
||||
},
|
||||
"page": schema.Int64Attribute{
|
||||
"page": schema.Int32Attribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Description: "Number of the page of items list to be returned.",
|
||||
|
|
@ -62,19 +62,19 @@ func InstancesDataSourceSchema(ctx context.Context) schema.Schema {
|
|||
},
|
||||
"pagination": schema.SingleNestedAttribute{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"page": schema.Int64Attribute{
|
||||
"page": schema.Int32Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"size": schema.Int64Attribute{
|
||||
"size": schema.Int32Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"sort": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"total_pages": schema.Int64Attribute{
|
||||
"total_pages": schema.Int32Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"total_rows": schema.Int64Attribute{
|
||||
"total_rows": schema.Int32Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
|
|
@ -100,7 +100,7 @@ func InstancesDataSourceSchema(ctx context.Context) schema.Schema {
|
|||
),
|
||||
},
|
||||
},
|
||||
"size": schema.Int64Attribute{
|
||||
"size": schema.Int32Attribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Description: "Number of items to be returned on each page.",
|
||||
|
|
@ -130,11 +130,11 @@ func InstancesDataSourceSchema(ctx context.Context) schema.Schema {
|
|||
|
||||
type InstancesModel struct {
|
||||
Instances types.List `tfsdk:"instances"`
|
||||
Page types.Int64 `tfsdk:"page"`
|
||||
Page types.Int32 `tfsdk:"page"`
|
||||
Pagination PaginationValue `tfsdk:"pagination"`
|
||||
ProjectId types.String `tfsdk:"project_id"`
|
||||
Region types.String `tfsdk:"region"`
|
||||
Size types.Int64 `tfsdk:"size"`
|
||||
Size types.Int32 `tfsdk:"size"`
|
||||
Sort types.String `tfsdk:"sort"`
|
||||
}
|
||||
|
||||
|
|
@ -662,12 +662,12 @@ func (t PaginationType) ValueFromObject(ctx context.Context, in basetypes.Object
|
|||
return nil, diags
|
||||
}
|
||||
|
||||
pageVal, ok := pageAttribute.(basetypes.Int64Value)
|
||||
pageVal, ok := pageAttribute.(basetypes.Int32Value)
|
||||
|
||||
if !ok {
|
||||
diags.AddError(
|
||||
"Attribute Wrong Type",
|
||||
fmt.Sprintf(`page expected to be basetypes.Int64Value, was: %T`, pageAttribute))
|
||||
fmt.Sprintf(`page expected to be basetypes.Int32Value, was: %T`, pageAttribute))
|
||||
}
|
||||
|
||||
sizeAttribute, ok := attributes["size"]
|
||||
|
|
@ -680,12 +680,12 @@ func (t PaginationType) ValueFromObject(ctx context.Context, in basetypes.Object
|
|||
return nil, diags
|
||||
}
|
||||
|
||||
sizeVal, ok := sizeAttribute.(basetypes.Int64Value)
|
||||
sizeVal, ok := sizeAttribute.(basetypes.Int32Value)
|
||||
|
||||
if !ok {
|
||||
diags.AddError(
|
||||
"Attribute Wrong Type",
|
||||
fmt.Sprintf(`size expected to be basetypes.Int64Value, was: %T`, sizeAttribute))
|
||||
fmt.Sprintf(`size expected to be basetypes.Int32Value, was: %T`, sizeAttribute))
|
||||
}
|
||||
|
||||
sortAttribute, ok := attributes["sort"]
|
||||
|
|
@ -716,12 +716,12 @@ func (t PaginationType) ValueFromObject(ctx context.Context, in basetypes.Object
|
|||
return nil, diags
|
||||
}
|
||||
|
||||
totalPagesVal, ok := totalPagesAttribute.(basetypes.Int64Value)
|
||||
totalPagesVal, ok := totalPagesAttribute.(basetypes.Int32Value)
|
||||
|
||||
if !ok {
|
||||
diags.AddError(
|
||||
"Attribute Wrong Type",
|
||||
fmt.Sprintf(`total_pages expected to be basetypes.Int64Value, was: %T`, totalPagesAttribute))
|
||||
fmt.Sprintf(`total_pages expected to be basetypes.Int32Value, was: %T`, totalPagesAttribute))
|
||||
}
|
||||
|
||||
totalRowsAttribute, ok := attributes["total_rows"]
|
||||
|
|
@ -734,12 +734,12 @@ func (t PaginationType) ValueFromObject(ctx context.Context, in basetypes.Object
|
|||
return nil, diags
|
||||
}
|
||||
|
||||
totalRowsVal, ok := totalRowsAttribute.(basetypes.Int64Value)
|
||||
totalRowsVal, ok := totalRowsAttribute.(basetypes.Int32Value)
|
||||
|
||||
if !ok {
|
||||
diags.AddError(
|
||||
"Attribute Wrong Type",
|
||||
fmt.Sprintf(`total_rows expected to be basetypes.Int64Value, was: %T`, totalRowsAttribute))
|
||||
fmt.Sprintf(`total_rows expected to be basetypes.Int32Value, was: %T`, totalRowsAttribute))
|
||||
}
|
||||
|
||||
if diags.HasError() {
|
||||
|
|
@ -829,12 +829,12 @@ func NewPaginationValue(attributeTypes map[string]attr.Type, attributes map[stri
|
|||
return NewPaginationValueUnknown(), diags
|
||||
}
|
||||
|
||||
pageVal, ok := pageAttribute.(basetypes.Int64Value)
|
||||
pageVal, ok := pageAttribute.(basetypes.Int32Value)
|
||||
|
||||
if !ok {
|
||||
diags.AddError(
|
||||
"Attribute Wrong Type",
|
||||
fmt.Sprintf(`page expected to be basetypes.Int64Value, was: %T`, pageAttribute))
|
||||
fmt.Sprintf(`page expected to be basetypes.Int32Value, was: %T`, pageAttribute))
|
||||
}
|
||||
|
||||
sizeAttribute, ok := attributes["size"]
|
||||
|
|
@ -847,12 +847,12 @@ func NewPaginationValue(attributeTypes map[string]attr.Type, attributes map[stri
|
|||
return NewPaginationValueUnknown(), diags
|
||||
}
|
||||
|
||||
sizeVal, ok := sizeAttribute.(basetypes.Int64Value)
|
||||
sizeVal, ok := sizeAttribute.(basetypes.Int32Value)
|
||||
|
||||
if !ok {
|
||||
diags.AddError(
|
||||
"Attribute Wrong Type",
|
||||
fmt.Sprintf(`size expected to be basetypes.Int64Value, was: %T`, sizeAttribute))
|
||||
fmt.Sprintf(`size expected to be basetypes.Int32Value, was: %T`, sizeAttribute))
|
||||
}
|
||||
|
||||
sortAttribute, ok := attributes["sort"]
|
||||
|
|
@ -883,12 +883,12 @@ func NewPaginationValue(attributeTypes map[string]attr.Type, attributes map[stri
|
|||
return NewPaginationValueUnknown(), diags
|
||||
}
|
||||
|
||||
totalPagesVal, ok := totalPagesAttribute.(basetypes.Int64Value)
|
||||
totalPagesVal, ok := totalPagesAttribute.(basetypes.Int32Value)
|
||||
|
||||
if !ok {
|
||||
diags.AddError(
|
||||
"Attribute Wrong Type",
|
||||
fmt.Sprintf(`total_pages expected to be basetypes.Int64Value, was: %T`, totalPagesAttribute))
|
||||
fmt.Sprintf(`total_pages expected to be basetypes.Int32Value, was: %T`, totalPagesAttribute))
|
||||
}
|
||||
|
||||
totalRowsAttribute, ok := attributes["total_rows"]
|
||||
|
|
@ -901,12 +901,12 @@ func NewPaginationValue(attributeTypes map[string]attr.Type, attributes map[stri
|
|||
return NewPaginationValueUnknown(), diags
|
||||
}
|
||||
|
||||
totalRowsVal, ok := totalRowsAttribute.(basetypes.Int64Value)
|
||||
totalRowsVal, ok := totalRowsAttribute.(basetypes.Int32Value)
|
||||
|
||||
if !ok {
|
||||
diags.AddError(
|
||||
"Attribute Wrong Type",
|
||||
fmt.Sprintf(`total_rows expected to be basetypes.Int64Value, was: %T`, totalRowsAttribute))
|
||||
fmt.Sprintf(`total_rows expected to be basetypes.Int32Value, was: %T`, totalRowsAttribute))
|
||||
}
|
||||
|
||||
if diags.HasError() {
|
||||
|
|
@ -991,11 +991,11 @@ func (t PaginationType) ValueType(ctx context.Context) attr.Value {
|
|||
var _ basetypes.ObjectValuable = PaginationValue{}
|
||||
|
||||
type PaginationValue struct {
|
||||
Page basetypes.Int64Value `tfsdk:"page"`
|
||||
Size basetypes.Int64Value `tfsdk:"size"`
|
||||
Page basetypes.Int32Value `tfsdk:"page"`
|
||||
Size basetypes.Int32Value `tfsdk:"size"`
|
||||
Sort basetypes.StringValue `tfsdk:"sort"`
|
||||
TotalPages basetypes.Int64Value `tfsdk:"total_pages"`
|
||||
TotalRows basetypes.Int64Value `tfsdk:"total_rows"`
|
||||
TotalPages basetypes.Int32Value `tfsdk:"total_pages"`
|
||||
TotalRows basetypes.Int32Value `tfsdk:"total_rows"`
|
||||
state attr.ValueState
|
||||
}
|
||||
|
||||
|
|
@ -1005,11 +1005,11 @@ func (v PaginationValue) ToTerraformValue(ctx context.Context) (tftypes.Value, e
|
|||
var val tftypes.Value
|
||||
var err error
|
||||
|
||||
attrTypes["page"] = basetypes.Int64Type{}.TerraformType(ctx)
|
||||
attrTypes["size"] = basetypes.Int64Type{}.TerraformType(ctx)
|
||||
attrTypes["page"] = basetypes.Int32Type{}.TerraformType(ctx)
|
||||
attrTypes["size"] = basetypes.Int32Type{}.TerraformType(ctx)
|
||||
attrTypes["sort"] = basetypes.StringType{}.TerraformType(ctx)
|
||||
attrTypes["total_pages"] = basetypes.Int64Type{}.TerraformType(ctx)
|
||||
attrTypes["total_rows"] = basetypes.Int64Type{}.TerraformType(ctx)
|
||||
attrTypes["total_pages"] = basetypes.Int32Type{}.TerraformType(ctx)
|
||||
attrTypes["total_rows"] = basetypes.Int32Type{}.TerraformType(ctx)
|
||||
|
||||
objectType := tftypes.Object{AttributeTypes: attrTypes}
|
||||
|
||||
|
|
@ -1087,11 +1087,11 @@ func (v PaginationValue) ToObjectValue(ctx context.Context) (basetypes.ObjectVal
|
|||
var diags diag.Diagnostics
|
||||
|
||||
attributeTypes := map[string]attr.Type{
|
||||
"page": basetypes.Int64Type{},
|
||||
"size": basetypes.Int64Type{},
|
||||
"page": basetypes.Int32Type{},
|
||||
"size": basetypes.Int32Type{},
|
||||
"sort": basetypes.StringType{},
|
||||
"total_pages": basetypes.Int64Type{},
|
||||
"total_rows": basetypes.Int64Type{},
|
||||
"total_pages": basetypes.Int32Type{},
|
||||
"total_rows": basetypes.Int32Type{},
|
||||
}
|
||||
|
||||
if v.IsNull() {
|
||||
|
|
@ -1163,10 +1163,10 @@ func (v PaginationValue) Type(ctx context.Context) attr.Type {
|
|||
|
||||
func (v PaginationValue) AttributeTypes(ctx context.Context) map[string]attr.Type {
|
||||
return map[string]attr.Type{
|
||||
"page": basetypes.Int64Type{},
|
||||
"size": basetypes.Int64Type{},
|
||||
"page": basetypes.Int32Type{},
|
||||
"size": basetypes.Int32Type{},
|
||||
"sort": basetypes.StringType{},
|
||||
"total_pages": basetypes.Int64Type{},
|
||||
"total_rows": basetypes.Int64Type{},
|
||||
"total_pages": basetypes.Int32Type{},
|
||||
"total_rows": basetypes.Int32Type{},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue