From 0e1bccafed193d6cdb5884b658ceff7996938bd3 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Wed, 10 Aug 2016 17:29:07 +0100 Subject: [PATCH] aws: Let acc ID validation fail when we have no ID - we could've had ConflictsWith between affected fields, but that would make it fail even if skip_requesting_account_id=false and ConflictsWhen is not a thing (yet) --- builtin/providers/aws/config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/providers/aws/config.go b/builtin/providers/aws/config.go index b0afbb65b9..711362a691 100644 --- a/builtin/providers/aws/config.go +++ b/builtin/providers/aws/config.go @@ -217,11 +217,11 @@ func (c *Config) Client() (interface{}, error) { if err == nil { client.accountid = accountId } + } - authErr := c.ValidateAccountId(client.accountid) - if authErr != nil { - errs = append(errs, authErr) - } + authErr := c.ValidateAccountId(client.accountid) + if authErr != nil { + errs = append(errs, authErr) } client.apigateway = apigateway.New(sess)