Merge pull request #1435 from talentedmrjones/europa-move-transformsecret-secret

moved #TransformSecret to engine/secret.cue
This commit is contained in:
Richard Jones 2022-01-14 14:06:41 -07:00 committed by GitHub
commit 5016f4597d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 18 deletions

View File

@ -13,3 +13,20 @@ package engine
// Contents of the secret
output: #Secret
}
// Securely apply a CUE transformation on the contents of a secret
#TransformSecret: {
$dagger: task: _name: "TransformSecret"
// The original secret
input: #Secret
// A new secret or (map of secrets) with the transformation applied
output: #Secret | {[string]: output}
// Transformation function
#function: {
// Full contents of the input secret (only available to the function)
input: string
_functionOutput: string | {[string]: _functionOutput}
// New contents of the output secret (must provided by the caller)
output: _functionOutput
}
}

View File

@ -1,18 +0,0 @@
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 or (map of secrets) with the transformation applied
output: #Secret | {[string]: output}
// Transformation function
#function: {
// Full contents of the input secret (only available to the function)
input: string
_functionOutput: string | {[string]: _functionOutput}
// New contents of the output secret (must provided by the caller)
output: _functionOutput
}
}