Skip to content

Commit 372c219

Browse files
comments
1 parent b8697e8 commit 372c219

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/provider/flexible_board_resource.go

+3
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,9 @@ func flattenBoardPanelPosition(
693693
diags *diag.Diagnostics,
694694
statePosition client.BoardPanelPosition,
695695
) types.List {
696+
// we use negative numbers to indicate that the panel position was never set. We use this to not write to state when panel position is not set.
697+
// This is a workaround for the various limitations that terraform v5 protocol presents.
698+
// Without this workaround, whenever the API generates a default position, terraform would complain about a schema mismatch between config and applied results.
696699
if statePosition.Height == 0 && statePosition.Width == 0 && statePosition.X == -1 && statePosition.Y == -1 {
697700
return types.ListNull(types.ObjectType{AttrTypes: models.BoardPanelPositionModelAttrType})
698701
}

0 commit comments

Comments
 (0)