purple-train-14007
02/01/2023, 12:14 AMexport class BTnetwork extends pulumi.ComponentResource {
public vpc: aws.ec2.Vpc;
public subnet1: aws.ec2.Subnet;
public subnet2: aws.ec2.Subnet;
constructor(
vpcname: string,
vpccidrblock: string,
subnet1name: string,
subnet1cidr: string,
subnet1az: string,
subnet2name: string,
subnet2cidr: string,
subnet2az: string,
opts?: ResourceOptions
) {
super("beyondtrust:network:BTnetwork", vpcname, {}, opts);
this.vpc = new aws.ec2.Vpc(
vpcname,
{
cidrBlock: vpccidrblock,
instanceTenancy: "dedicated",
tags: {
Name: "BeyondTrust VPC",
Application: baseTags.Application,
TeamName: baseTags.Team,
CostCenter: baseTags.CostCenter,
},
},
{ parent: this }
);
this.registerOutputs({
VPCID: this.vpc.id,
});
this.subnet1 = new aws.ec2.Subnet(
subnet1name,
{
vpcId: this.vpc.id,
cidrBlock: subnet1cidr,
availabilityZone: subnet1az,
tags: {
Name: "BeyondTrust Subnet 1",
Application: baseTags.Application,
TeamName: baseTags.Team,
CostCenter: baseTags.CostCenter,
},
},
{
parent: this,
}
);
this.subnet2 = new aws.ec2.Subnet(
subnet2name,
{
vpcId: this.vpc.id,
cidrBlock: subnet2cidr,
availabilityZone: subnet2az,
tags: {
Name: "BeyondTrust Subnet 2",
Application: baseTags.Application,
TeamName: baseTags.Team,
CostCenter: baseTags.CostCenter,
},
},
{
parent: this,
}
);
}
}
great-sunset-355
02/01/2023, 1:15 PMpublic readonly vpc: aws.ec2.Vpc
purple-train-14007
02/01/2023, 2:53 PM