Closed cdavisafc closed 9 years ago
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/78533524.
@cdavisafc CLI Team indicated that all system variables should be returned with 'cf env app-name' Can you verify that you are not seeing VCAP_APPLICATION despite it being set correctly? Thanks
VCAP_APPLICATION is set by the system but is not returned with 'cf env app-name' - you see the same behavior, right?
@cdavisafc I just talked to the rintime team. You used to be able to use cf files
to read the CC's env.log file which included vcap_application however, that file was removed approx 8/19/2014 possibly over concerns that it contained information that required more security. Currently, the only way to view vcap_application is write your app to provide access to it. I asked Dieu/runtime if they wanted to change that and provide an endpoint the CLI can hit to obtain access to the variable but if they do not, there is not much I can do from the CLI side.
I understand the change from the env.log file and why we eliminated it in lieu of the "cf env" command. My question here is why do we treat VCAP_SERVICES differently from VCAP_APPLICATION? They are both system env variables, the former is returned from cf env, the latter is not. Why?
I have a scenario where I need both. When a developer is working locally and using the likes of Spring Cloud Connector (https://github.com/spring-cloud/spring-cloud-connectors) I need to set env variables in my local development environment; Spring Cloud Connector needs both VCAP_SERVICES and VCAP_APPLICATION. I've been teaching people to use "cf files ..." to get those variable values. I can no longer teach them that trick because only one of the values is available with "cf env"
Thanks @cdavisafc
I talked to @dieucao about this and it looks like runtime can get this done pretty easily. I dropped https://www.pivotaltracker.com/story/show/80664762 in the runtime backlog.
When that story is done, the CLI team can extend the functionality to the CLI.
Good?
Cool, thanks @goehmen and @dieucao!
This feature will be in the next release! The story has been accepted so we will go ahead and close this issue.
Nice, thank you!
On Thu, Nov 6, 2014 at 10:18 AM, Derek Richard notifications@github.com wrote:
This feature will be in the next release! The story has been accepted so we will go ahead and close this issue.
— Reply to this email directly or view it on GitHub https://github.com/cloudfoundry/cli/issues/263#issuecomment-62025221.
Seems that the only system env variable returned from this call is VCAP_SERVICES. I don't see any reason why it shouldn't expose all of them, but the one that I need right now is VCAP_APPLICATION.