Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions terraform/tfschema/custom_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ func CopyFromBoolOption(diags diag.Diagnostics, tf attr.Value, o **apitypes.Bool
diags.AddError("Error reading from Terraform object", fmt.Sprintf("Can not convert %T to types.Bool", tf))
return
}
value := apitypes.BoolOption{Value: v.Value}
*o = &value
if !v.Null && !v.Unknown {
value := apitypes.BoolOption{Value: v.Value}
*o = &value
return
}
}

func CopyToBoolOption(diags diag.Diagnostics, o *apitypes.BoolOption, t attr.Type, v attr.Value) attr.Value {
Expand Down