fix: preserve empty list vs null for optional list attributes #1

Merged
benvin merged 1 commits from benvin/fix-empty-list-null-inconsistency into main 2026-06-21 18:51:32 +10:00

1 Commits

Author SHA1 Message Date
unkinben d9d8cc7b6d fix: preserve empty list vs null distinction for optional list attributes
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
The API returns null for empty arrays, but OpenTofu requires that the
state match the plan exactly — an empty list [] in the plan must remain
[] in the state, not become null. This caused "inconsistent result after
apply" errors on every resource with empty optional list fields like
mutable_patterns and ban_tags.
2026-06-21 18:42:14 +10:00