In Spring Cloud Server adds other properties to an existing environment -
we using spring cloud config server backed git repository provide properties test profile. have received requirement move our keys vault (hashicorp) , keep regular properties usual in our properties file.
before having vault, passing keys through system property (using -dxxx=yyy
), loaded regular property source , app working expected.
now must have composite property sources fetch property file , vault @ same time. i'm not sure how pull properties both vault , git @ same time , offered them spring cloud config clients.
i've been digging in documentation , found can have composite environment repository, cannot make vault , git work @ same time.
i've tried multiple things putting properties this:
spring.cloud.config.server.git.uri=file:///e:/project/git/myappdata spring.cloud.config.server.vault.host=127.0.0.1 spring.cloud.config.server.vault.port=8200 spring.cloud.config.server.vault.scheme=http spring.cloud.config.server.vault.backend=secret spring.cloud.config.server.vault.defaultkey=myapp
also tested using spring cloud vault , fetch secrets, not provided clients.
have tried use implement environmentrepository
interface, create new repository (and want add 1 vault property existing provided repository based on git).
and going use spring event applicationenvironmentpreparedevent , tried dynamically append vault property.
i think i'm overlooking something. know right way read vault secret , append property of regular property file?
Comments
Post a Comment