Library for fetching properties from local files and AWS Parameter Store and Secrets Manager. This library also contains type- and null-safe extension methods to java.util.Properties
for Kotlin.
liflig-cdk
has built-in support for creating secrets and properties, allowing liflig-properties
to load these properties when a ECS service starts.
A ECS service defined through liflig-cdk
, will automatically get the environment valueSSM_PREFIX
. This prefix is the prefix for
all properties in the AWS Parameter Store that the application should use, which are given in the definition of the
ECS service. This includes values that are defined directly, and
references to other AWS resources (including secrets in Secrets Manager).
When the service starts, this library fetches all properties for the application, including properties from AWS Parameter Store with the prefix
SSM_PREFIX
. Properties are loaded in the following order, and properties loaded in later steps, overwrite properties loaded in earlier steps:
- application.properties (from classpath)
- Parameters from AWS Parameter Store matching the prefix
SSM_PREFIX
- overrides.properties (from working directory)
- application-test.properties (from classpath)
- overrides-test.properties (from working directory)
This library is currently only distributed in Liflig internal repositories.
This project follows https://confluence.capraconsulting.no/x/fckBC
To check build before pushing:
mvn verify
The CI server will automatically release new version for builds on master.
Lint code:
mvn spotless:check
Fix lint errors:
mvn spotless:apply