Skip to content

Conversation

taeold
Copy link
Contributor

@taeold taeold commented Mar 25, 2025

The change allows developers to set service account configuration using short notation (e.g. my-sa@) and using string parameters:

import { onRequest } from "firebase-functions/https";
import { defineString } from "firebase-functions/params";
import * as logger from "firebase-functions/logger";

const sa = defineString("SERVICE_ACCOUNT")

export const helloSAParams = onRequest(
  { serviceAccount: sa },
  (request, response) => {
    logger.info("Hello logs!", { structuredData: true });
    response.send("Hello from Firebase!");
  });

export const helloShorthand = onRequest(
  { serviceAccount: "firebase-app-hosting-compute@" },
  (request, response) => {
    logger.info("Hello logs!", { structuredData: true });
    response.send("Hello from Firebase!");
  });

fixes #5224, #8227

@taeold taeold requested review from Berlioz and inlined March 25, 2025 22:14
@taeold taeold merged commit 96d00aa into master Mar 26, 2025
49 checks passed
@taeold taeold deleted the dl-sa-bugs branch March 26, 2025 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to deploy function with service account parameter

2 participants