cloud-foundation-fabric/modules/cloud-identity-group
Simone Ruffilli abb6b50a46
Add periods at the end of each description field where missing (#478)
2022-01-31 10:45:34 +01:00
..
README.md Add periods at the end of each description field where missing (#478) 2022-01-31 10:45:34 +01:00
main.tf Copyright bump (#410) 2022-01-01 15:52:31 +01:00
outputs.tf Copyright bump (#410) 2022-01-01 15:52:31 +01:00
variables.tf Add periods at the end of each description field where missing (#478) 2022-01-31 10:45:34 +01:00
versions.tf Copyright bump (#410) 2022-01-01 15:52:31 +01:00

README.md

Cloud Identity Group Module

This module allows creating a Cloud Identity group and assigning members.

Usage

To use this module you must either run terraform as a user that has the Groups Admin role in Cloud Identity or enable domain-wide delegation to the service account used by terraform. If you use a service account, you must also grant that service account the Groups Admin role in Cloud Identity.

Please note that the underlying terraform resources only allow the creation of groups with members that are part of the organization. If you want to create memberships for identities outside your own organization, you have to manually allow members outside your organization in the Cloud Identity admin console.

As of version 3.50 of the GCP Terraform provider two operations are not working:

  • removing a group that has at least one OWNER managed by terraform (bug)
  • removing a role from an existing membership (bug)

Until those two bugs are fixed, this module will only support the creation of MEMBER memberships.

Examples

Simple Group

module "group" {
  source       = "./modules/cloud-identity-group"
  customer_id  = "customers/C01234567"
  name         = "mygroup@example.com"
  display_name = "My group name"
  description  = "My group Description"
  members = [
    "user1@example.com",
    "user2@example.com",
    "service-account@my-gcp-project.iam.gserviceaccount.com"
  ]
}
# tftest modules=1 resources=4

Variables

name description type required default
customer_id Directory customer ID in the form customers/C0xxxxxxx. string
display_name Group display name. string
name Group ID (usually an email). string
description Group description. string null
members List of group members. list(string) []

Outputs

name description sensitive
id Group ID.
name Group name.