Fix SSH location parameter
MODIFY
aws-ts-ruby-on-rails/config.ts
aws-ts-ruby-on-rails/config.ts
import * as aws from "@pulumi/aws";
import * as pulumi from "@pulumi/pulumi";
-const config = new pulumi.Config(pulumi.getProject());
+const config = new pulumi.Config();
// keyName is the name of an existing EC2 KeyPair to enable SSH access to the instances.
export const keyName = config.get("keyName");

MODIFY
aws-ts-ruby-on-rails/index.ts
aws-ts-ruby-on-rails/index.ts
@@ -9,8 +9,8 @@ const webSg = new aws.ec2.SecurityGroup("webServerSecurityGroup", {
{ protocol: "-1", fromPort: 0, toPort: 0, cidrBlocks: [ "0.0.0.0/0" ] },
],
ingress: [
- { protocol: "tcp", fromPort: 22, toPort: 22, cidrBlocks: [ "0.0.0.0/0" ] },
- { protocol: "tcp", fromPort: 80, toPort: 80, cidrBlocks: [ config.sshLocation ] },
+ { protocol: "tcp", fromPort: 22, toPort: 22, cidrBlocks: [ config.sshLocation ] },
+ { protocol: "tcp", fromPort: 80, toPort: 80, cidrBlocks: [ "0.0.0.0/0" ] },
],
});

Fix SSH location parameter