When I try to run
steps:
- id: Plan Terraform
name: hashicorp/terraform:light
args:
- plan
in Cloud Build, I get the error:
Error: Error reading Project Service foo/cloudbuild.googleapis.com: googleapi: Error 403: Cloud Resource Manager API has not been used in project 123456789 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com/overview?project=123456789 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfigured
Since the same terraform definition is working on my local machine I assume the error message is slightly misleading and it is actually a credential problem.
According to the Google Cloud docs I applied the following:
resource "google_project_iam_binding" "cloudbuild" {
project = "bar"
role = "roles/editor"
members = [
"serviceAccount:[email protected]"
]
}
The error still persists, though. Any idea what might be the problem/solution here?