Skip to content

Instantly share code, notes, and snippets.

@grant

grant/deploy.sh

Created May 4, 2021
Embed
What would you like to do?
Deploy gRPC to Cloud Run
# 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