Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Unable to create Infrastructure using Terraform in GCP

PriyaP
New Member

Hi All, I am trying to create infrastructure in google cloud using terraform main.tf variables.tf files but when the terraform is trying to create container cluster it is throwing below error

google_container_cluster.primary: Creating...

│ Error: googleapi: Error 403: Insufficient regional quota to satisfy request: resource "SSD_TOTAL_GB": request requires '300.0' and is short '50.0'. project has a quota of '250.0' with '250.0' available. View and manage quotas at https://console.cloud.google.com/iam-admin/quotas?usage=USED&project=coastal-arcana-415916.
│ Details:
│ [
│ {
│ "@type": "type.googleapis.com/google.rpc.RequestInfo",
│ "requestId": "0xfc3b1c5d01cf20"
│ },
│ {
│ "@type": "type.googleapis.com/google.rpc.ErrorInfo",
│ "domain": "container.googleapis.com",
│ "reason": "INSUFFICIENT_QUOTA_REGIONAL"
│ }
│ ]
│ , forbidden

│ with google_container_cluster.primary,
│ on main.tf line 61, in resource "google_container_cluster" "primary":
│ 61: resource "google_container_cluster" "primary" {

I made tried below things, still the issue persists.
-Tried submitting the request for quota increase, but its not accepting.
-Changed the below parameter in main.tf file and resized it from 200 to 30GB, still no luck

# Create GKE Node Pool
resource "google_container_node_pool" "primary_nodes" {
name = "${google_container_cluster.primary.name}-node-pool"
location = var.region
cluster = google_container_cluster.primary.name
node_count = 2

node_config {
oauth_scopes = [
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring",
]

labels = {
env = var.project_id
}

machine_type = "n1-standard-1"
tags = ["gke-node", "${var.project_id}-gke"]

disk_size_gb = 30 #Changed from 200 to 30GB

metadata = {
disable-legacy-endpoints = "true"
}
}
}

-Tried to spin up N1 type VM instance and tried allocating 300GB of SSD Storage, but its not getting created. It says I have already exceeded the storage limit.
-I am completely stuck and not able to progress. Any help and suggestion is highly appreciated.



1 1 384
1 REPLY 1

Hi @PriyaP ,

Welcome to Google Cloud Community!

The error message indicates that your request requires 300 GB of SSD storage, exceeding your current quota of 250 GB in the specified region. This typically occurs when the available quota has been fully utilized.

For detailed information on disk quotas, please refer to the relevant documentation.

To troubleshoot this issue, you may check this potential relevant thread on Stack Overflow. It discusses the importance of selecting appropriate cluster types, highlighting the distinction between zonal and regional clusters.

A zonal cluster operates solely within a specific zone, while a regional cluster is replicated across multiple zones for redundancy.

As part of their resolution, consider setting the location to a zone rather than a region. This will enable the use of resources within that zone, potentially circumventing the quota limitations.

Hope the above information is helpful.