Created
May 4, 2021 17:19
-
-
Save grant/33559dad3213cdfd6cd085aa8de1f9e5 to your computer and use it in GitHub Desktop.
Deploy gRPC to Cloud Run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get Cloud Run URL | |
ENDPOINT=$(\ | |
gcloud run services list \ | |
--project=${PROJECT} \ | |
--region=${REGION} \ | |
--platform=managed \ | |
--format="value(status.address.url)" \ | |
--filter="metadata.name=grpc-calculator") | |
ENDPOINT=${ENDPOINT#https://} && echo ${ENDPOINT} | |
# gRPCurl URL | |
grpcurl \ | |
-proto calculator.proto \ | |
-d '{"first_operand": 2.0, "second_operand": 3.0, "operation": "ADD"}' \ | |
${ENDPOINT}:443 \ | |
Calculator.Calculate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment