Open SarahFrench opened 5 months ago
Here's another data point about where APIs need to be enabled: https://github.com/hashicorp/terraform-provider-google/issues/11255#issuecomment-2188681866
Another example: https://github.com/hashicorp/terraform-provider-google/issues/18281
Community Note
Description
There are various factors that affect if a user encounters a permissions error/service not enabled error:
This problem also surfaces when users create a new project and try to enable APIs in the new service. Depending on their setup that API will need to be enabled in the project that the service account they are using as Terraform's identity is provisioned in. This is confusing and results in erroneous bug reports.
This is also a reason why enabling the service usage API in projects by default (https://github.com/hashicorp/terraform-provider-google/issues/14174) is a feature request that's unlikely to be implemented soon; users would need to set user_project_override correctly to avoid tainting the provisioned project resource if API call to activate the service usage API failing due to lack of permissions.
We should write up some provider documentation that covers all the different scenarios possible with these settings, including scenarios like:
There is an existing guide here about use of
google_project_service
that might need updating/extending: https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/google_project_serviceThe guide would need to cover concepts like:
New or Affected Resource(s)
Potential Terraform Configuration
N/A
References
b/343221059