Skip to content

Commit

Permalink
Fix nil pointer when first seen tag is nil (gruntwork-io#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
james03160927 authored Aug 22, 2023
1 parent aee65f0 commit ed39eed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws/resources/opensearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ func (osd *OpenSearchDomains) getAll(configObj config.Config) ([]*string, error)
return nil, errors.WithStackTrace(err)
}

if firstSeenTime.IsZero() {
if firstSeenTime == nil {
err := osd.setFirstSeenTag(domain.ARN, time.Now().UTC())
if err != nil {
logging.Logger.Errorf("Error tagging the OpenSearch Domain with ARN %s", aws.StringValue(domain.ARN))
logging.Logger.Errorf("Error tagging the OpenSearch Domain with ARN %s with error: %s", aws.StringValue(domain.ARN), err.Error())
return nil, errors.WithStackTrace(err)
}
}
Expand Down

0 comments on commit ed39eed

Please sign in to comment.