-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathm-functions.tf
234 lines (193 loc) · 11.7 KB
/
m-functions.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
moved {
from = module.linux_function["enabled"]
to = module.linux_function[0]
}
module "linux_function" {
count = lower(var.os_type) == "linux" ? 1 : 0
source = "./modules/linux-function"
client_name = var.client_name
environment = var.environment
stack = var.stack
resource_group_name = var.resource_group_name
location = var.location
location_short = var.location_short
name_prefix = var.name_prefix
name_suffix = var.name_suffix
diagnostic_settings_custom_name = var.diagnostic_settings_custom_name
storage_uses_managed_identity = var.storage_uses_managed_identity
storage_account_name_prefix = var.storage_account_name_prefix
storage_account_custom_name = var.storage_account_custom_name
use_existing_storage_account = var.use_existing_storage_account
storage_account_id = var.storage_account_id
storage_account_advanced_threat_protection_enabled = var.storage_account_advanced_threat_protection_enabled
storage_account_https_traffic_only_enabled = var.storage_account_https_traffic_only_enabled
storage_account_kind = var.storage_account_kind
storage_account_min_tls_version = var.storage_account_min_tls_version
storage_account_identity_type = var.storage_account_identity_type
storage_account_identity_ids = var.storage_account_identity_ids
rbac_storage_contributor_role_principal_ids = var.rbac_storage_contributor_role_principal_ids
rbac_storage_blob_role_principal_ids = var.rbac_storage_blob_role_principal_ids
rbac_storage_file_role_principal_ids = var.rbac_storage_file_role_principal_ids
rbac_storage_table_role_principal_ids = var.rbac_storage_table_role_principal_ids
rbac_storage_queue_contributor_role_principal_ids = var.rbac_storage_queue_contributor_role_principal_ids
service_plan_id = module.service_plan.id
function_app_name_prefix = var.function_app_name_prefix
custom_name = var.function_app_custom_name
application_settings = var.application_settings
application_settings_drift_ignore = var.application_settings_drift_ignore
function_app_version = var.function_app_version
site_config = var.site_config
auth_settings_v2 = var.auth_settings_v2
sticky_settings = var.sticky_settings
application_insights_name_prefix = var.application_insights_name_prefix
application_insights_enabled = var.application_insights_enabled
application_insights_id = var.application_insights_id
application_insights_type = var.application_insights_type
application_insights_custom_name = var.application_insights_custom_name
application_insights_daily_data_cap = var.application_insights_daily_data_cap
application_insights_daily_data_cap_notifications_disabled = var.application_insights_daily_data_cap_notifications_disabled
application_insights_sampling_percentage = var.application_insights_sampling_percentage
application_insights_retention = var.application_insights_retention
application_insights_internet_ingestion_enabled = var.application_insights_internet_ingestion_enabled
application_insights_internet_query_enabled = var.application_insights_internet_query_enabled
application_insights_ip_masking_disabled = var.application_insights_ip_masking_disabled
application_insights_local_authentication_disabled = var.application_insights_local_authentication_disabled
application_insights_force_customer_storage_for_profiler = var.application_insights_force_customer_storage_for_profiler
application_insights_log_analytics_workspace_id = var.application_insights_log_analytics_workspace_id
identity_type = var.identity_type
identity_ids = var.identity_ids
allowed_ips = var.allowed_ips
allowed_service_tags = var.allowed_service_tags
allowed_subnet_ids = var.allowed_subnet_ids
ip_restriction_headers = var.ip_restriction_headers
vnet_integration_subnet_id = var.vnet_integration_subnet_id
storage_account_network_rules_enabled = var.storage_account_network_rules_enabled
storage_account_network_bypass = var.storage_account_network_bypass
storage_account_allowed_ips = var.storage_account_allowed_ips
scm_allowed_ips = var.scm_allowed_ips
scm_allowed_subnet_ids = var.scm_allowed_subnet_ids
scm_allowed_service_tags = var.scm_allowed_service_tags
scm_ip_restriction_headers = var.scm_ip_restriction_headers
logs_destinations_ids = var.logs_destinations_ids
logs_categories = var.logs_categories
logs_metrics_categories = var.logs_metrics_categories
https_only = var.https_only
builtin_logging_enabled = var.builtin_logging_enabled
client_certificate_enabled = var.client_certificate_enabled
client_certificate_mode = var.client_certificate_mode
application_zip_package_path = var.application_zip_package_path
staging_slot_enabled = var.staging_slot_enabled
staging_slot_custom_name = var.staging_slot_custom_name
staging_slot_custom_application_settings = var.staging_slot_custom_application_settings
default_tags_enabled = var.default_tags_enabled
extra_tags = merge(var.extra_tags, local.default_tags)
application_insights_extra_tags = merge(
var.extra_tags,
var.application_insights_extra_tags,
local.default_tags,
)
storage_account_extra_tags = merge(
var.extra_tags,
var.storage_account_extra_tags,
local.default_tags,
)
function_app_extra_tags = merge(
var.extra_tags,
var.function_app_extra_tags,
local.default_tags,
)
}
moved {
from = module.windows_function["enabled"]
to = module.windows_function[0]
}
module "windows_function" {
count = lower(var.os_type) == "windows" ? 1 : 0
source = "./modules/windows-function"
client_name = var.client_name
environment = var.environment
stack = var.stack
resource_group_name = var.resource_group_name
location = var.location
location_short = var.location_short
name_prefix = var.name_prefix
name_suffix = var.name_suffix
diagnostic_settings_custom_name = var.diagnostic_settings_custom_name
storage_uses_managed_identity = var.storage_uses_managed_identity
storage_account_name_prefix = var.storage_account_name_prefix
storage_account_custom_name = var.storage_account_custom_name
use_existing_storage_account = var.use_existing_storage_account
storage_account_id = var.storage_account_id
storage_account_advanced_threat_protection_enabled = var.storage_account_advanced_threat_protection_enabled
storage_account_https_traffic_only_enabled = var.storage_account_https_traffic_only_enabled
storage_account_kind = var.storage_account_kind
storage_account_min_tls_version = var.storage_account_min_tls_version
storage_account_identity_type = var.storage_account_identity_type
storage_account_identity_ids = var.storage_account_identity_ids
service_plan_id = module.service_plan.id
function_app_name_prefix = var.function_app_name_prefix
custom_name = var.function_app_custom_name
application_settings = var.application_settings
application_settings_drift_ignore = var.application_settings_drift_ignore
function_app_version = var.function_app_version
site_config = var.site_config
auth_settings_v2 = var.auth_settings_v2
sticky_settings = var.sticky_settings
application_insights_name_prefix = var.application_insights_name_prefix
application_insights_enabled = var.application_insights_enabled
application_insights_id = var.application_insights_id
application_insights_type = var.application_insights_type
application_insights_custom_name = var.application_insights_custom_name
application_insights_daily_data_cap = var.application_insights_daily_data_cap
application_insights_daily_data_cap_notifications_disabled = var.application_insights_daily_data_cap_notifications_disabled
application_insights_sampling_percentage = var.application_insights_sampling_percentage
application_insights_retention = var.application_insights_retention
application_insights_internet_ingestion_enabled = var.application_insights_internet_ingestion_enabled
application_insights_internet_query_enabled = var.application_insights_internet_query_enabled
application_insights_ip_masking_disabled = var.application_insights_ip_masking_disabled
application_insights_local_authentication_disabled = var.application_insights_local_authentication_disabled
application_insights_force_customer_storage_for_profiler = var.application_insights_force_customer_storage_for_profiler
application_insights_log_analytics_workspace_id = var.application_insights_log_analytics_workspace_id
identity_type = var.identity_type
identity_ids = var.identity_ids
allowed_ips = var.allowed_ips
allowed_service_tags = var.allowed_service_tags
allowed_subnet_ids = var.allowed_subnet_ids
ip_restriction_headers = var.ip_restriction_headers
vnet_integration_subnet_id = var.vnet_integration_subnet_id
storage_account_network_rules_enabled = var.storage_account_network_rules_enabled
storage_account_network_bypass = var.storage_account_network_bypass
storage_account_allowed_ips = var.storage_account_allowed_ips
scm_allowed_ips = var.scm_allowed_ips
scm_allowed_subnet_ids = var.scm_allowed_subnet_ids
scm_allowed_service_tags = var.scm_allowed_service_tags
scm_ip_restriction_headers = var.scm_ip_restriction_headers
logs_destinations_ids = var.logs_destinations_ids
logs_categories = var.logs_categories
logs_metrics_categories = var.logs_metrics_categories
https_only = var.https_only
builtin_logging_enabled = var.builtin_logging_enabled
client_certificate_enabled = var.client_certificate_enabled
client_certificate_mode = var.client_certificate_mode
application_zip_package_path = var.application_zip_package_path
staging_slot_enabled = var.staging_slot_enabled
staging_slot_custom_name = var.staging_slot_custom_name
staging_slot_custom_application_settings = var.staging_slot_custom_application_settings
default_tags_enabled = var.default_tags_enabled
extra_tags = merge(var.extra_tags, local.default_tags)
application_insights_extra_tags = merge(
var.extra_tags,
var.application_insights_extra_tags,
local.default_tags,
)
storage_account_extra_tags = merge(
var.extra_tags,
var.storage_account_extra_tags,
local.default_tags,
)
function_app_extra_tags = merge(
var.extra_tags,
var.function_app_extra_tags,
local.default_tags,
)
}