You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AWS Organizations discovery endpoint (POST /api/accounts/discover-org) has the discovery logic implemented at internal/accounts/org_discovery.go:26-62 but the HTTP handler (internal/api/handler_accounts.go:1077-1084) returns a stub "org discovery not yet implemented" instead of calling the discovery function and persisting results.
When triggered by an admin user on an aws_is_org_root=true account with valid credentials, the endpoint must:
Resolve the management account's credentials via the resolver
Call DiscoverOrgAccounts(ctx, cfg) to list all member accounts from the Organizations API
Deduplicate by (provider, external_id) — skip member accounts that already exist in cloud_accounts
Create new rows in cloud_accounts for each new member, with enabled=false and aws_auth_mode=bastion (defaulting to bastion-chain from org root)
Gap
The AWS Organizations discovery endpoint (POST /api/accounts/discover-org) has the discovery logic implemented at
internal/accounts/org_discovery.go:26-62but the HTTP handler (internal/api/handler_accounts.go:1077-1084) returns a stub"org discovery not yet implemented"instead of calling the discovery function and persisting results.When triggered by an admin user on an
aws_is_org_root=trueaccount with valid credentials, the endpoint must:DiscoverOrgAccounts(ctx, cfg)to list all member accounts from the Organizations API(provider, external_id)— skip member accounts that already exist incloud_accountscloud_accountsfor each new member, withenabled=falseandaws_auth_mode=bastion(defaulting to bastion-chain from org root){ "discovered": count, "created": count, "skipped": count }Spec sections:
specs/multi-account-execution/acceptance.mdF-1, F-2, F-3;specs/multi-account-execution/api.md"POST /api/accounts/discover-org".Acceptance criteria
requirePermission)aws_is_org_root=falsediscovered/created/skippedcounts; new member accounts appear inGET /api/accountswithenabled=false(provider, external_id)are skipped and counted separatelyOut of scope
References
specs/multi-account-execution/acceptance.mdscenarios F-1 → F-3internal/accounts/org_discovery.go:26-62+internal/accounts/org_discovery_test.gointernal/api/handler_accounts.go:1077-1084