hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.3k stars 1.73k forks source link

document IAM permissions / roles are needed to create/destroy the terraform resource #15037

Open duxbuse opened 1 year ago

duxbuse commented 1 year ago

Community Note

Description

When trying to create a new resource, with an account with no privileges its often hard to understand what IAM roles are needed to create and destroy the resource. Many times the error message is simply 403 permission denied which doesn't help narrow the issue.

It would be really great if the terraform docs had a small section outlining for each resource what perms are needed to interact with it.

rileykarson commented 1 year ago

I don't think the permissions required for an endpoint are documented by GCP proper, much less accessible in an automated system as would be required to scale this up across the entire surface. Also note that the permissions required for a call are sometimes dynamic (i.e. when accessing a crypto key)

BBBmau commented 3 months ago

from triage: We are scoping this ticket to just adding the ability to link API Permissions and roles documentation.

Adding the links will be a separate effort.

Ameausoone commented 3 months ago

For the note:

Hashicorp added a feature in the terraform framework, to be able to test iam privilege during tf plan, it would very practical to add this feature in the Google terraform provider.

related with: