terraform-provider-sumologic icon indicating copy to clipboard operation
terraform-provider-sumologic copied to clipboard

add omitempty tag to ViewFilter in ViewFilterDefinition

Open achugh-sumo opened this issue 1 month ago • 0 comments

Description

Fix: Add omitempty tag to ViewFilter Problem: Creating Sumo Logic roles with selection_type = "Deny" fails with "view_filter_should_be_null" error when view_filter is not specified.

Cause: Unset view_filter fields were serialized as empty strings ("") instead of being omitted from JSON, causing backend validation to fail.

Fix: Added omitempty JSON tag to ViewFilterDefinition.ViewFilter field. Empty values are now omitted from the JSON payload.

Result: Users can now create and update Deny roles without validation errors.

Check list

  • [x] Describe the changes and their purpose
  • [ ] Update HTML docs (if applicable)
  • [x] Update CHANGELOG.md
  • [ ] Check CONTRIBUTING.md for anything forgotten

achugh-sumo avatar Nov 06 '25 05:11 achugh-sumo