https://pulumi.com logo
#general
Title
# general
q

quick-action-34599

04/19/2019, 2:12 PM
I can’t find any examples of using host-based routing with ALBs in pulumi, specifically with the awsx module. Has anyone out there done this successfully?
a

adamant-dress-73325

04/19/2019, 3:36 PM
Haven’t done this yet, but I imagine the following might work (no guarantees lol):
Copy code
const ptTLSListener = ptTargetGroup.createListener("pt_tls_listener", {
  port: 443,
  external: true,
  protocol: "HTTPS",
  certificateArn: ptCert.arn,
  sslPolicy: "ELBSecurityPolicy-2016-08"
}).addListenerRule('pt_ksdljfds', {
  actions: [{
    type: 'forward'
  }],
  conditions: [
    {
      field: 'host-header',
      values: 'my-service.*.<http://terraform.io|terraform.io>'
    }
  ]
});
q

quick-action-34599

04/19/2019, 4:09 PM
Yea I’ve got it ALMOST working now, but it’s complaining about a duplicate security group now
Got it!
👍 1
I had to delete the whole network stack in pulumi and have it recreated