wrap error message for clarity
This commit is contained in:
parent
ff9fef5ed2
commit
0e5be59947
|
@ -3,7 +3,6 @@ package classic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/hashicorp/go-oracle-terraform/compute"
|
||||
"github.com/hashicorp/packer/helper/multistep"
|
||||
|
@ -33,7 +32,6 @@ func (s *stepCreateIPReservation) Run(_ context.Context, state multistep.StateBa
|
|||
return multistep.ActionHalt
|
||||
}
|
||||
state.Put("instance_ip", ipRes.IP)
|
||||
log.Printf("debug: ipRes is %#v", ipRes)
|
||||
return multistep.ActionContinue
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ func (s *stepSecurity) Run(_ context.Context, state multistep.StateBag) multiste
|
|||
config.IdentityDomain, config.Username, config.ImageName)
|
||||
_, err = secRulesClient.CreateSecRule(&secRulesInput)
|
||||
if err != nil {
|
||||
log.Printf(err.Error())
|
||||
log.Printf("Error creating security rule to allow SSH: %s", err.Error())
|
||||
if !strings.Contains(err.Error(), "already exists") {
|
||||
err = fmt.Errorf("Error creating security rule to"+
|
||||
" allow Packer to connect to Oracle instance via SSH: %s", err)
|
||||
|
|
Loading…
Reference in New Issue