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/examples/simple-s3/main.cue
Sam Alba b181300930 examples/simple-s3: added comment for input description
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-26 12:03:24 +02:00

28 lines
539 B
CUE

package main
import (
"dagger.io/aws"
"dagger.io/aws/s3"
"dagger.io/dagger"
)
// AWS Config for credentials and default region
awsConfig: aws.#Config & {
region: *"us-east-1" | string @dagger(input)
}
// Name of the S3 bucket to use
bucket: *"dagger-io-examples" | string @dagger(input)
// Source code to deploy
source: dagger.#Artifact @dagger(input)
url: "\(deploy.url)index.html"
deploy: s3.#Put & {
always: true
config: awsConfig
"source": source
contentType: "text/html"
target: "s3://\(bucket)/"
}