wrap error message for clarity

This commit is contained in:
Megan Marsh 2018-01-26 09:55:31 -08:00
parent ff9fef5ed2
commit 0e5be59947
2 changed files with 1 additions and 3 deletions

View File

@ -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
}

View File

@ -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)