From b150c14caa9371c6e92495209401483ffd475cf1 Mon Sep 17 00:00:00 2001 From: vishalnayak Date: Tue, 9 Aug 2016 17:45:42 -0400 Subject: [PATCH] Address review feedback by @jefferai --- builtin/credential/aws-ec2/path_role.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/credential/aws-ec2/path_role.go b/builtin/credential/aws-ec2/path_role.go index 3a9bd0546..eec04eee2 100644 --- a/builtin/credential/aws-ec2/path_role.go +++ b/builtin/credential/aws-ec2/path_role.go @@ -291,7 +291,7 @@ func (b *backend) pathRoleCreateUpdate( roleEntry.MaxTTL = time.Duration(data.Get("max_ttl").(int)) * time.Second } - if roleEntry.MaxTTL < roleEntry.TTL { + if roleEntry.MaxTTL != 0 && roleEntry.MaxTTL < roleEntry.TTL { return logical.ErrorResponse("ttl should be shorter than max_ttl"), nil }