Skip to content

Commit

Permalink
Fill base case fields when nil.
Browse files Browse the repository at this point in the history
  • Loading branch information
David González committed Jan 20, 2018
1 parent 607f620 commit cbb12a8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions aws/data_source_aws_acm_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ func dataSourceAwsAcmCertificateRead(d *schema.ResourceData, meta interface{}) e
_, ok = d.GetOk("most_recent")
if ok {
mr := arns[0]
if mr.notBefore == nil {
description, err := describeCertificate(mr, conn)
if err != nil {
return errwrap.Wrapf("Error describing certificates: {{err}}", err)
}

mr.notBefore = description.Certificate.NotBefore
}
for _, arn := range arns[1:] {
if arn.notBefore == nil {
description, err := describeCertificate(arn, conn)
Expand Down

0 comments on commit cbb12a8

Please sign in to comment.