Skip to content

Commit

Permalink
ensure CustomDomainConfig is not nil first
Browse files Browse the repository at this point in the history
Co-Authored-By: adelamarre <[email protected]>
bflad and adelamarre authored Oct 30, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 2bc2b08 commit 330babd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aws/resource_aws_cognito_user_pool_domain.go
Original file line number Diff line number Diff line change
@@ -136,7 +136,10 @@ func resourceAwsCognitoUserPoolDomainRead(d *schema.ResourceData, meta interface
desc := domain.DomainDescription

d.Set("domain", d.Id())
d.Set("certificate_arn", desc.CustomDomainConfig.CertificateArn)
d.Set("certificate_arn", "")
if desc.CustomDomainConfig != nil {
d.Set("certificate_arn", desc.CustomDomainConfig.CertificateArn)
}
d.Set("aws_account_id", desc.AWSAccountId)
d.Set("cloudfront_distribution_arn", desc.CloudFrontDistribution)
d.Set("s3_bucket", desc.S3Bucket)

0 comments on commit 330babd

Please sign in to comment.