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

fix(configuration): export configuration variables #42

Merged
merged 1 commit into from
Nov 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/common/clients/vault_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type VaultClient struct {

// NewVaultClient returns an initialized struct with the required dependencies injected
func NewVaultClient(configuration VaultClientConfiguration, logger logging.Logger) (*VaultClient, error) {
config := &api.Config{Address: configuration.vaultURL}
config := &api.Config{Address: configuration.VaultURL}

client, err := api.NewClient(config)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/common/clients/vault_client_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/kelseyhightower/envconfig"

// VaultClientConfiguration is a struct that holds all the environment variables required to the Vault client
type VaultClientConfiguration struct {
vaultURL string `envconfig:"VAULT_SERVER_URL" required:"true"`
VaultURL string `envconfig:"VAULT_SERVER_URL" required:"true"`
}

// LoadFromEnvVars parses the required configuration variables. Throws an error if the validations aren't met
Expand Down