terraform-provider-sumologic
terraform-provider-sumologic copied to clipboard
add omitempty tag to ViewFilter in ViewFilterDefinition
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.mdfor anything forgotten