Terraform: Error: Error creating Network: googleapi: Error 403: Compute Engine API has not been used in project 123 before or it is disabled
Terraform called a Google API that isn't enabled in the project.
Error: Error creating Network: googleapi: Error 403: Compute Engine API has not been used in project 123 before or it is disabledgoogleapi: Error 403: Compute Engine API has not been used in projectError: Error waiting for Enabling Service: Error code 7SERVICE_DISABLED terraform googlegoogleapi: Error 403 accessNotConfigured Meaning
Enable it (gcloud services enable compute.googleapis.com) or manage it with google_project_service. Use depends_on = [google_project_service.compute] so resources wait for enablement; allow time for propagation (retry). Billing must be linked for most APIs.
Common causes
- API not enabled
- Enablement not yet propagated
- Wrong project (quota project)
- Billing not linked
- Service Usage API disabled itself
⚡ Quick fix
gcloud services enable compute.googleapis.com --project PROJECT- Manage with
google_project_service+depends_on - Retry apply after a minute
Detailed fix by platform
Terraform
resource "google_project_service" "compute" { service = "compute.googleapis.com" disable_on_destroy = false }
How to diagnose
- API — Enabled?
- Project — Right?
- Billing — Linked?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 403: does not have storage.objects.get access Cloud Storage: 403 Forbidden — user@example.com does not have storage.objects.get access to the Google Cloud Storage object
- 409: The resource already exists Compute Engine: ERROR: (gcloud.compute.instances.create) Could not fetch resource: The resource 'projects/p/zones/z/instances/vm-1' already exists
- 429 RESOURCE_EXHAUSTED: Quota exceeded for quota metric Google API: 429 RESOURCE_EXHAUSTED — Quota exceeded for quota metric 'Read requests' and limit 'Read requests per minute per user'
Most viewed in Terraform
- Error acquiring the state lock Terraform: Error: Error acquiring the state lock — ConditionalCheckFailedException / state blob is already locked
- Inconsistent dependency lock file Terraform: Error: Inconsistent dependency lock file — provider x: required by this configuration but no version is selected
- Reference to undeclared resource Terraform: Error: Reference to undeclared resource / Reference to undeclared input variable
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026