Enforce only one type per processor#3498
Draft
taylorchandleryoung wants to merge 1 commit intomasterfrom
Draft
Conversation
tessneau
approved these changes
Feb 6, 2026
Member
There was a problem hiding this comment.
tioli: maybe this could fit nicely in processor_common.go since its pretty small, to keep all processor things together?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The user can currently issue a malformed terraform request that returns in a different shape and terraform responds with an error with the provider.
We should prevent this terraform shape.
Changes
Using cursor: had it add a validator that checks for all non default processor fields. If we do this based off of processor names, we would need to update this every time we add a new processor.
Alternative considered
Validators: []validator.Object{ objectvalidator.ExactlyOneOf( path.MatchRelative().AtName("sample"), path.MatchRelative().AtName("quota"), path.MatchRelative().AtName("filter"), // ... all 22+ processor types ), }This runs in the same issue mentioned above that it is fragile when we add new processor types