-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutputs.tf
More file actions
132 lines (105 loc) · 5.13 KB
/
outputs.tf
File metadata and controls
132 lines (105 loc) · 5.13 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#############################################
# Project Outputs
#############################################
output "project_ids" {
description = "Map of project key to dbt Cloud project ID"
value = module.project.project_ids
}
#############################################
# Repository Outputs
#############################################
output "repository_ids" {
description = "Map of project key to repository ID"
value = module.repository.repository_ids
}
#############################################
# Environment Outputs
#############################################
output "environment_ids" {
description = "Map of composite key (project_key_env_key) to dbt Cloud environment ID"
value = module.environments.environment_ids
}
#############################################
# Credential Outputs
#############################################
output "credential_ids" {
description = "Map of composite key (project_key_env_key or project_key_profile_key) to credential ID"
value = module.credentials.credential_ids
}
#############################################
# Job Outputs
#############################################
output "job_ids" {
description = "Map of composite key (project_key_job_key) to dbt Cloud job ID"
value = module.jobs.job_ids
}
#############################################
# Account-Level Outputs
#############################################
output "connection_ids" {
description = "Map of global connection key (and LOOKUP:… placeholders) to dbt Cloud connection ID — merged managed global_connections + data_lookups"
value = local.global_connection_ids_effective
}
output "lookup_connection_ids" {
description = "Subset of connection_ids from LOOKUP:… resolution only (empty if module.data_lookups not used)"
value = length(module.data_lookups) > 0 ? module.data_lookups[0].lookup_connection_ids : {}
}
output "github_installation_by_owner" {
description = "GitHub App installation id by org/user login (from dbt integrations API when dbt_pat is set)"
value = length(module.data_lookups) > 0 ? module.data_lookups[0].github_installation_by_owner : {}
}
output "github_installation_fallback_id" {
description = "First GitHub installation id when owner-based match is not used"
value = length(module.data_lookups) > 0 ? module.data_lookups[0].github_installation_fallback_id : null
}
output "service_token_ids" {
description = "Map of service token key to dbt Cloud service token ID"
value = length(try(local.yaml_content.service_tokens, [])) > 0 ? module.service_tokens[0].service_token_ids : {}
}
output "group_ids" {
description = "Map of group key to dbt Cloud group ID"
value = length(try(local.yaml_content.groups, [])) > 0 ? module.groups[0].group_ids : {}
}
output "notification_ids" {
description = "Map of notification key to dbt Cloud notification ID"
value = length(try(local.yaml_content.notifications, [])) > 0 ? module.notifications[0].notification_ids : {}
}
output "oauth_configuration_ids" {
description = "Map of OAuth configuration key to dbt Cloud OAuth configuration ID"
value = length(try(local.yaml_content.oauth_configurations, [])) > 0 ? module.oauth_configurations[0].oauth_configuration_ids : {}
}
output "ip_rule_ids" {
description = "Map of IP rule key to dbt Cloud IP restriction rule ID"
value = length(try(local.yaml_content.ip_restrictions, [])) > 0 ? module.ip_restrictions[0].ip_rule_ids : {}
}
#############################################
# Project-Scoped Outputs
#############################################
output "extended_attribute_ids" {
description = "Map of composite key (project_key_ea_key) to dbt Cloud extended_attributes_id (numeric API id)"
value = length(flatten([for p in local.projects : try(p.extended_attributes, [])])) > 0 ? module.extended_attributes[0].extended_attribute_ids : {}
}
output "profile_ids" {
description = "Map of composite key (project_key_profile_key) to dbt Cloud profile_id (numeric API id)"
value = length(flatten([for p in local.projects : try(p.profiles, [])])) > 0 ? module.profiles[0].profile_ids : {}
}
output "lineage_integration_ids" {
description = "Map of composite key (project_key_integration_key) to lineage integration ID"
value = length(flatten([for p in local.projects : try(p.lineage_integrations, [])])) > 0 ? module.lineage_integrations[0].lineage_integration_ids : {}
}
output "semantic_layer_ids" {
description = "Map of project key to dbt Cloud semantic layer configuration ID"
value = length(module.semantic_layer) > 0 ? module.semantic_layer[0].semantic_layer_ids : {}
}
output "project_artefact_ids" {
description = "Map of project key to dbt Cloud project_artefacts resource ID"
value = length(module.project_artefacts) > 0 ? module.project_artefacts[0].project_artefact_ids : {}
}
output "yaml_schema_version" {
description = "YAML version key from the config file (must be 1; see schemas/v1.json)"
value = try(local._raw_yaml.version, null)
}
output "yaml_account" {
description = "The YAML account block (name, host_url, id)"
value = try(local._raw_yaml.account, null)
}