spring-bootcloud-foundrypivotal-web-services

Trying to Deploy a PCF Spring Boot App which requires a static IP


I have an application that uses spring boot for a backend and Vue.js as a front end. I have packaged the app into a jar file and deployed to PCF with ease. The problem is the application uses API Keys from https://developer.clashroyale.com/#/getting-started ...these keys require you to input the IP Address that will be used...

Obviously my key will not work unless I give the correct IP address, so how do I retrieve the IP Address for my PCF application so I can generate the proper API Key?

Also, the documentation says that the IP will change with every deployment of my application... Which prompts the question :

Is it impossible to use API Keys that require static IP Addresses with PCF applications?

I have deployed this same application to amazon AWS and it worked because I have a static IP Address that I can use to register a key. I prefer to use PCF, but am having trouble setting it up.


Solution

  • I don't think you will be able to use that API on the PCF platform. Every time you either cf restage or anything to cause the container to be rebuilt/redeployed, the IP will change.

    So in short yes, it's impossible: https://docs.run.pivotal.io/marketplace/external-ips.html