Open2
GCPのCloud Functionのdeployで容量が足りない時
容量が足りない...
(gcloud.functions.deploy) Uncompressed deployment is 755248888B, bigger than maximum allowed size of 536870912B.
そんな時は第二世代を試してみよう
$ gcloud functions deploy {関数名} --gen2
そう、 --gen2これを付け足すだけ
あとは、以下を有効化する必要あり
# Cloud Build APIを有効化
$ gcloud services enable cloudbuild.googleapis.com
# Cloud Run Admin APIを有効化
$ gcloud services enable run.googleapis.com
# Artifact Registry APIを有効化
$ gcloud services enable artifactregistry.googleapis.com
またすでにある第一世代の関数は削除する必要がある
第二世代の導入に関してはこの記事がわかりやすかった