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/stdlib/aws/ecr/ecr.cue
Andrea Luzzardi 40d4c95bff aws: use secrets
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-27 19:14:08 -07:00

53 lines
636 B
CUE

package ecr
import (
"dagger.io/dagger"
"dagger.io/dagger/op"
"dagger.io/aws"
)
// Credentials retriever for ECR
#Credentials: {
// AWS Config
config: aws.#Config
out: dagger.#Secret
// ECR credentials
username: "AWS"
secret: {
@dagger(output)
string
#up: [
op.#Load & {
from: aws.#CLI & {
"config": config
}
},
op.#Exec & {
always: true
args: [
"/bin/bash",
"--noprofile",
"--norc",
"-eo",
"pipefail",
"-c",
#"""
aws ecr get-login-password > /out
"""#
]
},
op.#Export & {
source: "/out"
format: "string"
}
]
}
}