mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
update
This commit is contained in:
41
cue.mod/pkg/universe.dagger.io/aws/cli/test/sts_get_caller_identity.cue
generated
Executable file
41
cue.mod/pkg/universe.dagger.io/aws/cli/test/sts_get_caller_identity.cue
generated
Executable file
@@ -0,0 +1,41 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/dagger/core"
|
||||
"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: core.#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: !~"^$"
|
||||
}
|
||||
}
|
||||
}
|
||||
9
cue.mod/pkg/universe.dagger.io/aws/cli/test/test.bats
generated
Executable file
9
cue.mod/pkg/universe.dagger.io/aws/cli/test/test.bats
generated
Executable file
@@ -0,0 +1,9 @@
|
||||
setup() {
|
||||
load '../../../bats_helpers'
|
||||
|
||||
common_setup
|
||||
}
|
||||
|
||||
@test "aws/cli" {
|
||||
dagger "do" -p ./sts_get_caller_identity.cue verify
|
||||
}
|
||||
Reference in New Issue
Block a user