-
Notifications
You must be signed in to change notification settings - Fork 4
/
outputs.tf
34 lines (27 loc) · 1.41 KB
/
outputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# ------------------------------------------------------------------------------
# OUTPUT CALCULATED VARIABLES (prefer full objects)
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# OUTPUT ALL RESOURCES AS FULL OBJECTS
# ------------------------------------------------------------------------------
locals {
binding = try(google_folder_iam_binding.folder[0], null)
member = try(google_folder_iam_member.folder, null)
policy = try(google_folder_iam_policy.policy[0], null)
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]
}
# ------------------------------------------------------------------------------
# OUTPUT ALL INPUT VARIABLES
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# OUTPUT MODULE CONFIGURATION
# ------------------------------------------------------------------------------
output "module_enabled" {
description = "Whether the module is enabled."
value = var.module_enabled
}