1.1.0
This commit is contained in:
@@ -229,15 +229,8 @@ func (r *resourceImageVirtual) Delete(ctx context.Context, req resource.DeleteRe
|
||||
ctx, cancel := context.WithTimeout(ctx, deleteTimeout)
|
||||
defer cancel()
|
||||
|
||||
var permanently bool
|
||||
if state.Permanently.IsNull() {
|
||||
permanently = true
|
||||
} else {
|
||||
permanently = state.Permanently.ValueBool()
|
||||
}
|
||||
|
||||
// Delete image
|
||||
_, err := r.client.CloudAPI().Image().Delete(ctx, image.DeleteRequest{ImageID: uint64(state.ImageId.ValueInt64()), Permanently: permanently})
|
||||
_, err := r.client.CloudAPI().Image().Delete(ctx, image.DeleteRequest{ImageID: uint64(state.ImageId.ValueInt64())})
|
||||
if err != nil {
|
||||
resp.Diagnostics.AddError("Error deleting image virtual with error: ", err.Error())
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user