Conversation
443d1e0 to
cadd8db
Compare
…n query/case blocks when omitted from config
cadd8db to
0c6d87e
Compare
…ing default rule query fields, allowing only custom_query_extension to be set
0c6d87e to
79b2f84
Compare
Base automatically changed from
yuri/SEC-28982-preserve-omitted-query-blocks-default-rule
to
master
March 19, 2026 09:57
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.
Summary
querysub-fields exceptcustom_query_extensionasComputed-only, since default rule query structure is controlled by the API and cannot be changed by userscustom_query_extensionfrom user configbuildUpdateDefaultRuleQueryandcompareQueries— replaced by inline logic that is clearer about intentProblem
Query fields like
aggregation,query,group_by_fields, etc. were marked asOptional, implying users could configure them. In practice, default rules do not allow changes to query structure — the only user-configurable query field iscustom_query_extension. This mismatch could lead users to believe they can modify query fields, and the update code was doing unnecessary round-trip work to "preserve" values that were already in Terraform state.Solution
Optional: truefrom all query sub-fields exceptcustom_query_extensioncurrentState.GetQueries()(the API is the source of truth), patching onlycustom_query_extensionwhen the user has set itTest plan
RECORD=truecustom_query_extensionin config is rejected by Terraform validationcustom_query_extensionapplies correctly on update