Deploying Cloud Functions
Cloud Functions can be deployed using a CLI, the Google Cloud Console, or with APIs. In this section, we will have a look at the first two methods since it's likely that you will be tested on them in the exam.
Deploying Cloud Functions with the Google Cloud Console
To deploy Cloud Functions from the Google Cloud Console, follow these steps:
- Select Cloud Functions from the hamburger menu. You will see the Cloud Functions window. Click on CREATE FUNCTION:
Figure 9.3 – The Cloud Functions menu
- Fill in the name of your function and the region where it will be hosted:
Figure 9.4 – Create function
- Choose the trigger type from the drop-down menu:
Figure 9.5 – Trigger
- Click the SAVE button. If you have chosen to use an HTTP trigger, the URL to call your function with will be generated for you in the URL section, like so:
Figure 9.6 – Cloud Function URL
- If you want to set more advanced settings, click on RUNTIME...