diff --git a/CHANGELOG.md b/CHANGELOG.md index 69b9f437feb..82f7f149d59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,3 @@ +- Check that billing is enabled and move App Hosting next to Hosting in init list (#7871). - Fix rollouts:create to handle backend regionality & other fixes. (#7862) - Fixed Next.js issue with PPR routes not rendering correctly. (#7625) diff --git a/src/commands/init.ts b/src/commands/init.ts index 8e58bbc8661..050fab4d3a1 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -45,6 +45,12 @@ let choices: { name: "Functions: Configure a Cloud Functions directory and its files", checked: false, }, + { + value: "apphosting", + name: "App Hosting: Configure an apphosting.yaml file for App Hosting", + checked: false, + hidden: false, + }, { value: "hosting", name: "Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys", @@ -87,12 +93,6 @@ let choices: { checked: false, hidden: true, }, - { - value: "apphosting", - name: "App Hosting: Configure an apphosting.yaml file for App Hosting", - checked: false, - hidden: false, - }, ]; if (isEnabled("genkit")) { diff --git a/src/init/features/apphosting.ts b/src/init/features/apphosting.ts index 9a39962f656..39ab29a11e8 100644 --- a/src/init/features/apphosting.ts +++ b/src/init/features/apphosting.ts @@ -2,6 +2,7 @@ import * as clc from "colorette"; import * as utils from "../../utils"; import { Config } from "../../config"; import { readTemplateSync } from "../../templates"; +import { checkBillingEnabled } from "../../gcp/cloudbilling"; const APPHOSTING_YAML_TEMPLATE = readTemplateSync("init/apphosting/apphosting.yaml"); @@ -9,6 +10,8 @@ const APPHOSTING_YAML_TEMPLATE = readTemplateSync("init/apphosting/apphosting.ya * Set up an apphosting.yaml file for a new App Hosting project. */ export async function doSetup(setup: any, config: Config): Promise { + await checkBillingEnabled(setup.projectId); utils.logBullet("Writing default settings to " + clc.bold("apphosting.yaml") + "..."); await config.askWriteProjectFile("apphosting.yaml", APPHOSTING_YAML_TEMPLATE); + utils.logSuccess("Create a new App Hosting backend with `firebase apphosting:backends:create`"); }