-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathoutputs.tf
22 lines (17 loc) · 918 Bytes
/
outputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# ------------------------------------------------------------------------------
# OUTPUT CALCULATED VARIABLES (prefer full objects)
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# OUTPUT ALL RESOURCES AS FULL OBJECTS
# ------------------------------------------------------------------------------
locals {
binding = one(google_project_iam_binding.binding)
member = google_project_iam_member.member
policy = one(google_project_iam_policy.policy)
iam_output = [local.binding, local.member, local.policy]
iam_output_index = var.policy_bindings != null ? 2 : var.authoritative ? 0 : 1
}
output "iam" {
description = "All attributes of the created 'iam_binding' or 'iam_member' or 'iam_policy' resource according to the mode."
value = local.iam_output[local.iam_output_index]
}