spring-attic / spring-cloud-aws

All development has moved to https://github.com/awspring/spring-cloud-aws Integration for Amazon Web Services APIs with Spring
https://awspring.io/
Apache License 2.0
590 stars 373 forks source link

Move AwsSecretsManagerProperties.PREFIX_PATTERN to Configuration Properties #736

Closed venkat22 closed 3 years ago

venkat22 commented 3 years ago

Type: Feature

Is your feature request related to a problem? Please describe. Some of our clients doesn't allow Prefix to start with '/'. Moving it to properties will help us to override the same on need basis.

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

eddumelendez commented 3 years ago

As part of spring-cloud-aws 2.3, the following property aws-secretsmanager: or aws-secretsmanager:my-secret-key or aws-secretsmanager:my-secret-key;my-anoter-secret-key. This will cover the request.

amorfica commented 3 years ago

Hi @eddumelendez,

How can I implement your solution? Right now I have this:

bootstrap.properties

aws.secretsmanager.name=${SECRET_NAME}
aws.secretsmanager.prefix= 

pom.xml

<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-context</artifactId>
  <version>2.1.0.RELEASE</version>
</dependency>
<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-starter-aws-secrets-manager-config</artifactId>
  <version>2.1.0.RELEASE</version>
</dependency>

With my solution I am forced to prefix "/". What version of my dependencies should I change and what change in my bootstrap.properties should I made.

maciejwalkowiak commented 3 years ago

@adrian-morfi use Spring Cloud AWS 2.3 https://spring.io/blog/2021/03/17/spring-cloud-aws-2-3-is-now-available

amorfica commented 2 years ago

@maciejwalkowiak, it works!

thanks!