diff --git a/stdlib/aws/aws.cue b/stdlib/aws/aws.cue index a9d8bc20..4f6bbf6c 100644 --- a/stdlib/aws/aws.cue +++ b/stdlib/aws/aws.cue @@ -1,7 +1,12 @@ package aws -import "dagger.io/dagger" +import ( + "dagger.io/dagger" + "dagger.io/llb" + "dagger.io/alpine" +) +// Base AWS Config #Config: { // AWS region region: string @@ -10,3 +15,17 @@ import "dagger.io/dagger" // AWS secret key secretKey: dagger.#Secret } + +// Re-usable aws-cli component +#CLI: { + #compute: [ + llb.#Load & { + from: alpine.#Image & { + package: bash: "=5.1.0-r0" + package: jq: "=1.6-r1" + package: curl: "=7.74.0-r1" + package: "aws-cli": "=1.18.177-r0" + } + }, + ] +} diff --git a/stdlib/aws/cloudformation/cloudformation.cue b/stdlib/aws/cloudformation/cloudformation.cue index 39e1f6bb..2b504895 100644 --- a/stdlib/aws/cloudformation/cloudformation.cue +++ b/stdlib/aws/cloudformation/cloudformation.cue @@ -3,9 +3,8 @@ package cloudformation import ( "encoding/json" - "dagger.io/alpine" - "dagger.io/aws" "dagger.io/llb" + "dagger.io/aws" ) // AWS CloudFormation Stack @@ -50,11 +49,7 @@ import ( outputs: { #compute: [ llb.#Load & { - from: alpine.#Image & { - package: bash: "=5.1.0-r0" - package: jq: "=1.6-r1" - package: "aws-cli": "=1.18.177-r0" - } + from: aws.#CLI }, llb.#Mkdir & { path: "/src"