Terraform plan takes a long time when using Google Cloud Platform

hello, i am facing the same issue of Terraform plan taking too long.

i am a student of data science and trying test terraform with my gcloud account. However, when I create a simple configuration to create VPC network in my gcloud account, the planning is taking too long.

Also, to note that i am using terraform on gcloud or any cloud service for the first time.

Terraform Block - Specify required providers

terraform {
required_providers {
docker = {
source = “kreuzwerker/docker”
version = “~> 3.0.1”
}
google = {
source = “hashicorp/google”
version = “4.51.0”
}
}
}

Provider Configuration for Docker

provider “docker” {
host = “npipe:////.//pipe//docker_engine”
}

Docker Resource - Define a Docker container

resource “docker_image” “nginx” {
name = “nginx:latest”
keep_locally = false
}

resource “docker_container” “nginx” {
image = docker_image.nginx.id
name = “tutorial”
ports {
internal = 80
external = 8000
}
}

Provider Configuration for Google Cloud

provider “google” {
credentials = file(“<PATH_TO_YOUR_CREDENTIALS_JSON_FILE>”)
project = “<YOUR_GCP_PROJECT_ID>”
region = “us-central1”
zone = “us-central1-c”
}

Google Cloud Resource - Define a Google Compute Network

resource “google_compute_network” “vpc_network” {
name = “terraform-network”
}

here’s my generate configuration.

Yes, sometimes its take long time as it happened to me too as I figured out the internet connective issue as I have done the speed test which seems to be very low for which I was taking time.