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/aws: Fix all pointer RetryError returns #5538

Merged
merged 1 commit into from
Mar 9, 2016
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions builtin/providers/aws/resource_aws_cloudwatch_event_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func resourceAwsCloudWatchEventRuleCreate(d *schema.ResourceData, meta interface
return err
}
}
return &resource.RetryError{
return resource.RetryError{
Err: err,
}
}
Expand Down Expand Up @@ -168,7 +168,7 @@ func resourceAwsCloudWatchEventRuleUpdate(d *schema.ResourceData, meta interface
return err
}
}
return &resource.RetryError{
return resource.RetryError{
Err: err,
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@ func resourceAwsCodeDeployDeploymentGroupCreate(d *schema.ResourceData, meta int
if err != nil {
codedeployErr, ok := err.(awserr.Error)
if !ok {
return &resource.RetryError{Err: err}
return resource.RetryError{Err: err}
}
if codedeployErr.Code() == "InvalidRoleException" {
log.Printf("[DEBUG] Trying to create deployment group again: %q",
codedeployErr.Message())
return err
}

return &resource.RetryError{Err: err}
return resource.RetryError{Err: err}
}
return nil
})
Expand Down
8 changes: 4 additions & 4 deletions builtin/providers/aws/resource_aws_ecs_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error
if err != nil {
ec2err, ok := err.(awserr.Error)
if !ok {
return &resource.RetryError{Err: err}
return resource.RetryError{Err: err}
}
if ec2err.Code() == "InvalidParameterException" {
log.Printf("[DEBUG] Trying to create ECS service again: %q",
ec2err.Message())
return err
}

return &resource.RetryError{Err: err}
return resource.RetryError{Err: err}
}

return nil
Expand Down Expand Up @@ -322,7 +322,7 @@ func resourceAwsEcsServiceDelete(d *schema.ResourceData, meta interface{}) error

ec2err, ok := err.(awserr.Error)
if !ok {
return &resource.RetryError{Err: err}
return resource.RetryError{Err: err}
}
if ec2err.Code() == "InvalidParameterException" {
// Prevent "The service cannot be stopped while deployments are active."
Expand All @@ -331,7 +331,7 @@ func resourceAwsEcsServiceDelete(d *schema.ResourceData, meta interface{}) error
return err
}

return &resource.RetryError{Err: err}
return resource.RetryError{Err: err}

})
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions builtin/providers/aws/resource_aws_iam_policy_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func attachPolicyToRoles(conn *iam.IAM, roles []*string, arn string) error {

attachedPolicies, err := conn.ListRolePolicies(&input)
if err != nil {
return &resource.RetryError{Err: err}
return resource.RetryError{Err: err}
}

if len(attachedPolicies.PolicyNames) > 0 {
Expand All @@ -236,7 +236,7 @@ func attachPolicyToRoles(conn *iam.IAM, roles []*string, arn string) error {
}

if !foundPolicy {
return &resource.RetryError{Err: fmt.Errorf("Policy (%q) not yet found", arn)}
return resource.RetryError{Err: fmt.Errorf("Policy (%q) not yet found", arn)}
}
}

Expand Down
2 changes: 1 addition & 1 deletion builtin/providers/aws/resource_aws_launch_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ func resourceAwsLaunchConfigurationCreate(d *schema.ResourceData, meta interface
return err
}
}
return &resource.RetryError{
return resource.RetryError{
Err: err,
}
}
Expand Down
4 changes: 2 additions & 2 deletions builtin/providers/aws/resource_aws_vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func resourceAwsVpcDelete(d *schema.ResourceData, meta interface{}) error {

ec2err, ok := err.(awserr.Error)
if !ok {
return &resource.RetryError{Err: err}
return resource.RetryError{Err: err}
}

switch ec2err.Code() {
Expand All @@ -326,7 +326,7 @@ func resourceAwsVpcDelete(d *schema.ResourceData, meta interface{}) error {
return err
}

return &resource.RetryError{
return resource.RetryError{
Err: fmt.Errorf("Error deleting VPC: %s", err),
}
})
Expand Down