Skip to content

Latest commit

 

History

History
 
 

pubsub_topics_iam

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Module pubsub_topic IAM

This optional module is used to assign pubsub_topic roles

Example Usage

module "pubsub_topic-iam-bindings" {
  source        = "terraform-google-modules/iam/google//modules/pubsub_topics_iam"
  project       = "my-pubsub_topic_project"
  pubsub_topics = ["my-pubsub_topic_one", "my-pubsub_topic_two"]
  mode          = "authoritative"

  bindings = {
    "roles/pubsub.publisher" = [
      "serviceAccount:my-sa@my-project.iam.gserviceaccount.com",
      "group:my-group@my-org.com",
      "user:my-user@my-org.com",
    ]
    "roles/pubsub.viewer" = [
      "serviceAccount:my-sa@my-project.iam.gserviceaccount.com",
      "group:my-group@my-org.com",
      "user:my-user@my-org.com",
    ]
  }
}

Inputs

Name Description Type Default Required
bindings Map of role (key) and list of members (value) to add the IAM policies/bindings map(any) 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_topics PubSub Topics list to add the IAM policies/bindings list(string) [] no

Outputs

Name Description
members Members which were bound to the PubSub Topics.
pubsub_topics PubSub Topics which received for bindings.
roles Roles which were assigned to members.