File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -64,12 +64,25 @@ $appsg = New-EC2SecurityGroup -VpcId $vpc.VpcId -GroupName "app-sg" -GroupDescri
6464$dbsg = New-EC2SecurityGroup - VpcId $vpc.VpcId - GroupName " db-sg" - GroupDescription " db-sg"
6565
6666# Create IPpermissions for public http and https
67+
68+ $httpip = new-object Amazon.EC2.Model.IpPermission
69+ $httpip.IpProtocol = " tcp"
70+ $httpip.FromPort = 80
71+ $httpip.ToPort = 80
72+ $httpip.IpRanges.Add (" ::0/0" )
73+
6774$httpip = new-object Amazon.EC2.Model.IpPermission
6875$httpip.IpProtocol = " tcp"
6976$httpip.FromPort = 80
7077$httpip.ToPort = 80
7178$httpip.IpRanges.Add (" 0.0.0.0/0" )
7279
80+ $httpsip = new-object Amazon.EC2.Model.IpPermission
81+ $httpsip.IpProtocol = " tcp"
82+ $httpsip.FromPort = 443
83+ $httpsip.ToPort = 443
84+ $httpsip.IpRanges.Add (" ::0/0" )
85+
7386$httpsip = new-object Amazon.EC2.Model.IpPermission
7487$httpsip.IpProtocol = " tcp"
7588$httpsip.FromPort = 443
You can’t perform that action at this time.
0 commit comments