secretfile: data -> plaintext

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-12-07 14:02:17 -05:00
parent a25e6bb3a2
commit 6aa4f6b8b3

View File

@ -31,12 +31,12 @@ func (c secretFileTask) Run(ctx context.Context, pctx *plancontext.Context, _ so
lg.Debug().Str("path", secretFile.Path).Msg("loading secret")
data, err := os.ReadFile(secretFile.Path)
plaintext, err := os.ReadFile(secretFile.Path)
if err != nil {
return nil, err
}
secret := pctx.Secrets.New(string(data))
secret := pctx.Secrets.New(string(plaintext))
out := compiler.NewValue()
if err := out.FillPath(cue.ParsePath("contents"), secret.Value()); err != nil {
return nil, err