1.1.0
This commit is contained in:
@@ -237,13 +237,6 @@ func (r *resourceRG) Update(ctx context.Context, req resource.UpdateRequest, res
|
||||
// Validate if changes in plan are allowed
|
||||
tflog.Info(ctx, "Update resourceRG: checking def_net is not empty in case of change", map[string]any{
|
||||
"rg_id": state.Id.ValueString()})
|
||||
if !state.DefNet.IsNull() && plan.DefNet.IsNull() {
|
||||
resp.Diagnostics.AddError(
|
||||
"Update resourceRG: Invalid input provided",
|
||||
fmt.Sprintf("block def_net must not be empty for resource with rg_id %d", recordRG.ID),
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
tflog.Info(ctx, "Update resourceRG: checking def_net_type, ipcidr, ext_ip are not changed", map[string]any{
|
||||
"rg_id": state.Id.ValueString(),
|
||||
@@ -370,9 +363,6 @@ func (r *resourceRG) Delete(ctx context.Context, req resource.DeleteRequest, res
|
||||
} else {
|
||||
delReq.Permanently = state.Permanently.ValueBool()
|
||||
}
|
||||
if !state.Reason.IsNull() {
|
||||
delReq.Reason = state.Reason.ValueString()
|
||||
}
|
||||
_, err := r.client.CloudAPI().RG().Delete(ctx, delReq)
|
||||
if err != nil {
|
||||
resp.Diagnostics.AddError("Delete resourceRG: Error deleting resource group with error: ", err.Error())
|
||||
|
||||
Reference in New Issue
Block a user