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 "Add override" create modal landed in #106 is AWS-only by design. Non-AWS accounts (Azure, GCP) keep the original read-only empty-state text and gain neither the Add button nor the auto-open. The relevant gate is the provider === 'aws' check at the top of loadOverridesPanel in frontend/src/settings.ts.
This V1 boundary was deliberate — Azure has different payment options (upfront/monthly), GCP has no payment concept at all (just monthly), and the per-service term/payment options live in commitmentOptions.ts keyed per provider. Wiring those into the override modal cleanly is its own piece of work.
commitmentConfigs.azure._default and commitmentConfigs.gcp._default exist in commitmentOptions.ts with the right terms/payments per provider (Azure: 1yr/3yr × upfront/monthly; GCP: 1yr/3yr × monthly).
SERVICE_FIELDS in settings.ts:28 already lists Azure (vm/sql/cosmosdb/redis/search) and GCP (compute/sql/memorystore/storage) services.
The override modal's HTML in index.html is provider-agnostic structurally; only the payment dropdown's static AWS values would need replacing with provider-driven options.
Backend PUT /api/accounts/:id/service-overrides/:provider/:service accepts any provider — the regex at internal/api/validation.go:36 doesn't care.
Fix direction
Drop the canCreate = provider === 'aws' gate in loadOverridesPanel. Make the modal provider-aware:
Replace AWS_OVERRIDE_SERVICES const with a per-provider lookup that derives the service list from SERVICE_FIELDS filtered by the account's provider.
On modal open, populate the payment select dynamically from the provider's commitmentConfigs (or hide it entirely for GCP, which has no payment concept beyond monthly).
The existing excludes-already-overridden-services logic already filters by o.provider === provider — works as-is.
The "Inherit" empty option is still meaningful per provider.
Tests in settings-accounts.test.ts extend the existing Create-override modal describe block with Azure + GCP cases mirroring the AWS ones.
Acceptance criteria
Settings → Accounts → expand an Azure account's overrides → empty-state auto-opens the modal with Azure-specific service + payment options.
Same for GCP, with GCP's monthly-only constraint reflected (or payment field hidden).
Summary
The "Add override" create modal landed in #106 is AWS-only by design. Non-AWS accounts (Azure, GCP) keep the original read-only empty-state text and gain neither the Add button nor the auto-open. The relevant gate is the
provider === 'aws'check at the top ofloadOverridesPanelinfrontend/src/settings.ts.This V1 boundary was deliberate — Azure has different payment options (
upfront/monthly), GCP has no payment concept at all (justmonthly), and the per-service term/payment options live incommitmentOptions.tskeyed per provider. Wiring those into the override modal cleanly is its own piece of work.Why now
commitmentOptions.ts's validity rules. The same hooks (getValidPaymentOptions,getValidTermOptions,isValidCombination) already exist forazureandgcpkeys — we just need to wire the modal to consult them per provider.curl PUT /api/accounts/:id/service-overrides/{azure|gcp}/{service}to set anything per-account.What's already wired
commitmentConfigs.azure._defaultandcommitmentConfigs.gcp._defaultexist incommitmentOptions.tswith the rightterms/paymentsper provider (Azure: 1yr/3yr × upfront/monthly; GCP: 1yr/3yr × monthly).SERVICE_FIELDSinsettings.ts:28already lists Azure (vm/sql/cosmosdb/redis/search) and GCP (compute/sql/memorystore/storage) services.index.htmlis provider-agnostic structurally; only the payment dropdown's static AWS values would need replacing with provider-driven options.PUT /api/accounts/:id/service-overrides/:provider/:serviceaccepts any provider — the regex atinternal/api/validation.go:36doesn't care.Fix direction
Drop the
canCreate = provider === 'aws'gate inloadOverridesPanel. Make the modal provider-aware:AWS_OVERRIDE_SERVICESconst with a per-provider lookup that derives the service list fromSERVICE_FIELDSfiltered by the account's provider.commitmentConfigs(or hide it entirely for GCP, which has no payment concept beyondmonthly).excludes-already-overridden-serviceslogic already filters byo.provider === provider— works as-is.settings-accounts.test.tsextend the existingCreate-override modaldescribe block with Azure + GCP cases mirroring the AWS ones.Acceptance criteria
Out of scope
commitmentOpts.Validatealready routes by provider.