-
Notifications
You must be signed in to change notification settings - Fork 372
Add aws-secretsmanager: prefix config import #721
Conversation
In `spring-boot` 2.4, `Volume Mounted Config Directory Trees` was added. This commit introduces the prefix `aws-secretsmanager:` which will resolve the values given the configuration properties supported by secrets manager integration. Also, if keys are added after the prefix then just these will be resolved. Use: `aws-secretsmanager:` or `aws-secretsmanager:my-secret-key` or `aws-secretsmanager:my-secret-key;my-anoter-secret-key` Closes spring-atticgh-655
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @eddumelendez! I left few comments - we need to figure out the proper handling of optional
config data import.
Btw, Vault integration could be helpful reference for us in general for this feature: spring-cloud/spring-cloud-vault@451ccb0
It would be great if you could add Javadocs but they can be also added later. Once this one is merged I will create a PR with a sample that I did to verify how/if it works.
|
||
However, starting at `spring-cloud-aws` `2.3`, allows import default aws' secretsmanager keys | ||
(`spring.config.import=aws-secretsmanager:`) or individual keys | ||
(`spring.config.import=aws-secretsmanager:secret-key;other-secret-key`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to document that it can be used with optional
prefix.
...pringframework/cloud/aws/autoconfigure/secretsmanager/AwsSecretsManagerConfigDataLoader.java
Show resolved
Hide resolved
...pringframework/cloud/aws/autoconfigure/secretsmanager/AwsSecretsManagerConfigDataLoader.java
Show resolved
Hide resolved
...work/cloud/aws/autoconfigure/secretsmanager/AwsSecretsManagerConfigDataLocationResolver.java
Outdated
Show resolved
Hide resolved
…org/springframework/cloud/aws/autoconfigure/secretsmanager/AwsSecretsManagerConfigDataLocationResolver.java Co-authored-by: Maciej Walkowiak <walkowiak.maciej@yahoo.com>
...ava/org/springframework/cloud/aws/secretsmanager/AwsSecretsManagerPropertySourceLocator.java
Show resolved
Hide resolved
|
…ud-aws#721) In `spring-boot` 2.4, `Volume Mounted Config Directory Trees` was added. This commit introduces the prefix `aws-secretsmanager:` which will resolve the values given the configuration properties supported by secrets manager integration. Also, if keys are added after the prefix then just these will be resolved. Use: `aws-secretsmanager:` or `aws-secretsmanager:my-secret-key` or `aws-secretsmanager:my-secret-key;my-anoter-secret-key` Closes spring-attic/spring-cloud-aws#655 Closes spring-attic/spring-cloud-aws#515 Co-authored-by: Maciej Walkowiak <walkowiak.maciej@yahoo.com>
…ud-aws#721) In `spring-boot` 2.4, `Volume Mounted Config Directory Trees` was added. This commit introduces the prefix `aws-secretsmanager:` which will resolve the values given the configuration properties supported by secrets manager integration. Also, if keys are added after the prefix then just these will be resolved. Use: `aws-secretsmanager:` or `aws-secretsmanager:my-secret-key` or `aws-secretsmanager:my-secret-key;my-anoter-secret-key` Closes spring-attic/spring-cloud-aws#655 Closes spring-attic/spring-cloud-aws#515 Co-authored-by: Maciej Walkowiak <walkowiak.maciej@yahoo.com>
In
spring-boot
2.4,Volume Mounted Config Directory Trees
wasadded. This commit introduces the prefix
aws-secretsmanager:
whichwill resolve the values given the configuration properties supported
by secrets manager integration. Also, if keys are added after the
prefix then just these will be resolved.
Use:
aws-secretsmanager:
oraws-secretsmanager:my-secret-key
oraws-secretsmanager:my-secret-key;my-anoter-secret-key
Closes gh-655
Closes gh-515