forked from aztfmod/terraform-azurerm-caf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata_factory.tf
139 lines (116 loc) · 5.82 KB
/
data_factory.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
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
133
134
135
136
137
138
139
##### azurerm_data_factory
module "data_factory" {
source = "./modules/data_factory/data_factory"
for_each = local.data_factory.data_factory
global_settings = local.global_settings
client_config = local.client_config
settings = each.value
base_tags = try(local.global_settings.inherit_tags, false) ? local.resource_groups[each.value.resource_group.key].tags : {}
resource_groups = local.combined_objects_resource_groups
remote_objects = {
managed_identities = local.combined_objects_managed_identities
private_dns = local.combined_objects_private_dns
vnets = local.combined_objects_networking
private_endpoints = try(each.value.private_endpoints, {})
resource_groups = try(each.value.private_endpoints, {}) == {} ? null : local.resource_groups
}
}
output "data_factory" {
value = module.data_factory
}
##### azurerm_data_factory_pipeline
module "data_factory_pipeline" {
source = "./modules/data_factory/data_factory_pipeline"
for_each = local.data_factory.data_factory_pipeline
global_settings = local.global_settings
client_config = local.client_config
settings = each.value
resource_group_name = coalesce(
try(local.combined_objects_resource_groups[each.value.resource_group.lz_key][each.value.resource_group.key].name, null),
try(local.combined_objects_resource_groups[local.client_config.landingzone_key][each.value.resource_group.key].name, null),
try(each.value.resource_group.name, null)
)
data_factory_name = coalesce(
try(local.combined_objects_data_factory[each.value.data_factory.lz_key][each.value.data_factory.key].name, null),
try(local.combined_objects_data_factory[local.client_config.landingzone_key][each.value.data_factory.key].name, null),
try(each.value.data_factory.name, null)
)
}
output "data_factory_pipeline" {
value = module.data_factory_pipeline
}
##### azurerm_data_factory_trigger_schedule
module "data_factory_trigger_schedule" {
source = "./modules/data_factory/data_factory_trigger_schedule"
for_each = local.data_factory.data_factory_trigger_schedule
global_settings = local.global_settings
client_config = local.client_config
settings = each.value
resource_group_name = coalesce(
try(local.combined_objects_resource_groups[try(each.value.resource_group.lz_key, local.client_config.landingzone_key)][each.value.resource_group.key].name, null),
try(each.value.resource_group.name, null)
)
data_factory_name = coalesce(
try(local.combined_objects_data_factory[try(each.value.data_factory.lz_key, local.client_config.landingzone_key)][each.value.data_factory.key].name, null),
try(each.value.data_factory.name, null)
)
pipeline_name = coalesce(
try(local.combined_objects_data_factory_pipeline[try(each.value.data_factory_pipeline.lz_key, local.client_config.landingzone_key)][each.value.data_factory_pipeline.key].name, null),
try(each.value.data_factory_pipeline.name, null)
)
}
output "data_factory_trigger_schedule" {
value = module.data_factory_trigger_schedule
}
module "data_factory_integration_runtime_self_hosted" {
source = "./modules/data_factory/data_factory_integration_runtime_self_hosted"
for_each = local.data_factory.data_factory_integration_runtime_self_hosted
global_settings = local.global_settings
client_config = local.client_config
settings = each.value
data_factory_name = coalesce(
try(local.combined_objects_data_factory[try(each.value.data_factory.lz_key, local.client_config.landingzone_key)][each.value.data_factory.key].name, null),
try(each.value.data_factory.name, null)
)
resource_group_name = coalesce(
try(local.combined_objects_resource_groups[try(each.value.resource_group.lz_key, local.client_config.landingzone_key)][each.value.resource_group.key].name, null),
try(each.value.resource_group.name, null)
)
remote_objects = {
data_factory = local.combined_objects_data_factory
resource_group = local.combined_objects_resource_groups
}
}
output "data_factory_integration_runtime_self_hosted" {
value = module.data_factory_integration_runtime_self_hosted
}
module "data_factory_integration_runtime_azure_ssis" {
source = "./modules/data_factory/data_factory_integration_runtime_azure_ssis"
for_each = local.data_factory.data_factory_integration_runtime_azure_ssis
global_settings = local.global_settings
client_config = local.client_config
settings = each.value
data_factory_name = coalesce(
try(local.combined_objects_data_factory[each.value.data_factory.lz_key][each.value.data_factory.key].name, null),
try(local.combined_objects_data_factory[local.client_config.landingzone_key][each.value.data_factory.key].name, null),
try(each.value.data_factory.name, null)
)
resource_group_name = coalesce(
try(local.combined_objects_resource_groups[local.client_config.landingzone_key][each.value.resource_group.key].name, null),
try(local.combined_objects_resource_groups[each.value.resource_group.lz_key][each.value.resource_group.key].name, null),
try(each.value.resource_group.name, null)
)
location = lookup(each.value, "region", null) == null ? coalesce(
try(local.combined_objects_resource_groups[local.client_config.landingzone_key][each.value.resource_group.key].name, null),
try(local.combined_objects_resource_groups[each.value.resource_group.lz_key][each.value.resource_group.key].name, null),
try(each.value.resource_group.name, null)
) : local.global_settings.regions[each.value.region]
remote_objects = {
resource_groups = local.combined_objects_resource_groups
keyvaults = local.combined_objects_keyvaults
dynamic_keyvault_secrets = local.security.dynamic_keyvault_secrets
}
}
output "data_factory_integration_runtime_azure_ssis" {
value = module.data_factory_integration_runtime_azure_ssis
}