Skip to content

Commit

Permalink
Merge pull request #2081 from terraform-providers/f-emr-expose-termin…
Browse files Browse the repository at this point in the history
…ation-err

r/emr_cluster: Expose error on TERMINATED_WITH_ERRORS
  • Loading branch information
radeksimko authored Oct 30, 2017
2 parents 821f69e + d4097c9 commit 85aa8d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws/resource_aws_emr_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1006,9 +1006,9 @@ func resourceAwsEMRClusterStateRefreshFunc(d *schema.ResourceData, meta interfac
}

status := emrc.Status
if *status.State == "TERMINATING" {
if *status.State == "TERMINATING" || *status.State == "TERMINATED_WITH_ERRORS" {
reason := *status.StateChangeReason
return emrc, *status.State, fmt.Errorf("EMR Cluster is terminating. %s: %s",
return emrc, *status.State, fmt.Errorf("%s: %s",
*reason.Code, *reason.Message)
}

Expand Down

0 comments on commit 85aa8d2

Please sign in to comment.