## TL;DR
Link the project to an open billing account, or reopen the closed one. Run `gcloud billing projects link [PROJECT_ID] --billing-account=[BILLING_ACCOUNT_ID]` with an open account. Billing stays broken for every linked project until the account is open again, because GCP checks the account state on every billable call.

## The error
```text
The project is linked to a closed billing account
```

## Fix it
1. Confirm which account is closed: `gcloud billing accounts list --format="table(name,displayName,open)"`
   Expected: the account linked to your project shows open=False.
2. Find which project links to it: `gcloud billing projects describe [PROJECT_ID]`
   Expected: billingAccountName points at the closed account.
3. Pick your fix. If you are a billing account admin and the closure was a mistake, reopen it in the console: Billing, select the account, Reactivate. Otherwise link the project to an open account: `gcloud billing projects link [PROJECT_ID] --billing-account=[OPEN_BILLING_ACCOUNT_ID]`
   Expected: output shows billingEnabled: true and the new billingAccountName.
4. Verify billable calls work again: `gcloud billing projects describe [PROJECT_ID]`
   Expected: billingEnabled: true.

## Use this when
- The GCP console shows the closed-billing-account message on a project page
- gcloud or API calls fail right after a billing account was closed or consolidated
- A test or sandbox billing account was closed and its projects stopped working

## Not for this skill when
- The error is about permissions instead (that is a billing IAM problem, not a closed account)
- The billing account is OPEN but the project shows billing disabled (just link it, no reopen needed)
- You are on AWS or Azure (different billing systems entirely)

## Variant phrasings
- GCP project billing disabled because billing account closed
- Reopen a closed GCP billing account
- gcloud billing projects link to move a project to another billing account
- Project shows "billing account is not open"

## Why it happens
GCP requires every project that uses billable services to sit under an open billing account. Closing the account does not unlink the projects; it leaves them linked to a dead account, and every billable API call then fails this check. Closures usually come from org cleanups, consolidating several billing accounts into one, or closing a trial account that still had projects attached.

## Edge cases
- Reopening needs the Billing Account Administrator role on that account; project owners cannot reopen it themselves
- If Google closed the account (for example over a payments violation), you cannot reopen it, so link the projects to a different open account
- After relinking, already-accrued charges stay on the old account; only new usage bills to the new one
- Service usage can take a few minutes to recognize the new billing link, so wait before retrying a failed deploy

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_pCrnQchnMr3MOzXdwP98NA
