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

Final retries after timeouts in various code-related resources #9682

Merged
merged 1 commit into from
Aug 9, 2019
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
8 changes: 6 additions & 2 deletions aws/resource_aws_codebuild_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -649,9 +649,11 @@ func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{})
}

return nil

})

if isResourceTimeoutError(err) {
resp, err = conn.CreateProject(params)
}
if err != nil {
return fmt.Errorf("Error creating CodeBuild project: %s", err)
}
Expand Down Expand Up @@ -1157,9 +1159,11 @@ func resourceAwsCodeBuildProjectUpdate(d *schema.ResourceData, meta interface{})
}

return nil

})

if isResourceTimeoutError(err) {
_, err = conn.UpdateProject(params)
}
if err != nil {
return fmt.Errorf(
"[ERROR] Error updating CodeBuild project (%s): %s",
Expand Down
10 changes: 8 additions & 2 deletions aws/resource_aws_codedeploy_deployment_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,11 @@ func resourceAwsCodeDeployDeploymentGroupCreate(d *schema.ResourceData, meta int
return handleCreateError(err)
})

if isResourceTimeoutError(err) {
resp, err = conn.CreateDeploymentGroup(&input)
}
if err != nil {
return err
return fmt.Errorf("Error creating CodeDeploy deployment group: %s", err)
}

d.SetId(*resp.DeploymentGroupId)
Expand Down Expand Up @@ -732,8 +735,11 @@ func resourceAwsCodeDeployDeploymentGroupUpdate(d *schema.ResourceData, meta int
return handleUpdateError(err)
})

if isResourceTimeoutError(err) {
_, err = conn.UpdateDeploymentGroup(&input)
}
if err != nil {
return err
return fmt.Errorf("Error updating CodeDeploy deployment group: %s", err)
}

return resourceAwsCodeDeployDeploymentGroupRead(d, meta)
Expand Down
3 changes: 3 additions & 0 deletions aws/resource_aws_codepipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ func resourceAwsCodePipelineCreate(d *schema.ResourceData, meta interface{}) err

return resource.NonRetryableError(err)
})
if isResourceTimeoutError(err) {
resp, err = conn.CreatePipeline(params)
}
if err != nil {
return fmt.Errorf("Error creating CodePipeline: %s", err)
}
Expand Down