Skip to content

Update Readme to use --runtime flag for function creation #11

@stealthybox

Description

@stealthybox

email notice from Google Cloud

When you create a new function using the gcloud CLI, you can specify a runtime for your function by using the --runtime flag, for example:

$ gcloud functions deploy myCloudFunction --trigger-http --runtime nodejs6

Currently, if you do not specify a runtime when creating your function, your runtime will automatically default to Node.js 6.

On April 1, 2019, the --runtime flag will become mandatory. Attempts to create new functions without specifying a supported runtime will be blocked. We are making this change because Cloud Functions now supports multiple runtimes (including Go 1.11, Node.js 6, Node.js 8, and Python 3.7) and we want to ensure that your function is not created using a runtime that is incompatible with your code.

To minimize any disruptions, you must explicitly select a runtime when creating new functions using the gcloud CLI. You can select a runtime by passing the --runtime flag with a suitable value such as go111, nodejs6, nodejs8 or python37. You can still create functions without specifying the --runtime flag until April 1, 2019, however this is not recommended.

If you have set up automated deployments using the gcloud CLI (for example, a Cloud Build trigger that deploys when you update a source code repository), we recommend that you also update these automated deployments.

As a side, note the gcloud functions command is no longer beta :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions