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

iam_account_alias: Pass awserr in returned error #3590

Merged
Merged
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
6 changes: 3 additions & 3 deletions aws/resource_aws_iam_account_alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func resourceAwsIamAccountAliasCreate(d *schema.ResourceData, meta interface{})
_, err := conn.CreateAccountAlias(params)

if err != nil {
return fmt.Errorf("Error creating account alias with name %s", account_alias)
return fmt.Errorf("Error creating account alias with name '%s': %s", account_alias, err)
}

d.SetId(account_alias)
Expand All @@ -57,7 +57,7 @@ func resourceAwsIamAccountAliasRead(d *schema.ResourceData, meta interface{}) er
resp, err := conn.ListAccountAliases(params)

if err != nil {
return err
return fmt.Errorf("Error listing account aliases: %s", err)
}

if resp == nil || len(resp.AccountAliases) == 0 {
Expand Down Expand Up @@ -85,7 +85,7 @@ func resourceAwsIamAccountAliasDelete(d *schema.ResourceData, meta interface{})
_, err := conn.DeleteAccountAlias(params)

if err != nil {
return fmt.Errorf("Error deleting account alias with name %s", account_alias)
return fmt.Errorf("Error deleting account alias with name '%s': %s", account_alias, err)
}

d.SetId("")
Expand Down