You will be unable to restore a deleted service account under the following conditions:
-
If a service account has been deleted for more than 30 days, it will be automatically purged from the system and will no longer be restorable, even if a customer support request is filed.
-
If a deleted service account's email address is being used by an active (non-deleted) service account, it is impossible to restore the deleted service account.
For example, if you delete an account namedfoo@project-id.iam.gserviceaccount.com with a unique ID of 103271949540120710052, and later create a new account using the same name foo@project-id.iam.gserviceaccount.com but with a unique ID of 103271949540120710329, it is impossible to restore the first service account. To overcome this issue, you can delete the newer (second) service account, and then execute the undelete command.
Check if any of this is the case with your service account.
Hope this helps!