Skip to content

chore(exchange): persist an audit-trail record for manual/direct-API RI exchange executes (AWS + Azure) #82

Description

@cristim

Context

Neither the AWS executeExchange handler (internal/api/handler_ri_exchange.go) nor the new Azure executeAzureExchange handler (PR LeanerCloud/cloud-commitments-cli#1515, closes LeanerCloud/cloud-commitments-cli#596) writes a ledger/audit row when an exchange is executed directly via the API (as opposed to the approve/reject scheduled-exchange flow, which does persist via RIExchangeRecord / ExecuteApprovedExchange).

This is a parity gap for both providers, not something LeanerCloud/cloud-commitments-cli#596 introduced -- the AWS direct-execute path already has the same gap.

Scope

  • Decide whether direct-API executes should write to the same ri_exchange_history (or equivalent) table the scheduled-approval flow uses, or a separate audit log.
  • Persist: subscription/account, source reservation IDs, target SKU/region/term, session ID, net payable + currency, status, executed-by (session/API key), timestamp.
  • Apply to both the AWS and Azure execute handlers for consistency.

Notes

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions