I have an IBM Cloud Code Engine project with a deployed container app. That app needs to access a protected resource. I need to configure an allowlist and add the IP address(es) for the app.
How do I find those IP addresses? Is there an official list?
I found the following API function for IBM Cloud Code Engine to list egress IP addresses.
In a shell and with the IBM Cloud CLI with Code Engine plugin, I performed the following steps:
ibmcloud iam oauth-tokens --output jsonto obtain the access tokenibmcloud ce project listto obtain the Code Engine project ID and region of my projectcurl -X GET "https://api.REGION.codeengine.cloud.ibm.com/v2/projects/PROJECT_ID/egress_ips" -H "Authorization: Bearer TOKEN"replace the parameters and call the API functionThe list of returned IP addresses needs to be added in the allowlist.