I have tested a few apps with enable-diego on Bluemix. They all broke because of this change. I could fix most, one I'm still struggling with. And none of which I actually wanted to make code changes in.
Instead of code changes being required to my apps, can I automate the mapping of the variables at container level (or any other solution)?
Not tried this but maybe you could create a user provided environment variable and set
edit: You can set user-provided environment variables using the Bluemix UI or using the cf set-env command.