Skip to content

Commit

Permalink
put fix back
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon So committed Mar 20, 2019
1 parent 195a70e commit a85fef1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/gsuite_group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
*/

locals {
domain = "${var.domain != "" ? var.domain : data.google_organization.org.domain}"
email = "${format("%s@%s", var.name, local.domain)}"
domain_list = "${concat(data.google_organization.org.*.domain, list("dummy"))}"
domain = "${var.domain == "" ? element(local.domain_list, 0) : var.domain}"
email = "${format("%s@%s", var.name, local.domain)}"
}

/*****************************************
Organization info retrieval
*****************************************/
data "google_organization" "org" {
count = "${var.domain == "" ? 1 : 0}"
organization = "${var.org_id}"
}

0 comments on commit a85fef1

Please sign in to comment.