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.33k stars 1.73k forks source link

Apigee Deployment IAM Resource for specific API Authentication #20053

Open entertvl opened 14 hours ago

entertvl commented 14 hours ago

Community Note

Description

Cloud IAM-based authorization with the VerifyIAM policy was released in Sept 2024 and requires granting Deployment IAM roles for specific API access.

Guide: https://cloud.google.com/apigee/docs/api-platform/security/iam/iam-overview

Deployment resource is not currently supported, but supporting only the IAM resource would be sufficient.

New or Affected Resource(s)

Potential Terraform Configuration

resource "google_apigee_deployment_iam_binding" "binding" {
  org_id     = google_apigee_environment.apigee_environment.org_id
  env_id     = google_apigee_environment.apigee_environment.name
  deployment = "api"
  role       = "roles/apigee.deploymentInvoker"
  members = [
    "user:jane@example.com",
  ]
}

References

b/376066543

melinath commented 3 hours ago

This could be done similar to https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/products/iap/Web.yaml - https://googlecloudplatform.github.io/magic-modules/develop/resource/#add-iam-support has more details as well.