From a34d10f74ceea2a5277b121fc0a81bcb0bb22483 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Thu, 3 Nov 2022 13:04:25 -0400 Subject: [PATCH] fix last commit --- src/WithAwsPlugin.groovy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/WithAwsPlugin.groovy b/src/WithAwsPlugin.groovy index 476a3452..00fccc1a 100644 --- a/src/WithAwsPlugin.groovy +++ b/src/WithAwsPlugin.groovy @@ -20,7 +20,7 @@ class WithAwsPlugin implements TerraformEnvironmentStagePlugin, Resettable { public Closure addWithAwsRole(String environment) { return { closure -> String iamRole = getRole(environment) - Integer sessionDuration = this.duration + Integer sessionDuration = getDuration() if (iamRole != null) { withAWS(role: iamRole, duration: sessionDuration) { @@ -59,6 +59,10 @@ class WithAwsPlugin implements TerraformEnvironmentStagePlugin, Resettable { return tempRole } + public Integer getDuration() { + return this.@duration + } + public static void reset() { this.role = null this.duration = 3600