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.36k stars 1.75k forks source link

Add IAM resources google_identity_platform_tenant_iam_* to manage access to resources on a tenant level #18809

Open MaStFAU opened 4 months ago

MaStFAU commented 4 months ago

Community Note

Description

When working with multiple tenants, it is not a secure setup to give service accounts access to all tenants. According to the docs, it is possible to manage access control per tenant via the console: https://cloud.google.com/identity-platform/docs/multi-tenancy-access-control

However, so far there is no resource google_identity_platform_tenant_iam_member to manage access on a resource level.

New or Affected Resource(s)

Potential Terraform Configuration

resource "google_identity_platform_tenant_iam_member" "default" {
  project = "my-gcp-project"
  tenant_id = "tenant-kg7dk"
  member    = "serviceAccount:customer-instance-service-account@my-gcp-project.iam.gserviceaccount.com"
  role      = "roles/firebase.sdkAdminServiceAgent"
}

References

https://cloud.google.com/identity-platform/docs/multi-tenancy-access-control

b/356160000

MaStFAU commented 2 months ago

Just saw this is a duplicate of #8684

Any chance this will be implemented soon? It is quite important from a security perspective.