Remove 5 sec sleep after adding iam instance profile

This commit is contained in:
Moss 2019-12-02 10:13:26 +01:00
parent 4516978555
commit 250643d54b
1 changed files with 3 additions and 4 deletions

View File

@ -3,11 +3,12 @@ package common
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go/aws"
"log"
"time"
"github.com/aws/aws-sdk-go/aws"
"encoding/json"
"github.com/aws/aws-sdk-go/service/iam"
"github.com/hashicorp/packer/common/uuid"
"github.com/hashicorp/packer/helper/multistep"
@ -138,8 +139,6 @@ func (s *StepIamInstanceProfile) Run(ctx context.Context, state multistep.StateB
s.roleIsAttached = true
state.Put("iamInstanceProfile", aws.StringValue(profileResp.InstanceProfile.InstanceProfileName))
time.Sleep(5 * time.Second)
}
return multistep.ActionContinue