1.1.0
This commit is contained in:
@@ -83,7 +83,7 @@ func (r *resourceLB) Create(ctx context.Context, req resource.CreateRequest, res
|
||||
// framework would mark resource as tainted and delete it, which would be unwanted behaviour.
|
||||
|
||||
// enable or disable lb, warnings added to resp.Diagnostics in case of failure.
|
||||
if !plan.Enable.IsNull() { // Enable is optional
|
||||
if !plan.Enable.ValueBool() { // Enable is optional
|
||||
diags := utilities.LBEnableDisable(ctx, &plan, r.client)
|
||||
for _, d := range diags {
|
||||
if d.Severity() == diag.SeverityError {
|
||||
@@ -307,17 +307,10 @@ func (r *resourceLB) Delete(ctx context.Context, req resource.DeleteRequest, res
|
||||
ctx, cancel := context.WithTimeout(ctx, readTimeout)
|
||||
defer cancel()
|
||||
|
||||
var permanently bool
|
||||
if state.Permanently.IsNull() {
|
||||
permanently = true
|
||||
} else {
|
||||
permanently = state.Permanently.ValueBool()
|
||||
}
|
||||
|
||||
// Delete existing lb
|
||||
delReq := lb.DeleteRequest{
|
||||
LBID: uint64(state.LBID.ValueInt64()),
|
||||
Permanently: permanently,
|
||||
Permanently: state.Permanently.ValueBool(),
|
||||
}
|
||||
|
||||
tflog.Info(ctx, "Delete resourceLB: calling CloudAPI().LB().Delete", map[string]any{
|
||||
|
||||
Reference in New Issue
Block a user