Since many days I can’t provision any compute engine instance in my google cloud business account.
Billing is enabled on the project, I can’t tell what’s wrong from my side.
I sent a first request to the support before yesterday, yesterday, and today again, and here is a screenshot of their answer.
I’m lost, I don’t understand why they ask to check with their sales team.
Here my terraform output error :
google_compute_instance.lykanda-backend: Creating…
google_compute_instance.lykanda-backend: Still creating… [10s elapsed] Error: Error waiting for instance to create: Quota ‘N2_CPUS’ exceeded. Limit: 0.0 in region europe-west3.
on compute.tf line 88, in resource “google_compute_instance” “lykanda-backend”:
88: resource “google_compute_instance” “lykanda-backend” {
My compute instance block code :
resource "google_compute_instance" "lykanda-backend" {
project = "869410787656"
zone = "europe-west3-a"
name = "lykanda-backend"
machine_type = "n2-standard-2"
boot_disk {
initialize_params {
image = "debian-cloud/debian-9"
}
}
network_interface {
network = google_compute_network.lykanda.self_link
subnetwork = google_compute_subnetwork.lykanda-network.self_link
access_config {
nat_ip = google_compute_address.lykanda-static-ip-address.address
}
}
# metadata = {
# ssh-keys = join("n", [for user, key in var.ssh_keys : "${user}:${key}"])
# }
service_account {
scopes = ["userinfo-email", "compute-ro", "storage-ro"]
}
allow_stopping_for_update = true
}
2
Answers
I never received the sales team answer, then I dug into compute info within my project and per region to see different quota limits from command line :
and then saw I could use
n1-standard-2
instance type which seems to be available for all region.I tried it and it worked, so I'll continue my work this way.
This issue related only to your GCP quotas and it’s not connected to your deployment:
Actually, Stack Overflow community can do nothing with such issues.
Have a look at the email from Google Cloud Support again:
and
As you can see, because N2 CPUs are on high demand, they aren’t available. In addition, please check the documentation Resource quotas and Committed use discounts to find more information about quotas and discounts.
To solve this issue you can follow steps below: