-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
31 lines (24 loc) · 1.44 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
# ----------------------------------------------------------------------------------------------------------------------
# OUTPUT CALCULATED VARIABLES (prefer full objects)
# ----------------------------------------------------------------------------------------------------------------------
# ----------------------------------------------------------------------------------------------------------------------
# OUTPUT ALL RESOURCES AS FULL OBJECTS
# ----------------------------------------------------------------------------------------------------------------------
locals {
binding = one(google_pubsub_topic_iam_binding.binding)
member = google_pubsub_topic_iam_member.member
policy = one(google_pubsub_topic_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]
}
# ----------------------------------------------------------------------------------------------------------------------
# OUTPUT MODULE CONFIGURATION
# ----------------------------------------------------------------------------------------------------------------------
output "module_enabled" {
description = "Whether the module is enabled."
value = var.module_enabled
}