hello, looking for some samples of using an ASG on...
# getting-started
hello, looking for some samples of using an ASG on AWS with a load balancer (I'm using TS) is there an example I can look at?
which type of load balancer? are you using fargate or just ec2 instances?
ec2 instances
and which language SDK?
typescript, but any language example is ok
I'm making slow progress so far, this is essentially what i have. next step is to create an ASG and LB - with the user data script
Copy code
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";
import * as fs from 'fs';

// Allocate a new VPC with the default settings:
const vpc = new awsx.ec2.Vpc("ci-cd", {
    // runners will be available in multiple zones
    numberOfAvailabilityZones: 2,
    // this is the smallest cidr block that we can use - 64 IPs
    // split across 4 subnets - 16 per subnet, minimum enforced by aws
    cidrBlock: ""

// Export a few resulting fields to make them easy to use:
export const vpcId: pulumi.Output<string> = vpc.id;
export const vpcPrivateSubnetIds: Promise<pulumi.Output<string>[]> = vpc.privateSubnetIds;
export const vpcPublicSubnetIds: Promise<pulumi.Output<string>[]> = vpc.publicSubnetIds;

// create a security group allowing inbound http(s) / ssh  traffic, all outbound traffic
const group = new aws.ec2.SecurityGroup("allow-http-ssh", {
    ingress: [
        { protocol: "tcp", fromPort: 22, toPort: 22, cidrBlocks: [""] },
        { protocol: "tcp", fromPort: 80, toPort: 80, cidrBlocks: [""] },
        { protocol: "tcp", fromPort: 443, toPort: 443, cidrBlocks: [""] },
    egress: [
        { protocol: "-1", fromPort: 0, toPort: 0, cidrBlocks: [""] },

// create an ec2 instance in each private subnet for github runner
const userData = fs.readFileSync('./user_data.sh','utf8');
gives me a few minutes, I have something sort of done here
ok ty
ty, taking a look
looks great I'll try it - I'm guessing
needs to be specified somewhere in the CF template. It's not used right now
it goes in the launch template, I'll try figure out what I missed there
@many-yak-61188 refresh the page, pushed a fix