Skip to content

Commit e35ebf3

Browse files
authored
Merge pull request #138 from FlutterFlow/pinkesh/cloud-functions-faq
Added FAQ for cloud functions
2 parents 21ad93a + 19d6d15 commit e35ebf3

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

docs/ff-concepts/adding-customization/cloud-functions.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,27 @@ com/embed/0c4306c1951a4d9099aa96324c7561af?sid=69709110-ad60-4e98-bf53-36a50a99e
249249

250250
## FAQs
251251

252+
<details>
253+
<summary>Why do cloud function deployments fail on newly created projects?</summary>
254+
255+
This issue occurs because the newly created Google Cloud Platform (GCP) project hasn't been fully configured with the necessary APIs and permissions. Follow the steps below to enable the required APIs and set proper permissions.
256+
257+
1. Open your browser and navigate to the following URL:
258+
`https://console.cloud.google.com/functions/list?referrer=search&hl=en&project=<projectID>`
259+
Replace `<projectID>` with your GCP or Firebase project ID.
260+
2. Click on the **Create Function** button. GCP will prompt you to enable the necessary APIs: **Cloud Build** and **Cloud Functions**.
261+
3. After clicking **Next**, you will be prompted to enable the **Cloud Run Admin API**.
262+
![cloud-run-admin-api](imgs/cloud-run-admin-api.png)
263+
4. Now, you need to grant the default compute service account the appropriate permissions. In the next page, you will see the option to deploy an example cloud function like `helloHttp`. Deploy this function. You will be prompted to grant permissions to the default compute service account. The message will look like:
264+
`You need to grant the following roles to the build service account to deploy a function:
265+
roles/cloudbuild.builds.builder to <projectID>[email protected].`
266+
5. Click **Grant** to provide the required permissions and deploy the example cloud function. Once deployed, you can delete this function if you wish.
267+
268+
With the required permissions granted, you should now be able to deploy cloud functions from FlutterFlow without any further issues.
269+
270+
</details>
271+
272+
252273
<details>
253274
<summary>I am getting Cloud Function Deployment Errors</summary>
254275

Loading

0 commit comments

Comments
 (0)