stdlib: share aws config cli

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-03-18 15:53:26 -07:00
parent ea02b579d6
commit 54251f88b4
2 changed files with 22 additions and 8 deletions

View File

@ -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"
}
},
]
}

View File

@ -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"