This optional module is used to assign pubsub_subscription roles
module "pubsub_subscription-iam-bindings" {
source = "terraform-google-modules/iam/google//modules/pubsub_subscriptions_iam"
version = "~> 8.0"
project = "my-pubsub_subscription_project"
pubsub_subscriptions = ["my-pubsub_subscription_one", "my-pubsub_subscription_two"]
mode = "additive"
bindings = {
"roles/pubsub.viewer" = [
"serviceAccount:my-sa@my-project.iam.gserviceaccount.com",
"group:my-group@my-org.com",
"user:my-user@my-org.com",
]
"roles/pubsub.editor" = [
"serviceAccount:my-sa@my-project.iam.gserviceaccount.com",
"group:my-group@my-org.com",
"user:my-user@my-org.com",
]
}
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
bindings | Map of role (key) and list of members (value) to add the IAM policies/bindings | map(list(string)) |
n/a | yes |
mode | Mode for adding the IAM policies/bindings, additive and authoritative | string |
"additive" |
no |
project | Project to add the IAM policies/bindings | string |
"" |
no |
pubsub_subscriptions | PubSub Subscriptions list to add the IAM policies/bindings | list(string) |
[] |
no |
Name | Description |
---|---|
members | Members which were bound to the PubSub Subscription. |
pubsub_subscriptions | PubSub Subscriptions which received bindings. |
roles | Roles which were assigned to members. |