aws paramstore with multiple active profiles #1340
Replies: 1 comment 1 reply
-
I'm also running into this issue. Profile-based parameter retrieval has been severely neutered in 3.x. There seems to be no way to use spring profiles in parameter retrieval unless you ensure that there's only one active profile at a time. When multiple profiles are active, Spring interprets everything after the comma as a separate config location with no prefix. I assume that the maintainers of this project did not expect users to use Editing to clarify: spring:
config:
import: "aws-parameterstore:/config/app_${spring.profiles.active}/" Lets say I'm running the application with active profiles "foo, bar". In the preceding example Spring will try two imports:
If you put the import in an array like in the original comment it won't split it. spring:
config:
import:
- "aws-parameterstore:/config/app_${spring.profiles.active}/" That results in a single string that includes both profiles in the request to SSM, |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm trying to migrate to the newest awspring libraries, but I cannot find solution for the new approach with specifying paramstore variables.
I've tried to use
spring.config.import: "aws-parameterstore:"
in bootstrap.yml but it seems its not longer supported with default resolvers withaws.parameterstore.separator
, etc. and left unbound, so I found out this solution:but the problem is, that I've got couple profiles active. How to solve it?
Beta Was this translation helpful? Give feedback.
All reactions