From c996e7e04472ce7f665c4e71c64c1b023407b928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mathieu?= Date: Thu, 24 Oct 2024 16:19:02 +0200 Subject: [PATCH] fix(s3): pass all config to sub-tasks --- src/main/java/io/kestra/plugin/aws/s3/Copy.java | 6 ++++++ src/main/java/io/kestra/plugin/aws/s3/Downloads.java | 1 + src/main/java/io/kestra/plugin/aws/s3/Trigger.java | 7 +++++++ 3 files changed, 14 insertions(+) diff --git a/src/main/java/io/kestra/plugin/aws/s3/Copy.java b/src/main/java/io/kestra/plugin/aws/s3/Copy.java index b012ad8..fc43839 100644 --- a/src/main/java/io/kestra/plugin/aws/s3/Copy.java +++ b/src/main/java/io/kestra/plugin/aws/s3/Copy.java @@ -90,6 +90,12 @@ public Output run(RunContext runContext) throws Exception { .endpointOverride(this.endpointOverride) .accessKeyId(this.accessKeyId) .secretKeyId(this.secretKeyId) + .sessionToken(this.sessionToken) + .stsRoleSessionName(this.stsRoleSessionName) + .stsRoleExternalId(this.stsRoleExternalId) + .stsRoleSessionDuration(this.stsRoleSessionDuration) + .stsRoleArn(this.stsRoleArn) + .stsEndpointOverride(this.stsEndpointOverride) .bucket(request.sourceBucket()) .key(request.sourceKey()) .build() diff --git a/src/main/java/io/kestra/plugin/aws/s3/Downloads.java b/src/main/java/io/kestra/plugin/aws/s3/Downloads.java index 3eef3d0..2af7d90 100644 --- a/src/main/java/io/kestra/plugin/aws/s3/Downloads.java +++ b/src/main/java/io/kestra/plugin/aws/s3/Downloads.java @@ -90,6 +90,7 @@ public Output run(RunContext runContext) throws Exception { .endpointOverride(this.endpointOverride) .accessKeyId(this.accessKeyId) .secretKeyId(this.secretKeyId) + .sessionToken(this.sessionToken) .requestPayer(this.requestPayer) .bucket(this.bucket) .prefix(this.prefix) diff --git a/src/main/java/io/kestra/plugin/aws/s3/Trigger.java b/src/main/java/io/kestra/plugin/aws/s3/Trigger.java index 94a3cc3..5be81e4 100644 --- a/src/main/java/io/kestra/plugin/aws/s3/Trigger.java +++ b/src/main/java/io/kestra/plugin/aws/s3/Trigger.java @@ -161,6 +161,7 @@ public Optional evaluate(ConditionContext conditionContext, TriggerCo .endpointOverride(this.endpointOverride) .accessKeyId(this.accessKeyId) .secretKeyId(this.secretKeyId) + .sessionToken(this.sessionToken) .requestPayer(this.requestPayer) .bucket(this.bucket) .prefix(this.prefix) @@ -194,6 +195,12 @@ public Optional evaluate(ConditionContext conditionContext, TriggerCo .endpointOverride(this.endpointOverride) .accessKeyId(this.accessKeyId) .secretKeyId(this.secretKeyId) + .sessionToken(this.sessionToken) + .stsRoleArn(this.stsRoleArn) + .stsRoleSessionName(this.stsRoleSessionName) + .stsRoleExternalId(this.stsRoleExternalId) + .stsRoleSessionDuration(this.stsRoleSessionDuration) + .stsEndpointOverride(this.stsEndpointOverride) .requestPayer(this.requestPayer) .bucket(this.bucket) .key(object.getKey())