From 65f0ce8ca3a4430473d462a1fcfde92925540840 Mon Sep 17 00:00:00 2001 From: vishalnayak Date: Thu, 27 Oct 2016 19:11:26 -0400 Subject: [PATCH] Remove the sanity check which is not proving to be useful --- builtin/credential/aws-ec2/path_role.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/builtin/credential/aws-ec2/path_role.go b/builtin/credential/aws-ec2/path_role.go index 5b7b6aaa4..10be32249 100644 --- a/builtin/credential/aws-ec2/path_role.go +++ b/builtin/credential/aws-ec2/path_role.go @@ -207,11 +207,6 @@ func (b *backend) nonLockedAWSRole(s logical.Storage, roleName string) (*awsRole // Check if the value held by role ARN field is actually an instance profile ARN if result.BoundIamRoleARN != "" && strings.Contains(result.BoundIamRoleARN, ":instance-profile/") { - // For sanity - if result.BoundIamInstanceProfileARN != "" { - return nil, fmt.Errorf("bound_iam_role_arn contains instance profile ARN and bound_iam_instance_profile_arn is non empty") - } - // If yes, move it to the correct field result.BoundIamInstanceProfileARN = result.BoundIamRoleARN