-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
SecretsManagerClient unavailable in Spring application context #1016
Comments
Hey @joeglorioso , this is not a bug but missing |
@MatejNedic Thanks for the tip. Sorry for my inexperience. I do not see this anywhere in the documentation. Could you point me to it? To me this is still not consistent with the documentation that I referenced and not consistent with the way that the other AWS clients are initialized and added to the application context. If it's a feature and not a bug, it should be clearly called out in the documentation so that people who are new spring cloud aws and to this version will know. |
@MatejNedic Am I correct in saying that the current implementation is assuming a That's a common use case but it doesn't handle applications that generate secrets as opposed to consuming a predefined secret. I have an application integrated with AWS Secrets Manager that needs to create new secrets from within a service. I'd like to autowire an initialized I think @joeglorioso might be running into the same problem. |
Hey @ccobham , you are correct. Are you willing to do PR for auto configuration? |
Thank you |
Type: Bug
Component:
"Secrets Manager"
Spring Boot 3.2.1
spring-cloud-aws. 3.1.0
software.amazon.awssdk 2.22.12
Describe the bug
Including spring-cloud-aws-starter-secrets-manager in my pom does not make SecretsManagerClient available in my Spring application context. The documentation indicates that is the way that should work and would be consistent with spring cloud aws libraries.
https://docs.awspring.io/spring-cloud-aws/docs/3.1.0/reference/html/index.html#using-secretsmanagerclient
Sample
Results in the below startup log
I could create a SecretsManagerClient @bean but then it won't be automatically configured with the values in application.yaml.
I did find that if used the property spring.config.import: optional:aws-secretsmanager:/my/dummy/secret to load secrets at startup, that Spring would add SecretsManagerClient to the Spring application context and the error would no longer happen.
https://stackoverflow.com/questions/77783293/spring-cloud-aws-secretsmanagerclient-not-available-in-spring-application-contex
The text was updated successfully, but these errors were encountered: