Skip to content

Commit

Permalink
session: Return error instead of logging with AWS Account ID lookup f…
Browse files Browse the repository at this point in the history
  • Loading branch information
bflad committed Feb 27, 2019
1 parent bd5e28e commit 0de5f5f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,10 @@ func GetSessionWithAccountIDAndPartition(c *Config) (*session.Session, string, s
return sess, accountID, partition, nil
}

// DEPRECATED: Next major version of the provider should return the error instead of logging
// if skip_request_account_id is not enabled.
log.Printf("[WARN] %s", fmt.Sprintf(
return nil, "", "", fmt.Errorf(
"AWS account ID not previously found and failed retrieving via all available methods. "+
"This will return an error in the next major version of the AWS provider. "+
"See https://www.terraform.io/docs/providers/aws/index.html#skip_requesting_account_id for workaround and implications. "+
"Errors: %s", err))
"Errors: %s", err)
}

var partition string
Expand Down

0 comments on commit 0de5f5f

Please sign in to comment.