great-sunset-355
05/27/2024, 3:14 PMawsx.lb.Listener
but in the end, they all have the same arn
and in AWS exist as a single listener?modern-zebra-45309
05/27/2024, 4:08 PMgreat-sunset-355
05/27/2024, 6:29 PMpublicServicePorts.forEach((port) => {
const targetGroup = alb.createTargetGroup(
`alb-tg-${port}`,
{
deregistrationDelay: 10,
port,
protocol: "HTTP",
healthCheck: {
path: args.healthCheckPath ?? DefaultHealthCheckPath,
interval: 21,
timeout: 20,
unhealthyThreshold: 5,
},
slowStart: 30,
stickiness: {
cookieDuration: 3600,
enabled: true,
type: "lb_cookie",
},
},
);
portApplicationMappingPublic[port] = {
targetGroup,
listener: targetGroup.createListener(
`lis-https-${port}`,
{
certificateArn,
defaultAction: {
type: "fixed-response",
fixedResponse: {
contentType: "text/plain",
statusCode: "403",
messageBody: "403 Forbidden",
},
},
external: false,
name: `${lbPrefix}-public-${port}`,
port: 443,
protocol: "HTTPS",
sslPolicy: args.publicAccess?.sslPolicy || "ELBSecurityPolicy-TLS13-1-2-2021-06",
},
),
};
modern-zebra-45309
05/27/2024, 6:57 PMwhite-balloon-205
great-sunset-355
05/28/2024, 4:42 AMwhite-balloon-205
I wish I could just run the code in debug and go through step by step.Yes indeed! You technically can already - see comments on https://github.com/pulumi/pulumi/issues/1372 with suggestions. But we are also working on some improvements to make this more "push button" so you can directly debug a Pulumi program and automatically attach to the processes running any of the components it uses (like AWSX in this case).
great-sunset-355
05/28/2024, 5:38 AM"defaultListener"
which is actually a targetGroup
is crazy, I feel like an Alice going down the rabbit hole.
It is bizarre how the code can create 3 Listeners in the state referring to the same AWS object. I am trying to track down where is the reference to the original kept and how it is propagated to the pulumi resource in the state.
So that result is:
3 different URNs
but the same AWS id
.
And then looping over createRule
is smart enough to merge all rules into a single listener without causing duplicates