cloud-foundation-fabric/modules/cloud-identity-group
Ludovico Magnocavallo 6941313c7d
Factories refactor (#1843)
* factories refactor doc

* Adds file schema and filesystem organization

* Update 20231106-factories.md

* move factories out of blueprints and create new factories  README

* align factory in billing-account module

* align factory in dataplex-datascan module

* align factory in billing-account module

* align factory in net-firewall-policy module

* align factory in dns-response-policy module

* align factory in net-vpc-firewall module

* align factory in net-vpc module

* align factory variable names in FAST

* remove decentralized firewall blueprint

* bump terraform version

* bump module versions

* update top-level READMEs

* move project factory to modules

* fix variable names and tests

* tfdoc

* remove changelog link

* add project factory to top-level README

* fix cludrun eventarc diff

* fix README

* fix cludrun eventarc diff

---------

Co-authored-by: Simone Ruffilli <sruffilli@google.com>
2024-02-26 10:16:52 +00:00
..
README.md Ensure all modules have an `id` output (#1410) 2023-06-02 16:07:22 +02:00
main.tf Add missing description field 2022-10-21 15:38:07 +01:00
outputs.tf Ensure all modules have an `id` output (#1410) 2023-06-02 16:07:22 +02:00
variables.tf First commit 2022-08-31 11:14:18 +02:00
versions.tf Factories refactor (#1843) 2024-02-26 10:16:52 +00: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 4.34 of the GCP Terraform provider one operation is not working:

  • removing a group that has at least one OWNER managed by terraform (bug)

Until that bug is fixed, this module will only support the creation of MEMBER and MANAGER memberships.

Examples

Simple Group

module "group" {
  source       = "./fabric/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 inventory=members.yaml

Group with managers

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

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
managers List of group managers. list(string) []
members List of group members. list(string) []

Outputs

name description sensitive
id Fully qualified group id.
name Group name.