Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set HTTPS flag in a Cloud Function with in a gcloud deploy instrucction

I'm trying to deploy a GCP Cloud Function

gcloud functions deploy MyFuntion --set-env-vars EXPRESSPORT=0000,CODEENV=PRE --region=europe-west1 --entry-point MyPoint --runtime nodejs12 --trigger-http --allow-unauthenticated --ingress-settings=all --memory=256 --timeout=30

But I can't find the flag to set the "Required HTTPS" that you can set in the Web Console:

enter image description here

Does anyone know the instruction?, I can't find it in de Google Cloud documentation.

Thanks in advance.

like image 826
Stornu2 Avatar asked Mar 14 '26 22:03

Stornu2


1 Answers

https://cloud.google.com/functions/docs/writing/http#security_levels

gcloud beta functions deploy \
--security-level=secure-always \
...

NOTE gcloud beta

https://cloud.google.com/sdk/gcloud/reference/beta/functions/deploy#--security-level

like image 152
DazWilkin Avatar answered Mar 16 '26 13:03

DazWilkin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!