-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since August 23 NLBs support Security Groups as well now (see [AWS blog post](https://aws.amazon.com/blogs/containers/network-load-balancers-now-support-security-groups/)). This change adds the parameter for configuring security groups to the NLB component. The one notable difference compared to the ALB component is that I refrained from adding the default security group. For NLBs security groups cannot be added if none are currently present, and cannot all be removed once added. Adding a default security group to NLBs would cause replacements during upgrades. Fixes #1282 Also re-enabled the LB upgrade tests and re-recorded them. They were failing because they were using invokes under the hood to get the default subnet. Invokes are not compatible with upgrade tests because they don't use the recorded calls and instead reach out to the cloud instead. Fixes #1265 & #1114
- Loading branch information
1 parent
18bd13b
commit 8bcfa31
Showing
21 changed files
with
2,381 additions
and
1,097 deletions.
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
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
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 |
---|---|---|
@@ -1,4 +1,16 @@ | ||
import * as awsx from "@pulumi/awsx"; | ||
|
||
// // Create a network load balancer. | ||
const lb = new awsx.lb.NetworkLoadBalancer("nginx-lb"); | ||
// Create VPC for the LB | ||
const vpc = new awsx.ec2.Vpc("test-vpc", { | ||
subnetSpecs: [ | ||
{ type: "Public" } | ||
], | ||
natGateways: { | ||
strategy: "None", | ||
} | ||
}); | ||
|
||
// Create a network load balancer. | ||
const lb = new awsx.lb.NetworkLoadBalancer("nginx-lb", { | ||
subnets: vpc.subnets, | ||
}); |
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,3 @@ | ||
name: ts-nlb-with-security-group | ||
runtime: nodejs | ||
description: Minimal Network LoadBalancer Typescript component test |
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,11 @@ | ||
import * as awsx from "@pulumi/awsx"; | ||
import * as aws from "@pulumi/aws"; | ||
|
||
const securityGroup = new aws.ec2.SecurityGroup( | ||
"nlb-security-group", | ||
); | ||
|
||
// Create a network load balancer with the security group from above | ||
const lb = new awsx.lb.NetworkLoadBalancer("nlb", { | ||
securityGroups: [securityGroup.id] | ||
}); |
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,11 @@ | ||
{ | ||
"name": "ts-lb-simple", | ||
"devDependencies": { | ||
"@types/node": "^18.0.0" | ||
}, | ||
"dependencies": { | ||
"@pulumi/aws": "^6.0.0", | ||
"@pulumi/pulumi": "^3.0.0", | ||
"@pulumi/awsx": "latest" | ||
} | ||
} |
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,15 @@ | ||
{ | ||
"compilerOptions": { | ||
"strict": true, | ||
"outDir": "bin", | ||
"target": "es2016", | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"sourceMap": true, | ||
"experimentalDecorators": true, | ||
"pretty": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noImplicitReturns": true, | ||
"forceConsistentCasingInFileNames": true | ||
} | ||
} |
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
Oops, something went wrong.