This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/docs/tests/core-concepts/secrets/plans/sops.cue
Helder Correia 6204970d53
Move snippets outside of markdown
Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
2022-03-10 12:35:11 -01:00

24 lines
449 B
CUE

dagger.#Plan & {
client: commands: sops: {
name: "sops"
args: ["-d", "./secrets.yaml"]
stdout: dagger.#Secret
}
actions: {
// Makes the yaml keys easily accessible
secrets: dagger.#DecodeSecret & {
input: client.commands.sops.stdout
format: "yaml"
}
run: docker.#Run & {
mounts: secret: {
dest: "/run/secrets/token"
contents: secrets.output.myToken
}
// Do something with `/run/secrets/token`
}
}
}