GCP simple web Server - GCP001

Posted on Fri 07 June 2019 in quiz

Alt Text

You created your first website which uses just only one web server in GCP. But you cannot connect to your website from the internet.

Spot the misconfiguration on GCP.


VPC

vpc

VPC > Firewall

vpc-firewall

VPC > Routes

vpc-routes

Compute Instances

compute-instance


terraform configuration file Download Terraform output


Answer
Firewall is not configured to accept the web connection.

Unlike AWS, there is no security group needs to be configured when you create an instance on GCP.
By default, there is no incoming traffic allowed for an instance. Hence you need to create an explicit rule to allow traffic.
You can specify following as a target:
    - All instances in the network
    - Specified target tags
    - Specified service account

I added a tag called "web" on the instance, and I can use this tag as a target to create a rule.
answer-firewall

gcp