Skip to content

Commit

Permalink
Bugfix - AWS certificate listener id need to follow the format 'liste…
Browse files Browse the repository at this point in the history
…ner-arn_certificate-arn' (GoogleCloudPlatform#1576)

* Bugfix - AWS certificate listener id need to follow the format 'listener-arn_certificate-arn'

* fix: lint listenerCertificateID variable name

Co-authored-by: Yohann Duhamel <[email protected]>
  • Loading branch information
puntakana and Yohann Duhamel authored Nov 30, 2022
1 parent db78021 commit c2135a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions providers/aws/alb.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,13 @@ func (g *AlbGenerator) loadLBListenerCertificate(svc *elasticloadbalancingv2.Cli
}
for _, lc := range lcs.Certificates {
certificateArn := *lc.CertificateArn
listenerCertificateID := *loadBalancer.ListenerArn + "_" + certificateArn
if certificateArn == *loadBalancer.Certificates[0].CertificateArn { // discard default certificate
continue
}
g.Resources = append(g.Resources, terraformutils.NewResource(
certificateArn,
certificateArn,
listenerCertificateID,
listenerCertificateID,
"aws_lb_listener_certificate",
"aws",
map[string]string{
Expand Down

0 comments on commit c2135a6

Please sign in to comment.