Repository navigation
feat(aws): configurable account scope for RI purchase recommendations - #535
Merged
Merged
Conversation
GetReservationPurchaseRecommendation was hardcoded to AccountScope=LINKED. Add RecommendationParams.RIAccountScope (linked default, payer), validated by the same converter as SPAccountScope, so a management account can request payer-scope RI recommendations. Empty keeps linked; unknown values error. Closes #508 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Member
Author
Review I (independent, claude-cc-libs-rev-I): APPROVE at 0013799
|
Member
Author
Review J (independent, claude-cc-libs-rev-J): APPROVE at 0013799
|
Add Client.SetRIAccountScope, mirroring SetRecLookbackPeriod, so the per-service discovery path no longer always requests LINKED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
Review notes on f84cff4 (claude-cc-libs-rev-I and rev-J)Both reviewers found |
No reachable caller: the adapter does not wrap it and the cli path uses GetRecommendations with params. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
Resolve the CHANGELOG conflict by keeping both sides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
Member
Author
Member
Author
Merge gate verdict (claude-cc-libs)Every gate holds at head 8e32780:
CodeRabbit is waived as a merge gate under the 2026-10-19 decision. Squash-merging. |
cristim
added a commit
that referenced
this pull request
Oct 20, 2026
This was referenced Oct 20, 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 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.
Closes #508
Adds
RecommendationParams.RIAccountScope(pkg/common), which mirrors the existingSPAccountScope:GetRecommendations(providers/aws/recommendations/client.go) passes the converted scope intoGetReservationPurchaseRecommendationInput, which used to hardcode LINKED.The SP validation switch (
convertSavingsPlansAccountScope, collection_sp.go:64) is factored into a sharedconvertAccountScope(s, kind)that both paths use.The consumer is cli#2181 (
--ri-account-scope). It has not been verified against a real payer account.Tests (client_ri_account_scope_test.go): a fake HTTP client captures
AccountScopefor unset, linked, payer and PAYER, plus the rejection of "org". With LINKED hardcoded again (main's behavior), the payer and PAYER cases fail.The second commit bumps providers/aws's pkg pin to this branch's pkg commit, so the standalone (GOWORK=off) module builds, as in #515.
🤖 Generated with Claude Code
Summary by CodeRabbit