Fetching GCP resource details from exisitng infrastructure using Terraform

I have an existing project on Google Cloud with say 10 instances. I am trying to authenticate in the existing project using credential file in the Terraform main.tf. I want to get all the instance IDs by mentioning the ProjectID and then add tags to all those existing instances.