-
Notifications
You must be signed in to change notification settings - Fork 1
/
outputs.tf
22 lines (17 loc) · 1.09 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
locals {
binding = one(google_pubsub_subscription_iam_binding.binding)
member = google_pubsub_subscription_iam_member.member
policy = one(google_pubsub_subscription_iam_policy.policy)
iam_output = [local.binding, local.member, local.policy]
iam_output_index = var.policy_bindings != null ? 2 : var.authoritative ? 0 : 1
}
# ----------------------------------------------------------------------------------------------------------------------
# OUTPUT CALCULATED VARIABLES (prefer full objects)
# ----------------------------------------------------------------------------------------------------------------------
# ----------------------------------------------------------------------------------------------------------------------
# OUTPUT ALL RESOURCES AS FULL OBJECTS
# ----------------------------------------------------------------------------------------------------------------------
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]
}