I have an app in Pivotal Cloud Foundry bound to Hashicorp Vault Service Broker service. The following environment variables are injected into the app due to this binding:
"system_env_json" : { "VCAP_SERVICES" : { "hashicorp-vault" : [{ "credentials" : { "address" : "XXX", "auth" : { "accessor" : "XXX", "token" : "XXX" }, } } ] } }
I set up the bootstrap.yml as follows:
spring: profiles: "cloud" cloud: vault: authentication: TOKEN token:{vcap.services.my-svc-name.credentials.address} generic: backend:
{vcap.services.my-svc-name.credentials.address}
Note: I've tried surrounding the injected variables with single quotes, double quotes, and also tried using 'hashicorp-vault' in lieu of 'my-svc-name' ex '${vcap.services.hashicorp-vault.credentials.auth.token}'
Anonymous Asked question May 14, 2021
Recent Comments