From be4a82dfae69f990092db29a24749a43cf3c3dfb Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 10 Jun 2015 10:33:01 -0700 Subject: [PATCH] amazon/*: fix some merge conflicts --- builder/amazon/common/state.go | 2 +- builder/amazon/common/step_run_source_instance.go | 2 +- builder/amazon/ebs/step_stop_instance.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builder/amazon/common/state.go b/builder/amazon/common/state.go index 9acedd020..075ce8ef7 100644 --- a/builder/amazon/common/state.go +++ b/builder/amazon/common/state.go @@ -91,7 +91,7 @@ func InstanceStateRefreshFunc(conn *ec2.EC2, instanceId string) StateRefreshFunc return nil, "", nil } - i = resp.Reservations[0].Instances[0] + i := resp.Reservations[0].Instances[0] return i, *i.State.Name, nil } } diff --git a/builder/amazon/common/step_run_source_instance.go b/builder/amazon/common/step_run_source_instance.go index 87ac077b9..92dafa564 100644 --- a/builder/amazon/common/step_run_source_instance.go +++ b/builder/amazon/common/step_run_source_instance.go @@ -310,7 +310,7 @@ func (s *StepRunSourceInstance) Cleanup(state multistep.StateBag) { } stateChange := StateChangeConf{ Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"}, - Refresh: InstanceStateRefreshFunc(ec2conn, s.instance.InstanceId), + Refresh: InstanceStateRefreshFunc(ec2conn, *s.instance.InstanceID), Target: "terminated", } diff --git a/builder/amazon/ebs/step_stop_instance.go b/builder/amazon/ebs/step_stop_instance.go index 7312fd200..967e5bbf4 100644 --- a/builder/amazon/ebs/step_stop_instance.go +++ b/builder/amazon/ebs/step_stop_instance.go @@ -40,7 +40,7 @@ func (s *stepStopInstance) Run(state multistep.StateBag) multistep.StepAction { stateChange := awscommon.StateChangeConf{ Pending: []string{"running", "stopping"}, Target: "stopped", - Refresh: awscommon.InstanceStateRefreshFunc(ec2conn, instance.InstanceId), + Refresh: awscommon.InstanceStateRefreshFunc(ec2conn, *instance.InstanceID), StepState: state, } _, err = awscommon.WaitForState(&stateChange)