Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for property reference to meta configuration #1312

Closed
tomas-langer opened this issue Jan 17, 2020 · 1 comment · Fixed by #1417
Closed

Add support for property reference to meta configuration #1312

tomas-langer opened this issue Jan 17, 2020 · 1 comment · Fixed by #1417
Assignees
Labels
2.x Issues for 2.x version branch config enhancement New feature or request P4
Milestone

Comments

@tomas-langer
Copy link
Member

When configuring Config using "Meta configuration" file, we can define locations of configuration files, though we cannot use a reference to a system property or environment variable.

Especially for examples, it would be great if we could reference the user home directory. Some of the examples require secrets to be defined (such as application id and secret for OIDC and IDCS connections), in such cases, our examples use references, so an override can be used to configure the actual secrets.
We should have the possibility to configure such a "default" override from user's home directory without coding it in Main class.

The example examples/microprofile/idcs requires such a configuration. It would be great if I could create the following meta-config.yaml:

sources:
  - type: "system-properties"
  - type: "environment-variables"
  - type: "file"
    properties:
      optional: true
      path: "${user.home}/helidon/conf/examples.yaml"
  - type: "classpath"
    properties:
      optional: true
      resource: "application.yaml"
  - type: "classpath"
    properties:
      optional: true
      resource: "META-INF/microprofile-config.properties"

Where the ${user.home} could be either as is (and use the system properties and environment variables as sources for value), or even ${SYS.user.home} or ${ENV.user.home} to explicitly define the source of the property value.
Easiest option would be to combine the meta-config.yaml with system properties and environment variables and resolve it as a config reference.

@tomas-langer tomas-langer added enhancement New feature or request config 2.x Issues for 2.x version branch labels Jan 17, 2020
@tomas-langer tomas-langer added this to the 2.0.0 milestone Jan 17, 2020
@m0mus m0mus added the P4 label Jan 23, 2020
@tomas-langer tomas-langer self-assigned this Feb 17, 2020
@tomas-langer
Copy link
Member Author

Resolved by #1417

@tomas-langer tomas-langer linked a pull request Mar 10, 2020 that will close this issue
@m0mus m0mus added this to Backlog Aug 12, 2024
@m0mus m0mus moved this to Closed in Backlog Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issues for 2.x version branch config enhancement New feature or request P4
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants