diff --git a/aws/resource_aws_iam_account_alias.go b/aws/resource_aws_iam_account_alias.go index 3b1b86f1efb..3307ae1c29b 100644 --- a/aws/resource_aws_iam_account_alias.go +++ b/aws/resource_aws_iam_account_alias.go @@ -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) @@ -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 { @@ -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("")