Skip to content

Commit a874128

Browse files
authored
Cloud Run Quickstart - Take 2 (#383)
1 parent 6475fe0 commit a874128

File tree

1 file changed

+10
-22
lines changed

1 file changed

+10
-22
lines changed

docs/quickstarts/03-quickstart-cloudrun.md

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,18 @@ Updated property [core/project].
5656
Use the `gcloud run deploy` command to build and deploy your function in a
5757
single step.
5858

59+
*Note:* If your Cloud Run service will connect to Cloud SQL via the
60+
[Cloud SQL Auth Proxy], then it is important to select the `gen2` Cloud Run
61+
execution environment.
62+
5963
```shell
6064
gcloud run deploy NAME \
61-
--source=PATH \ # can use $PWD or . for current dir
62-
--project=PROJECT \ # the Google Cloud project ID
63-
--region=REGION \ # ex: us-central1
64-
--platform=managed \ # for Cloud Run
65-
--allow-unauthenticated # for public access
65+
--source=PATH \ # can use $PWD or . for current dir
66+
--project=PROJECT \ # the Google Cloud project ID
67+
--region=REGION \ # ex: us-central1
68+
--platform=managed \ # for Cloud Run
69+
--allow-unauthenticated # for public access
70+
--execution-environment=gen2 # helpful if using CloudSQL
6671
```
6772

6873
Since the project ID was saved to the `gcloud` configuration in the
@@ -93,23 +98,6 @@ Service [hello] revision [hello-00001-yen] has been deployed and is serving 100
9398
Service URL: https://hello-gpua4upw6q-uc.a.run.app
9499
```
95100

96-
## If connecting to Cloud SQL
97-
98-
If your Cloud Run service will connect to Cloud SQL via the [Cloud SQL Auth Proxy], then it is important
99-
to select the `gen2` Cloud Run execution environment.
100-
101-
**Note:** To do this, you may need to install the `beta` version of the gcloud CLI, but if this is required, you will be prompted. Enter `y` to accept the extra installation.
102-
103-
```shell
104-
gcloud beta run deploy NAME \
105-
--source=PATH \ # can use $PWD or . for current dir
106-
--project=PROJECT \ # the Google Cloud project ID
107-
--region=REGION \ # ex: us-central1
108-
--platform=managed \ # for Cloud Run
109-
--allow-unauthenticated # for public access
110-
--execution-environment=gen2 # helpful if using CloudSQL
111-
```
112-
113101
<br>
114102

115103
**Congratulations!** You have successfully built and deployed your function

0 commit comments

Comments
 (0)