Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enable http traffic for GCE instance templates?

When creating an instance template in Google Compute Engine, how do I enable http traffic for instances created from the template?

I was thinking that providing an http tag would work, but it doesn't seem to do so.

like image 701
interestedparty333 Avatar asked Jul 20 '15 06:07

interestedparty333


People also ask

How do I enable public access to VM instance?

Log in to the Google Cloud Console using the Google Account associated with your project. Navigate to “Compute Engine -> VM instances” to select the instance you want to allow remote connections. Click on it to access the “VM instance details” screen.

How do I change the instance template in Google cloud?

So you cannot update an existing instance template or change an instance template after you create it. If you need to make changes to the configuration, create a new instance template. You can create a template based on an existing instance template, or based on an existing instance.


1 Answers

The default network in the project comes with default firewall rules "default-allow-http" and "default-allow-https" to allow traffic on port 80 and 443. These rules have a target tag setup as "http-server". When setting up the instance template you can check the box "Allow HTTP traffic" and "Allow HTTPS traffic" from your developer console, by doing that the default firewall rules will be applied to the new instances created through this instance template.

like image 148
Faizan Avatar answered Oct 19 '22 05:10

Faizan