I’m accidentally remove GCP project, and after that I got this error.
gcp:cloudrunv2:Service (cogi-iam-dev-service):
error: sdk-v2/provider2.go:572: sdk.helper_schema: Error creating Service: googleapi: Error 403: denied: Project #xxxxxxxxx has
been deleted.: provider=google-beta@9.16.0
error: 1 error occurred:
* Error creating Service: googleapi: Error 403: denied: Project #xxxxxxxxxxx has been deleted.
from Gemini: you can recreate or restore a deleted GCP project
, but it depends on when you deleted it.
GCP project deletion is a two-stage process:
-
Soft Delete (0–30 days): The project is marked for deletion, stops incurring most costs, and is not accessible, but can be restored.
-
Permanent Delete (After 30 days): The project and its resources are permanently purged and cannot be recovered.
Google Developer forums +2
Scenario A: Project deleted within the last 30 days (Restore)
If you are within the 30-day grace period, you can “undelete” it.
-
Go to the IAM & Admin > Manage Resources page in the GCP Console.
-
Click on Resources pending deletion (usually located below the project list).
-
Check the box next to your project and click Restore.
-
Crucial Step: You must manually re-enable billing for this project after restoring it.
Google Help +3
Scenario B: Project deleted more than 30 days ago (Recreate)
If the project was deleted more than 30 days ago, it is gone permanently.
-
You CANNOT use the same Project ID again. The project ID is permanently reserved, even after the project is purged.
-
You CAN reuse the Project Name. You can create a new project with the same name, but you must choose a new, unique Project ID
So, from my understanding. If you can restore project with same id. you should be able to “reconnect” your cloud run to that project. Not sure how you manage infrastructure - via code or directly via console gui