Commit 2af0f10d authored by Clint's avatar Clint

Merge pull request #2204 from mitchellh/b-aws-iam-profile-upload

builder/amazon-instance: Omit access, secrety key if using IAM Instan…
parents e8f846e4 c9b413e3
......@@ -73,6 +73,15 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
}
if b.config.BundleUploadCommand == "" {
if b.config.IamInstanceProfile != "" {
b.config.BundleUploadCommand = "sudo -i -n ec2-upload-bundle " +
"-b {{.BucketName}} " +
"-m {{.ManifestPath}} " +
"-d {{.BundleDirectory}} " +
"--batch " +
"--region {{.Region}} " +
"--retry"
} else {
b.config.BundleUploadCommand = "sudo -i -n ec2-upload-bundle " +
"-b {{.BucketName}} " +
"-m {{.ManifestPath}} " +
......@@ -83,6 +92,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
"--region {{.Region}} " +
"--retry"
}
}
if b.config.BundleVolCommand == "" {
b.config.BundleVolCommand = "sudo -i -n ec2-bundle-vol " +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment