-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ListenerRule panic if no forward parameter is missing in defaultActions #4131
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232628,4 +232628,4 @@ | |
"aws:workspaces/getWorkspace:getWorkspace": 0 | ||
} | ||
} | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: regress-4128 | ||
runtime: nodejs | ||
description: A minimal AWS TypeScript Pulumi program | ||
config: | ||
pulumi:tags: | ||
value: | ||
pulumi:template: aws-typescript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
import * as pulumi from "@pulumi/pulumi"; | ||
import * as aws from "@pulumi/aws"; | ||
import * as awsx from "@pulumi/awsx"; | ||
|
||
const vpc = new awsx.ec2.Vpc("lb-vpc", { | ||
cidrBlock: "10.0.0.0/16", | ||
subnetStrategy: "Auto", | ||
subnetSpecs: [ | ||
{ | ||
type: "Public", | ||
name: "public-subnet", | ||
}, | ||
], | ||
numberOfAvailabilityZones: 3, | ||
natGateways: { | ||
strategy: "None" | ||
} | ||
}); | ||
|
||
const secGroup = new aws.ec2.SecurityGroup("allowTls", { | ||
description: "Allow TLS inbound traffic and all outbound traffic", | ||
vpcId: vpc.vpcId, | ||
tags: { | ||
Name: "allow_tls", | ||
}, | ||
}); | ||
|
||
const loadbalancer = new aws.lb.LoadBalancer("my-lb", { | ||
loadBalancerType: "application", | ||
securityGroups: [secGroup.id], | ||
subnets: vpc.publicSubnetIds, | ||
internal: true, | ||
}); | ||
|
||
const targetGroup = new aws.lb.TargetGroup("my-tg", { | ||
port: 80, | ||
protocol: "HTTP", | ||
targetType: "ip", | ||
vpcId: vpc.vpcId, | ||
}); | ||
|
||
const listener = new aws.lb.Listener("my-listener", { | ||
loadBalancerArn: loadbalancer.arn, | ||
port: 80, | ||
defaultActions: [{ | ||
type: "forward", | ||
targetGroupArn: targetGroup.arn, | ||
}], | ||
}); | ||
|
||
const listenerRule = new aws.lb.ListenerRule("my-listener-rule", { | ||
listenerArn: listener.arn, | ||
priority: 100, | ||
actions: [{ | ||
type: "forward", | ||
targetGroupArn: targetGroup.arn, | ||
}], | ||
conditions: [{ | ||
pathPattern: { | ||
values: ["/path/*"], | ||
}, | ||
}], | ||
}); | ||
|
||
const alb = new aws.alb.LoadBalancer("my-alb", { | ||
securityGroups: [secGroup.id], | ||
subnets: vpc.publicSubnetIds, | ||
internal: true, | ||
}); | ||
|
||
const albTg = new aws.alb.TargetGroup("my-alb-tg", { | ||
port: 80, | ||
protocol: "HTTP", | ||
targetType: "ip", | ||
vpcId: vpc.vpcId, | ||
}); | ||
|
||
const albListener = new aws.lb.Listener("my-alb-listener", { | ||
loadBalancerArn: alb.arn, | ||
port: 80, | ||
defaultActions: [{ | ||
type: "forward", | ||
targetGroupArn: albTg.arn, | ||
}], | ||
}); | ||
|
||
const albRule = new aws.alb.ListenerRule("my-alb-listener-rule", { | ||
listenerArn: albListener.arn, | ||
priority: 100, | ||
actions: [{ | ||
type: "forward", | ||
targetGroupArn: albTg.arn, | ||
}], | ||
conditions: [{ | ||
pathPattern: { | ||
values: ["/path/*"], | ||
}, | ||
}], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "regress-4128", | ||
"main": "index.ts", | ||
"devDependencies": { | ||
"@types/node": "^18" | ||
}, | ||
"dependencies": { | ||
"@pulumi/pulumi": "^3.0.0", | ||
"@pulumi/aws": "^6.0.0", | ||
"@pulumi/awsx": "^2.0.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"strict": true, | ||
"outDir": "bin", | ||
"target": "es2016", | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"sourceMap": true, | ||
"experimentalDecorators": true, | ||
"pretty": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noImplicitReturns": true, | ||
"forceConsistentCasingInFileNames": true | ||
}, | ||
"files": [ | ||
"index.ts" | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not quite sure why this newline started disappearing. I tried adding it back and regenerating the file a couple of times but it kept happening