Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider: Return error instead of WARN log with AWS account ID lookup failure #5795

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions aws/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,13 +448,10 @@ func (c *Config) Client() (interface{}, error) {
var err error
client.accountid, client.partition, err = GetAccountIDAndPartition(client.iamconn, client.stsconn, cp.ProviderName)
if err != 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)
}
}

Expand Down