-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra config import fetched through cloud config server property isn't injected during app start #2271
Comments
Yes you cannot put spring.config.import in configuration files coming from external sources. It needs to be placed in the application yaml locally of the client. The config server itself does support AWS Secrets Manager as a backend though |
Thanks @ryanjbaxter
I am seeking a way to store all application configuration references, including secrets, in one location. I am interested in the most straightforward and efficient method to achieve this. Could you please suggest an appropriate solution that minimizes complexity? |
What version of Spring Cloud are you using? |
Currently I have this
|
Can you try your original project with Spring Cloud 2022.0.3? |
@ryanjbaxter |
Yes you can use a composite https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#composite-environment-repositories |
Thanks @ryanjbaxter Here is my current config application.yaml:
pom:
ERROR:
|
Can you change |
thanks for your reply, this was solved in different way |
Library versions
Spring Boot 2.7.12
Spring Cloud 2021.0.6
Spring Cloud AWS 2.4.1
I have a Spring Cloud Config setup with a Git backend. Generally, property files fetching function well. My aim is store secrets in AWS and reference them from property files, so I added additional
spring.config.import: "aws-secretsmanager:/test/springconfig"
directive within the properties file for the Spring Cloud Config Server.This option only works when I add such a configuration to an application property itself as follows:
My intention is to house both configurations and sensitive data (in the form of AWS references like
"aws-secretsmanager:/test/springconfig"
) in the Git backend. So, the properties file in Git backend would look likeThis is what I get now:
The problem is that I don't get retrieved values from aws secret while storing
spring.config.import: "aws-secretsmanager:/test/springconfig"
in Git backend for Cloud Config server.I would appreciate any guidance on potential options to achieve this result. I have read that this can be done using Spring Cloud Vault, but it seems excessive for our needs as we would like to use AWS facilities for this purpose.
Thanks,
Oleksandr
The text was updated successfully, but these errors were encountered: