How to get the Egress IPs for an IBM Cloud Code Engine Project

This blog post is just a short cheat sheet on how to get the Egress IPs for an IBM Cloud Code Engine Project.

ibmcloud login (-sso)

export CODEENGINE_PROJECT_NAME="MY_PROJECT"
export IBM_CLOUD_RESOURCE_GROUP=MY_RESOURCE_GROUP
export IBM_CLOUD_REGION=us-east

ibmcloud target -r $IBM_CLOUD_REGION
ibmcloud target -g $IBM_CLOUD_RESOURCE_GROUP
OAUTHTOKEN=$(ibmcloud iam oauth-tokens | awk '{print $4;}')

CE_PROJECT_ID=$(ibmcloud ce project list | grep $CODEENGINE_PROJECT_NAME | awk '{print $2;}')
curl -X GET   "https://api.${IBM_CLOUD_REGION}.codeengine.cloud.ibm.com/v2/projects/${CE_PROJECT_ID}/egress_ips"   -H "Authorization: ${OAUTHTOKEN}"


I hope this was useful to you, and let’s see what’s next?

Greetings,

Thomas

#codeengine, #ibmcloud, #cheatsheet, #CURL, #bashscript

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

Up ↑