transform secret

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones
2022-01-04 20:27:54 -07:00
parent 447307b3be
commit 86bf3bad86
2 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
package engine
// Securely apply a CUE transformation on the contents of a secret
#TransformSecret: {
$dagger: task: _name: "TransformSecret"
// The original secret
input: #Secret
// A new secret with the transformation applied
output: #Secret
// Transformation function
#function: {
// Full contents of the input secret (only available to the function)
input: string
// New contents of the output secret (must provided by the caller)
output: string
}
}