nickthecook/ops

Merge env vars from config and secrets

Opened this issue · 0 comments

If an env var, say "SOME_API", is defined as a JSON object string in both config and secrets, currently the value from secrets will overwrite the value from config (when loading secrets). Instead, we define:

  • $SOME_API in config, specifying:
    • the URL to the API endpoint
    • any other non-secret info or config about that API
  • $SOME_API_SECRETS in secrets: specifying:
    • username/password/API key

It would be helpful to have ops merge these values for us, iff:

  • $SOME_API is set to a decodable JSON object in both files
  • $SOME_API decodes as an Object
  • possibly an option, like "options.config.merge_json_objects" is set to true