builder/amazon/instance: use US if region us-east-1 for upload [GH-729]

This commit is contained in:
Mitchell Hashimoto 2013-12-18 09:00:20 -08:00
parent c3d34f930d
commit ae7459718d
1 changed files with 7 additions and 1 deletions

View File

@ -32,12 +32,18 @@ func (s *StepUploadBundle) Run(state multistep.StateBag) multistep.StepAction {
return multistep.ActionHalt
}
// See GH-729 and http://goo.gl/rNZiCs
regionName := region.Name
if regionName == "us-east-1" {
regionName = "US"
}
config.BundleUploadCommand, err = config.tpl.Process(config.BundleUploadCommand, uploadCmdData{
AccessKey: config.AccessKey,
BucketName: config.S3Bucket,
BundleDirectory: config.BundleDestination,
ManifestPath: manifestPath,
Region: region.Name,
Region: regionName,
SecretKey: config.SecretKey,
})
if err != nil {