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/pkg/universe.dagger.io/aws/cli/test/sts_get_caller_identity.cue
Helder Correia 24d3f82fc7
Cleanup inputs, outputs and proxy
Superceded by Client API.

Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
2022-03-08 20:45:28 -01:00

41 lines
808 B
CUE

package test
import (
"dagger.io/dagger"
"universe.dagger.io/aws"
"universe.dagger.io/aws/cli"
)
dagger.#Plan & {
client: commands: sops: {
name: "sops"
args: ["-d", "--extract", "[\"AWS\"]", "../../../secrets_sops.yaml"]
stdout: dagger.#Secret
}
actions: {
sopsSecrets: dagger.#DecodeSecret & {
format: "yaml"
input: client.commands.sops.stdout
}
getCallerIdentity: cli.#Command & {
credentials: aws.#Credentials & {
accessKeyId: sopsSecrets.output.AWS_ACCESS_KEY_ID.contents
secretAccessKey: sopsSecrets.output.AWS_SECRET_ACCESS_KEY.contents
}
options: region: "us-east-2"
service: {
name: "sts"
command: "get-caller-identity"
}
}
verify: getCallerIdentity.result & {
UserId: !~"^$"
Account: !~"^$"
Arn: !~"^$"
}
}
}