diff --git a/post-processor/alicloud-import/post-processor.go b/post-processor/alicloud-import/post-processor.go index 2606e5fdf..4421b170d 100644 --- a/post-processor/alicloud-import/post-processor.go +++ b/post-processor/alicloud-import/post-processor.go @@ -214,7 +214,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac if err != nil { e, _ := err.(*packercommon.Error) - if e.Code == "NoSetRoletoECSServiceAcount" { + if e.Code == "NoSetRoletoECSServiceAccount" { ramClient := ram.NewClient(p.config.AlicloudAccessKey, p.config.AlicloudSecretKey) roleResponse, err := ramClient.GetRole(ram.RoleQueryRequest{ RoleName: "AliyunECSImageImportDefaultRole", @@ -282,7 +282,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac imageId, err = ecsClient.ImportImage(imageImageArgs) if err != nil { e, _ = err.(*packercommon.Error) - if e.Code == "NoSetRoletoECSServiceAcount" { + if e.Code == "NoSetRoletoECSServiceAccount" { time.Sleep(5 * time.Second) continue } else if e.Code == "ImageIsImporting" ||