-
Notifications
You must be signed in to change notification settings - Fork 313
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
Spring Cloud GCP Starter Secret Manager - Not Obtaining Secrets after Spring Boot 3 Upgrade. #1628
Comments
Did you follow the migration guide and add |
Hi Meltsufin, You are a legend. This was exactly what I needed. I was not aware of this migration guide previously. I adjusted per the guide and it is working as expected now. Thanks, |
Thanks for the suggestion @meltsufin and glad it is working as expected now @ejarans1! Closing this issue. |
Hi there, i have similar problem and i am curious what i am doing wrong.
In the application.properties I have added a property like so: my.app.secret=${sm://test_secret}. Now in the code i tried a couple of things:
From the above 1. and 2. are returning '//test_secret' and not the value of the secret. Based on this thread I tried putting 'spring.config.import=sm://' in my application.properties file, but this is breaking my application: 00:22:41.905 [main] ERROR org.springframework.boot.SpringApplication - Application run failed |
@Topchiisky Can you open a new issue for this problem please? |
Describe the bug
We are seeing our secret manager auto configuration fail for applications running on Spring Boot 3.x
Running on 2.7.6 with spring cloud gcp 3.4.0 and spring cloud dependencies 2021.0.4 works as expected.
After upgrading Spring Boot 2.7.6 -> 3.x and the necessary cloud and gcp dependencies, secret manager starter no longer is obtaining secrets from application.yml files.
My Config:
Application.yml
mongo-connection-config:
secret: ${sm://mongo_secret}
build.gradle
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.google.cloud:spring-cloud-gcp-starter-secretmanager'
}
dependencyManagement {
imports {
mavenBom "com.google.cloud:spring-cloud-gcp-dependencies:4.1.1"
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1'
}
}
The text was updated successfully, but these errors were encountered: