Skip to content

Commit 434493a

Browse files
committed
Enable loading Secret Store configuration through environment variables
1 parent eb48bb1 commit 434493a

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

pkg/manifest/file.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ func (f *File) MarshalTOML() ([]byte, error) {
127127
if e.Data != "" {
128128
obj["data"] = e.Data
129129
}
130+
if e.Env != "" {
131+
obj["env"] = e.Env
132+
}
130133
items = append(items, obj)
131134
}
132135
secretStores[key] = items

pkg/manifest/local_server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ type SecretStoreArrayEntry struct {
119119
Key string `toml:"key"`
120120
File string `toml:"file,omitempty"`
121121
Data string `toml:"data,omitempty"`
122+
Env string `toml:"env,omitempty"`
122123
}
123124

124125
// SecretStoreExternalFile represents the external key/value store,

pkg/manifest/testdata/fastly-viceroy-update.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,7 @@ data = "This is also some secret data"
7171
[[local_server.secret_stores.store_two]]
7272
key = "second"
7373
file = "/path/to/other/secret.json"
74+
75+
[[local_server.secret_stores.store_two]]
76+
key = "fourth"
77+
env = "ENV_FOURTH"

0 commit comments

Comments
 (0)