From 4e8db89403beea7531e53e272d5ce76407ec13a0 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 3 Aug 2013 16:24:49 -0700 Subject: [PATCH] builder/amazon/all: use new SSHAddress method [GH-243] --- CHANGELOG.md | 2 ++ builder/amazon/ebs/builder.go | 2 +- builder/amazon/instance/builder.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d830a58c..277994d36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ BUG FIXES: * core: Absolute/relative filepaths on Windows now work for iso_url and other settings. [GH-240] +* builder/amazon/all: instance info is refreshed while waiting for SSH, + allowing Packer to see updated IP/DNS info. [GH-243] ## 0.2.2 (August 1, 2013) diff --git a/builder/amazon/ebs/builder.go b/builder/amazon/ebs/builder.go index da51c264e..1960402cb 100644 --- a/builder/amazon/ebs/builder.go +++ b/builder/amazon/ebs/builder.go @@ -101,7 +101,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe SubnetId: b.config.SubnetId, }, &common.StepConnectSSH{ - SSHAddress: awscommon.SSHAddress(b.config.SSHPort), + SSHAddress: awscommon.SSHAddress(ec2conn, b.config.SSHPort), SSHConfig: awscommon.SSHConfig(b.config.SSHUsername), SSHWaitTimeout: b.config.SSHTimeout(), }, diff --git a/builder/amazon/instance/builder.go b/builder/amazon/instance/builder.go index f485263b1..7fd1d9f0b 100644 --- a/builder/amazon/instance/builder.go +++ b/builder/amazon/instance/builder.go @@ -167,7 +167,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe SubnetId: b.config.SubnetId, }, &common.StepConnectSSH{ - SSHAddress: awscommon.SSHAddress(b.config.SSHPort), + SSHAddress: awscommon.SSHAddress(ec2conn, b.config.SSHPort), SSHConfig: awscommon.SSHConfig(b.config.SSHUsername), SSHWaitTimeout: b.config.SSHTimeout(), },