Merge pull request #885 from rosstimson/ec2-upload-bundle

builder/amazon/instance: use --url flag rather than --location for ec2-upload-bundle
This commit is contained in:
Mitchell Hashimoto 2014-02-21 14:57:12 -08:00
commit 039def70f8
3 changed files with 3 additions and 9 deletions

View File

@ -74,7 +74,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
"-s {{.SecretKey}} " +
"-d {{.BundleDirectory}} " +
"--batch " +
"--location {{.Region}} " +
"--url https://s3-{{.Region}}.amazonaws.com " +
"--retry"
}

View File

@ -32,18 +32,12 @@ 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: regionName,
Region: region.Name,
SecretKey: config.SecretKey,
})
if err != nil {

View File

@ -277,7 +277,7 @@ sudo -n ec2-upload-bundle \
-s {{.SecretKey}} \
-d {{.BundleDirectory}} \
--batch \
--location {{.Region}} \
--url https://s3-{{.Region}}.amazonaws.com \
--retry
```