1.3.0
This commit is contained in:
@@ -60,7 +60,6 @@ func RGDataSource(ctx context.Context, state *models.DataSourceRGModel, c *clien
|
||||
LockStatus: types.StringValue(recordRG.LockStatus),
|
||||
Milestones: types.Int64Value(int64(recordRG.Milestones)),
|
||||
Name: types.StringValue(recordRG.Name),
|
||||
RegisterComputes: types.BoolValue(recordRG.RegisterComputes),
|
||||
ResourceLimits: flattenResourceLimits(ctx, &recordRG.ResourceLimits),
|
||||
ResourceTypes: flattens.FlattenSimpleTypeToList(ctx, types.StringType, &recordRG.ResTypes),
|
||||
Secret: types.StringValue(recordRG.Secret),
|
||||
|
||||
@@ -71,7 +71,6 @@ func RGListDataSource(ctx context.Context, state *models.DataSourceRGListModel,
|
||||
Milestones: types.Int64Value(int64(rgItem.Milestones)),
|
||||
Name: types.StringValue(rgItem.Name),
|
||||
ResTypes: flattens.FlattenSimpleTypeToList(ctx, types.StringType, &rgItem.ResTypes),
|
||||
RegisterComputes: types.BoolValue(rgItem.RegisterComputes),
|
||||
ResourceLimits: flattenResourceLimits(ctx, &rgItem.ResourceLimits),
|
||||
Secret: types.StringValue(rgItem.Secret),
|
||||
Status: types.StringValue(rgItem.Status),
|
||||
|
||||
@@ -70,7 +70,6 @@ func RGListDeletedDataSource(ctx context.Context, state *models.DataSourceRGList
|
||||
Milestones: types.Int64Value(int64(rgItem.Milestones)),
|
||||
Name: types.StringValue(rgItem.Name),
|
||||
ResTypes: flattens.FlattenSimpleTypeToList(ctx, types.StringType, &rgItem.ResTypes),
|
||||
RegisterComputes: types.BoolValue(rgItem.RegisterComputes),
|
||||
ResourceLimits: flattenResourceLimits(ctx, &rgItem.ResourceLimits),
|
||||
Secret: types.StringValue(rgItem.Secret),
|
||||
Status: types.StringValue(rgItem.Status),
|
||||
|
||||
@@ -84,11 +84,6 @@ func CreateRequestResourceRG(ctx context.Context, plan *models.ResourceRGModel)
|
||||
if !plan.ExtIP.IsNull() {
|
||||
createReq.ExtIP = plan.ExtIP.ValueString()
|
||||
}
|
||||
if plan.RegisterComputes.IsNull() {
|
||||
createReq.RegisterComputes = false // default value
|
||||
} else {
|
||||
createReq.RegisterComputes = plan.RegisterComputes.ValueBool()
|
||||
}
|
||||
if !plan.UniqPools.IsUnknown() {
|
||||
uniqPools := make([]string, 0, len(plan.UniqPools.Elements()))
|
||||
diags := plan.UniqPools.ElementsAs(ctx, &uniqPools, true)
|
||||
@@ -177,19 +172,6 @@ func UpdateRG(ctx context.Context, rgId uint64, plan, state *models.ResourceRGMo
|
||||
updateNeeded = true
|
||||
}
|
||||
|
||||
if !plan.RegisterComputes.Equal(state.RegisterComputes) {
|
||||
if plan.RegisterComputes.IsNull() {
|
||||
updateReq.RegisterComputes = false // default value
|
||||
} else {
|
||||
updateReq.RegisterComputes = plan.RegisterComputes.ValueBool()
|
||||
}
|
||||
tflog.Info(ctx, "utilityUpdateRG: new register_computes specified", map[string]any{
|
||||
"rg_id": plan.Id.ValueString(),
|
||||
"register_computes_plan": plan.RegisterComputes.ValueBool(),
|
||||
"register_computes_state": state.RegisterComputes.ValueBool()})
|
||||
updateNeeded = true
|
||||
}
|
||||
|
||||
var updResLimitsNeeded bool
|
||||
|
||||
var resLimitsPlan, resLimitsState models.ResourceLimitsModel
|
||||
|
||||
Reference in New Issue
Block a user