Move snippets outside of markdown
Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
This commit is contained in:
23
docs/tests/core-concepts/secrets/plans/sops.cue
Normal file
23
docs/tests/core-concepts/secrets/plans/sops.cue
Normal file
@@ -0,0 +1,23 @@
|
||||
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`
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user