🐛 Fix AWS provider panics and Route53 tag fetching#6979
Merged
preslavgerchev merged 3 commits intomainfrom Mar 18, 2026
Merged
Conversation
Fix singular resource accessor functions in aws_route53.go and aws_ecs.go that returned nil, nil without first setting plugin.StateIsSet | plugin.StateIsNull, which could cause panics when the runtime tried to use the unset field. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The hosted zone ID from AWS includes a `/hostedzone/` prefix (e.g. `/hostedzone/Z1234`), but the tagging API expects just the bare ID. Strip the prefix before batch-fetching and looking up tags. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Contributor
VasilSirakov
approved these changes
Mar 18, 2026
Add guidance to CLAUDE.md about always setting plugin.StateIsSet | plugin.StateIsNull before returning nil, nil from singular resource accessor functions. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
vjeffrey
approved these changes
Mar 18, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
StateIsNullon nil returns for singular resource accessors inaws_route53.goandaws_ecs.go— 11return nil, nilstatements across 9 functions were missingplugin.StateIsSet | plugin.StateIsNull, which could cause panics when the runtime accessed unset fields./hostedzone/prefix (e.g./hostedzone/Z1234), but the tagging API expects the bare ID. Tags were never being matched to zones.Test plan
make providers/build/aws && make providers/install/aws)mql run aws -c "aws.route53.hostedZones { tags }"mql run aws -c "aws.route53.hostedZones { queryLoggingConfig }"mql run aws -c "aws.ecs.taskDefinitions { ephemeralStorage }"🤖 Generated with Claude Code