Skip to content

Commit

Permalink
Merge pull request #3954 from terraform-providers/b-aws_lb_target_gro…
Browse files Browse the repository at this point in the history
…up-prevent-matcher-crash

resource/aws_lb_target_group: Prevent crash from missing matcher during read
  • Loading branch information
bflad committed Mar 28, 2018
2 parents ee46cf9 + 206c4c0 commit 42c418f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/resource_aws_lb_target_group.go
Expand Up @@ -465,7 +465,7 @@ func flattenAwsLbTargetGroupResource(d *schema.ResourceData, meta interface{}, t
if targetGroup.HealthCheckPath != nil {
healthCheck["path"] = *targetGroup.HealthCheckPath
}
if targetGroup.Matcher.HttpCode != nil {
if targetGroup.Matcher != nil && targetGroup.Matcher.HttpCode != nil {
healthCheck["matcher"] = *targetGroup.Matcher.HttpCode
}

Expand Down

0 comments on commit 42c418f

Please sign in to comment.