diff --git a/src/gcp/frameworks.ts b/src/gcp/frameworks.ts index af4ce113eee..0904f44bce1 100644 --- a/src/gcp/frameworks.ts +++ b/src/gcp/frameworks.ts @@ -19,11 +19,20 @@ interface Codebase { rootDirectory: string; } +/** + * Specifies how Backend's data is replicated and served. + * GLOBAL_ACCESS: Stores and serves content from multiple points-of-presence (POP) + * REGIONAL_STRICT: Restricts data and serving infrastructure in Backend's region + * + */ +export type ServingLocality = "GLOBAL_ACCESS" | "REGIONAL_STRICT"; + /** A Backend, the primary resource of Frameworks. */ export interface Backend { name: string; mode?: string; codebase: Codebase; + servingLocality: ServingLocality; labels: Record; createTime: string; updateTime: string; diff --git a/src/init/features/frameworks/index.ts b/src/init/features/frameworks/index.ts index 0f778f16091..c3749671b31 100644 --- a/src/init/features/frameworks/index.ts +++ b/src/init/features/frameworks/index.ts @@ -69,6 +69,7 @@ export async function doSetup(setup: any, projectId: string): Promise { function toBackend(cloudBuildConnRepo: Repository): Omit { return { + servingLocality: "GLOBAL_ACCESS", codebase: { repository: `${cloudBuildConnRepo.name}`, rootDirectory: "/", diff --git a/src/test/init/frameworks/index.spec.ts b/src/test/init/frameworks/index.spec.ts index af678372607..84ecadd34c4 100644 --- a/src/test/init/frameworks/index.spec.ts +++ b/src/test/init/frameworks/index.spec.ts @@ -60,7 +60,8 @@ describe("operationsConverter", () => { createTime: "0", updateTime: "1", }; - const backendInput = { + const backendInput: Omit = { + servingLocality: "GLOBAL_ACCESS", codebase: { repository: cloudBuildConnRepo.name, rootDirectory: "/",