Skip to content

Commit

Permalink
fix last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jantman committed Nov 3, 2022
1 parent 8542dc4 commit a34d10f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/WithAwsPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a34d10f

Please sign in to comment.