│ on main.tf line xxx, in resource "google_compute_global_address" "xxx":
│ region = "us-central1"
│
│ An argument named "region" is not expected here.
Solution : there isn't an argument called region for this resource. Remove that and the problem is resolved. Global IP is not bound to an region.
│ on main.tf line 182, in resource "google_compute_firewall" "allow-health-check":
│ 182: port_range = "80"
│
│ An argument named "port_range" is not expected here.
Solution :
There isn't an argumemnt named port_range. If you want to specify which port to open, then the block looks like below :
allow {
protocol = "tcp"
ports = ["80"]
}
│ Error: Unsupported argument
│
│ on main.tf line 169, in resource "google_compute_instance_group_manager" "lb-backend-group":
│ 169: instance_template = google_compute_instance_template.lb-backend-template.self_link
│
│ An argument named "instance_template" is not expected here.
Solution :
You cant directly define tthe argment : instance_template. It has to be nested inside version,like beloow :
version {
instance_template = google_compute_instance_template.lb-backend-template.self_link
name = "backend-servers"
}