From d66c3d86ee4964b5104870b18006db5cb0ab64a6 Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Sat, 29 Jun 2013 09:32:07 -0400 Subject: [PATCH] Add AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY --- builder/amazonebs/builder.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/builder/amazonebs/builder.go b/builder/amazonebs/builder.go index ce17a646f..8822a78fb 100644 --- a/builder/amazonebs/builder.go +++ b/builder/amazonebs/builder.go @@ -58,10 +58,18 @@ func (b *Builder) Prepare(raws ...interface{}) error { } } + if b.config.AccessKey == "" { + b.config.AccessKey = os.Getenv("AWS_ACCESS_KEY_ID") + } + if b.config.AccessKey == "" { b.config.AccessKey = os.Getenv("AWS_ACCESS_KEY") } + if b.config.SecretKey == "" { + b.config.SecretKey = os.Getenv("AWS_SECRET_ACCESS_KEY") + } + if b.config.SecretKey == "" { b.config.SecretKey = os.Getenv("AWS_SECRET_KEY") }