1

In spring boot I wanted to read the properties from vault but I wanted to read vaulr secret token and the full path of the configuration endpoint from environment variable. But if I give spring.cloud.vault.uri it is not working and for fetching from environmental variable I am using ${VAULT_TOKEN} but this also, not working.

spring.cloud.vault.uri=http://127.0.0.1:8200/secret/gs-vault-config/cloud/test
spring.cloud.vault.token=${VAULT_TOKEN}

I wanted to fetch both spring.cloud.vault.uri and spring.cloud.vault.token from environmental variable.

rahul
  • 406
  • 1
  • 5
  • 14

1 Answers1

0

It's not a good idea.

Usually the file bootstrap.properties/bootstrap.yaml is placed separately from the project (project in /src, bootstrap config file in /config). It allows us to use it without rebuilding the project on parameter changes, and to use a dynamic configuration.

We already have a file with dynamic content, you want to create a separate dynamic config file with values for base dynamic config file! Tautology!

Dmitry Ionash
  • 763
  • 5
  • 11