Skip to content

Commit

Permalink
statusDomainProcessing: Correct handling for deleted clusters.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Aug 24, 2024
1 parent 5a49343 commit f48e9ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/service/elasticsearch/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,11 @@ func findDomainUpgradeStatus(ctx context.Context, conn *elasticsearch.Client, in

func statusDomainProcessing(ctx context.Context, conn *elasticsearch.Client, name string) retry.StateRefreshFunc {
return func() (interface{}, string, error) {
output, err := findDomainByName(ctx, conn, name)
// Don't call findDomainByName here as the domain's Deleted flag will be set while DomainProcessingStatus is "Deleting".
input := &elasticsearch.DescribeElasticsearchDomainInput{
DomainName: aws.String(name),
}
output, err := findDomain(ctx, conn, input)

if tfresource.NotFound(err) {
return nil, "", nil
Expand Down

0 comments on commit f48e9ae

Please sign in to comment.