You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a discrepancy in the Spring Cloud AWS documentation regarding the configuration of the aws-parameterstore path. The documentation specifies the path as aws-parameterstore:/config/spring, but in practice, the path must include a trailing slash (aws-parameterstore:/config/spring/) to correctly load parameters into Spring’s environment properties.
This issue occurs when using application.yml, but it is likely to affect application.properties as well.
Observe that ${message} and ${httpUrl} are not resolved as expected.
Expected Behavior:
When the spring.config.import property is set the parameters should be correctly loaded and available for use in application.yml or application.properties as ${message} and ${httpUrl}.
Actual Behavior:
Without the trailing slash (aws-parameterstore:/config/spring), the parameters are not correctly loaded into the Spring environment, leading to unresolved placeholders in the configuration.
Suggested Fix:
Update the documentation to include a trailing slash in the aws-parameterstore path example. The corrected snippet should be:
To fetch parameters from Parameter Store and add them to Spring’s environment properties, add the spring.config.import property to application.properties or application.yml.
For example, assuming that the parameters in Parameter Store are stored under the path /config/spring/:
Type: Bug
Component:
Parameter Store
Describe the bug
There is a discrepancy in the Spring Cloud AWS documentation regarding the configuration of the
aws-parameterstore
path. The documentation specifies the path asaws-parameterstore:/config/spring
, but in practice, the path must include a trailing slash (aws-parameterstore:/config/spring/
) to correctly load parameters into Spring’s environment properties.This issue occurs when using
application.yml
, but it is likely to affectapplication.properties
as well.Version Information:
Steps to Reproduce:
Follow the Documentation Example:
application.yml
:/config/spring
:Attempt to Use Properties in
application.yml
:Run the Application:
Observe that ${message} and ${httpUrl} are not resolved as expected.
Expected Behavior:
When the spring.config.import property is set the parameters should be correctly loaded and available for use in application.yml or application.properties as ${message} and ${httpUrl}.
Actual Behavior:
Without the trailing slash (aws-parameterstore:/config/spring), the parameters are not correctly loaded into the Spring environment, leading to unresolved placeholders in the configuration.
Suggested Fix:
Update the documentation to include a trailing slash in the aws-parameterstore path example. The corrected snippet should be:
spring.config.import=aws-parameterstore:/config/spring/
Updated Documentation Example:
To fetch parameters from Parameter Store and add them to Spring’s environment properties, add the spring.config.import property to application.properties or application.yml.
For example, assuming that the parameters in Parameter Store are stored under the path /config/spring/:
Once the spring.config.import statement is added:
spring.config.import=aws-parameterstore:/config/spring/
Two parameters are added to the environment: message and httpUrl, which can be accessed in application.yml as ${message} and ${httpUrl} respectively.
The text was updated successfully, but these errors were encountered: