Skip to content

iam resources for google_iam_workforce_pool are missing #22589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wvanderdeijl opened this issue May 2, 2025 · 2 comments · May be fixed by GoogleCloudPlatform/magic-modules#13861
Open

iam resources for google_iam_workforce_pool are missing #22589

wvanderdeijl opened this issue May 2, 2025 · 2 comments · May be fixed by GoogleCloudPlatform/magic-modules#13861

Comments

@wvanderdeijl
Copy link

wvanderdeijl commented May 2, 2025

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Description

The Terraform resources to manage iam member, binding and policy are missing for IAM Workforce Pools, while the GCP API and gcloud CLI do support these.

New or Affected Resource(s)

  • google_iam_workforce_pool
  • google_iam_workforce_pool_policy
  • google_iam_workforce_pool_binding
  • google_iam_workforce_pool_member

Potential Terraform Configuration

resource "google_iam_workforce_pool" "example" {
  workforce_pool_id = "example-pool"
  parent            = "organizations/123456789"
  location          = "global"
}

resource "google_iam_workforce_pool_iam_member" "pool_viewer_member" {
  location          = google_iam_workforce_pool.example.location
  workforce_pool_id = google_iam_workforce_pool.example.workforce_pool_id
  role              = "roles/iam.workforcePoolViewer"
  member            = "user:jane@example.com"
}

resource "google_iam_workforce_pool_iam_binding" "pool_admin_binding" {
  location          = google_iam_workforce_pool.example.location
  workforce_pool_id = google_iam_workforce_pool.example.workforce_pool_id
  role              = "roles/iam.workforcePoolAdmin"
  members = [
    "user:jane@example.com",
  ]
}

data "google_iam_policy" "pool_authoritative_policy" {
  binding {
    role = "roles/iam.workforcePoolViewer"
    members = [
      "user:jane@example.com",
    ]
  }
}

resource "google_iam_workforce_pool_iam_policy" "pool_policy" {
  location          = google_iam_workforce_pool.example.location
  workforce_pool_id = google_iam_workforce_pool.example.workforce_pool_id
  policy_data       = data.google_iam_policy.pool_authoritative_policy.policy_data
}

References

See https://cloud.google.com/iam/docs/reference/rest/v1/locations.workforcePools for the API that supports setIamPolicy and getIamPolicy.

b/415910908

@github-actions github-actions bot added forward/review In review; remove label to forward service/iam-workforce labels May 2, 2025
@melinath melinath added size/s and removed forward/review In review; remove label to forward labels May 5, 2025
@melinath melinath added this to the Goals milestone May 5, 2025
@ramonvermeulen
Copy link

Would like to pick up this issue, will open a draft PR (probably) somewhere later this week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants