Skip to content
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

IAM membership conditions #361

Open
mruoss opened this issue Oct 23, 2024 · 0 comments
Open

IAM membership conditions #361

mruoss opened this issue Oct 23, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mruoss
Copy link

mruoss commented Oct 23, 2024

TL;DR

The resource google_storage_bucket_iam_member supports conditions. However, these are not exposed in this module at the moment.

Terraform Resources

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket_iam

Detailed design

resource "google_storage_bucket_iam_member" "members" {
  for_each = {
    for m in var.iam_members : "${m.role} ${m.member}" => m
  }
  bucket = google_storage_bucket.bucket.name
  role   = each.value.role
  member = each.value.member

  dynamic "condition" {
      for_each = each.value.condition
      title       = condition.value.title
      description = condition.value.description
      expression  = condition.value.expression
  }
}

Additional information

No response

@mruoss mruoss added the enhancement New feature or request label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant