22# Ben Piper
3344
5- # TODO: Reference helpers.ps1 for new-nametag function
5+ . .. / helpers.ps1
66
77# ## Create-RouteTable
88
@@ -20,7 +20,7 @@ function Create-RouteTable {
2020 $routeTable = New-EC2RouteTable - VpcId $vpc.VpcId
2121
2222 # Create "Name" tag for the route table
23- Create - NameTag - name $name - resourceID $routeTable.RouteTableId
23+ New -NameTag - name $name - resourceID $routeTable.RouteTableId
2424
2525 # If subnet specified, register route table with subnet
2626 if ($subnet ) {
@@ -69,7 +69,7 @@ function Create-Subnet {
6969 $subnet = New-EC2Subnet - AvailabilityZone $zone - VpcId $vpc.VpcId - CidrBlock $IPv4CIDR - Ipv6CidrBlock $IPv6subnet
7070
7171 # Create Name tag for the subnet
72- Create - NameTag - name $name - resourceID $subnet.SubnetId
72+ New -NameTag - name $name - resourceID $subnet.SubnetId
7373
7474 # Return the subnet
7575 $subnet = get-ec2subnet - SubnetId $subnet.SubnetId
@@ -93,7 +93,7 @@ function Create-VPC {
9393 $vpc = New-EC2Vpc - CidrBlock $vpcCidr - AmazonProvidedIpv6CidrBlock $true
9494
9595 # Create Name tag for the VPC
96- Create - NameTag - name $vpcName - resourceID $vpc.VpcId
96+ New -NameTag - name $vpcName - resourceID $vpc.VpcId
9797
9898 # Return the VPC
9999 $vpc = Get-EC2Vpc - VpcId $vpc.VpcId
@@ -111,7 +111,7 @@ function Create-VPC {
111111 $igw = New-EC2InternetGateway
112112 Add-EC2InternetGateway - InternetGatewayId $igw.InternetGatewayId - VpcId $vpc.VpcId
113113
114- Create - NameTag - name $name - resourceID $igw.InternetGatewayId
114+ New -NameTag - name $name - resourceID $igw.InternetGatewayId
115115 $igw = Get-EC2InternetGateway $igw.InternetGatewayId
116116 return $igw
117117 }
0 commit comments