I'm having issues giving necessary GCP roles for Terraform, with many Error 403: The caller does not have permission
.
The way I'm doing it is by adding gradually permissions, but it's more a trial and error approach, and I end up over adding authorizations.
Is there a way to give a full admin role to Terraform on GCP, as we can do on AWS? Or maybe I'm missing something, but I can't find docs on that topic online.
Thanks.
--
Update:
The resource I want to create is a domain mapping for Cloud Run. This is done with:
resource "google_cloud_run_domain_mapping" "default" {
location = "europe-west1"
name = "mydomain.com"
metadata {
namespace = "default"
}
spec {
route_name = google_cloud_run_service.default.name
}
}
P.S.: The domain was varified with Google Webmaster page.
But the returned issue on terraform apply
is:
Error creating DomainMapping: googleapi: Error 403: The caller does not have permission
To solve this particular issue, I need to find which authorization I need to add to my Terraform role, but it's just a matter of time before getting into the same issue again when requiring a new GCP service.
Also, I'm perfectly able to add mapping using the GCP console, which shows I was able to pass all the required verification steps.
Isn't it better to make Terraform admin on all GCP resources and let it create all necessary resources?
google_cloud_run_domain_mapping
I go with trial and errors picking random authorizations! This is not smart :( – htaidirt