We have enabled spring profiling for Dev, QA, Prod instances and these are running on AWS EC2.
We have different property files like:
application-dev.properties
application-qa.properties
application-prod.properties
And we have configured our datasource in these file like
spring.datasource.username=test
spring.datasource.password=test
And these credentials are different for each instance and are configured in their respective property files.
I have gone through the link:
https://www.baeldung.com/spring-cloud-vault
to implement Vault with Spring Boot. But, I am not getting it fully like they have mentioned about bootstrap.yml file but we can place credentials for only one instance there.
Can anyone please help me out with how to implement Vault along with Sprint Profiling where we have multiple properties files.
And how to fetch the database credentials using Java code from the Vault ?