From 7abacf1b995d4f6132a4630f73759346534d7e27 Mon Sep 17 00:00:00 2001 From: Elie Date: Thu, 29 Apr 2021 10:59:44 +0200 Subject: [PATCH] Make S3 always do a Put Signed-off-by: Elie --- examples/simple-s3/main.cue | 1 + stdlib/aws/s3/s3.cue | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/examples/simple-s3/main.cue b/examples/simple-s3/main.cue index f93ff379..8600143e 100644 --- a/examples/simple-s3/main.cue +++ b/examples/simple-s3/main.cue @@ -28,6 +28,7 @@ page: """ deploy: s3.#Put & { config: awsConfig sourceInline: page + always: true contentType: "text/html" target: "s3://\(bucket)/index.html" } diff --git a/stdlib/aws/s3/s3.cue b/stdlib/aws/s3/s3.cue index 679d2c63..c3c1cf57 100644 --- a/stdlib/aws/s3/s3.cue +++ b/stdlib/aws/s3/s3.cue @@ -26,8 +26,14 @@ import ( // URL of the uploaded S3 object url: out + // Always write the object to S3 + always?: bool + out: string aws.#Script & { + if always != _|_ { + "always": always + } files: { if sourceInline != _|_ { "/inputs/source": sourceInline