Skip to content

Allow variables to be used as part of a value in configuration #5320

@cintolas

Description

@cintolas

Proposed change

Currently the following configuration will produce authorization errors when trying to distribute this configuration to multiple systems

cluster {
  # set the variable token
  TOKEN: abc

  authorization {
      user: user
      password: $TOKEN
  }

  # use the token variable in a field. The password is evaluated as $TOKEN instead of abc
  nats://user:[email protected]:6222,
  nats://user:[email protected]:6222
}

### Proposal

Allow a way for variables to be interpolated in right hand side of strings

Use case

When distributing configuration across multiple systems via an NFS mount, it makes it easier to map configuration across variables.

Since authentication in a cluster is done in the URL, you must explicitly define the password in the URL. This also disables the ability to define authentication tokens in environment variables

Contribution

No response

Metadata

Metadata

Labels

proposalEnhancement idea or proposal

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions