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 4m1s
CI Workflow / CI run build and linting (pull_request) Failing after 5m1s
CI Workflow / CI run tests (pull_request) Failing after 5m16s
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 4m1s
CI Workflow / CI run build and linting (pull_request) Failing after 5m1s
CI Workflow / CI run tests (pull_request) Failing after 5m16s
CI Workflow / Code coverage report (pull_request) Has been skipped
This commit is contained in:
parent
d6d3a795bb
commit
7f5802aff0
27 changed files with 802 additions and 962 deletions
|
|
@ -41,11 +41,13 @@ func mapGetInstanceResponseToModel(
|
|||
m.ConnectionInfo = postgresflexalpharesource.NewConnectionInfoValueMust(
|
||||
postgresflexalpharesource.ConnectionInfoValue{}.AttributeTypes(ctx),
|
||||
map[string]attr.Value{
|
||||
"write": postgresflexalpharesource.NewWriteValueMust(
|
||||
// careful - we can not use NewWriteValueMust here
|
||||
"write": basetypes.NewObjectValueMust(
|
||||
postgresflexalpharesource.WriteValue{}.AttributeTypes(ctx),
|
||||
map[string]attr.Value{
|
||||
"host": types.StringValue(resp.ConnectionInfo.Write.Host),
|
||||
"port": types.Int32Value(resp.ConnectionInfo.Write.Port),
|
||||
// note: IDE does not show that port is actually an int64 in the Schema
|
||||
"port": types.Int64Value(int64(resp.ConnectionInfo.Write.Port)),
|
||||
},
|
||||
),
|
||||
},
|
||||
|
|
@ -95,8 +97,8 @@ func mapGetInstanceResponseToModel(
|
|||
}
|
||||
|
||||
m.Network = net
|
||||
m.Replicas = types.Int32Value(int32(resp.GetReplicas()))
|
||||
m.RetentionDays = types.Int32Value(resp.GetRetentionDays())
|
||||
m.Replicas = types.Int64Value(int64(resp.GetReplicas()))
|
||||
m.RetentionDays = types.Int64Value(int64(resp.GetRetentionDays()))
|
||||
|
||||
m.Name = types.StringValue(resp.GetName())
|
||||
|
||||
|
|
@ -106,7 +108,7 @@ func mapGetInstanceResponseToModel(
|
|||
postgresflexalpharesource.StorageValue{}.AttributeTypes(ctx),
|
||||
map[string]attr.Value{
|
||||
"performance_class": types.StringValue(resp.Storage.GetPerformanceClass()),
|
||||
"size": types.Int32Value(resp.Storage.GetSize()),
|
||||
"size": types.Int64Value(int64(resp.Storage.GetSize())),
|
||||
},
|
||||
)
|
||||
if diags.HasError() {
|
||||
|
|
@ -138,14 +140,14 @@ func mapGetDataInstanceResponseToModel(
|
|||
return err
|
||||
}
|
||||
|
||||
m.Replicas = types.Int32Value(int32(resp.GetReplicas()))
|
||||
m.RetentionDays = types.Int32Value(resp.GetRetentionDays())
|
||||
m.Replicas = types.Int64Value(int64(resp.GetReplicas()))
|
||||
m.RetentionDays = types.Int64Value(int64(resp.GetRetentionDays()))
|
||||
m.Status = types.StringValue(string(resp.GetStatus()))
|
||||
storage, diags := postgresflexalphadatasource.NewStorageValue(
|
||||
postgresflexalphadatasource.StorageValue{}.AttributeTypes(ctx),
|
||||
map[string]attr.Value{
|
||||
"performance_class": types.StringValue(resp.Storage.GetPerformanceClass()),
|
||||
"size": types.Int32Value(resp.Storage.GetSize()),
|
||||
"size": types.Int64Value(int64(resp.Storage.GetSize())),
|
||||
},
|
||||
)
|
||||
if diags.HasError() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue