Skip to content

Commit

Permalink
initial (#6951)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhis3 authored Apr 2, 2024
1 parent 4743344 commit 0b770fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/apphosting/repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ async function promptRepositoryUri(

async function ensureSecretManagerAdminGrant(projectId: string): Promise<void> {
const projectNumber = await getProjectNumber({ projectId });
const cbsaEmail = gcb.getDefaultServiceAccount(projectNumber);
const cbsaEmail = gcb.getDefaultServiceAgent(projectNumber);

const alreadyGranted = await rm.serviceAccountHasRoles(
projectId,
Expand Down
4 changes: 2 additions & 2 deletions src/gcp/cloudbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ export async function deleteRepository(
* This service account is deprecated and future users should bring their own account.
*/
export function getDefaultServiceAccount(projectNumber: string): string {
return `service-${projectNumber}@gcp-sa-cloudbuild.iam.gserviceaccount.com`;
return `${projectNumber}@cloudbuild.gserviceaccount.com`;
}

/**
* Returns the default cloud build service agent.
* This is the account that Cloud Build itself uses when performing operations on the user's behalf.
*/
export function getDefaultServiceAgent(projectNumber: string): string {
return `${projectNumber}@cloudbuild.gserviceaccount.com`;
return `service-${projectNumber}@gcp-sa-cloudbuild.iam.gserviceaccount.com`;
}

0 comments on commit 0b770fe

Please sign in to comment.