-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
588 lines (493 loc) · 22.9 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
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
### Storage Account
output "storage_account_nonsensitive" {
description = "Nonsensitive outputs of the Storage Account object."
value = {
storage_account_access_tier = azurerm_storage_account.this.access_tier
storage_account_id = azurerm_storage_account.this.id
storage_account_name = azurerm_storage_account.this.name
storage_account_kind = azurerm_storage_account.this.account_kind
storage_account_tier = azurerm_storage_account.this.account_tier
storage_account_replication_type = azurerm_storage_account.this.account_replication_type
primary_location = azurerm_storage_account.this.primary_location
secondary_location = try(azurerm_storage_account.this.secondary_location, null)
management_locks = try(azurerm_management_lock.this[*].id, null)
storage_blob_inventory_policy = try(azurerm_storage_blob_inventory_policy.this[*].id, null)
primary_blob_host = try(azurerm_storage_account.this.primary_blob_host, null)
primary_blob_endpoint = try(azurerm_storage_account.this.primary_blob_endpoint, null)
secondary_blob_host = try(azurerm_storage_account.this.secondary_blob_host, null)
secondary_blob_endpoint = try(azurerm_storage_account.this.secondary_blob_endpoint, null)
primary_dfs_host = try(azurerm_storage_account.this.primary_dfs_host, null)
primary_dfs_endpoint = try(azurerm_storage_account.this.primary_dfs_endpoint, null)
secondary_dfs_host = try(azurerm_storage_account.this.secondary_dfs_host, null)
secondary_dfs_endpoint = try(azurerm_storage_account.this.secondary_dfs_endpoint, null)
primary_file_host = try(azurerm_storage_account.this.primary_file_host, null)
primary_file_endpoint = try(azurerm_storage_account.this.primary_file_endpoint, null)
secondary_file_host = try(azurerm_storage_account.this.secondary_file_host, null)
secondary_file_endpoint = try(azurerm_storage_account.this.secondary_file_endpoint, null)
management_policy_id = try(azurerm_storage_management_policy.this[*].id, null)
primary_queue_endpoint = try(azurerm_storage_account.this.primary_queue_endpoint, null)
primary_queue_host = try(azurerm_storage_account.this.primary_queue_host, null)
secondary_queue_endpoint = try(azurerm_storage_account.this.secondary_queue_endpoint, null)
secondary_queue_host = try(azurerm_storage_account.this.secondary_queue_host, null)
primary_table_endpoint = try(azurerm_storage_account.this.primary_table_endpoint, null)
primary_table_host = try(azurerm_storage_account.this.primary_table_host, null)
secondary_table_endpoint = try(azurerm_storage_account.this.secondary_table_endpoint, null)
secondary_table_host = try(azurerm_storage_account.this.secondary_table_host, null)
primary_web_endpoint = try(azurerm_storage_account.this.primary_web_endpoint, null)
primary_web_host = try(azurerm_storage_account.this.primary_web_host, null)
secondary_web_endpoint = try(azurerm_storage_account.this.secondary_web_endpoint, null)
secondary_web_host = try(azurerm_storage_account.this.secondary_web_host, null)
}
}
output "storage_account" {
description = "The Storage Account object."
value = azurerm_storage_account.this
sensitive = true
}
output "storage_account_access_tier" {
description = "The access tier of the Storage Account."
value = azurerm_storage_account.this.access_tier
}
output "storage_account_id" {
description = "The ID of the Storage Account."
value = azurerm_storage_account.this.id
}
output "storage_account_kind" {
description = "The kind of the Storage Account."
value = azurerm_storage_account.this.account_kind
}
output "primary_location" {
description = "The primary location of the storage account."
value = azurerm_storage_account.this.primary_location
}
output "secondary_location" {
description = "The secondary location of the storage account."
value = try(azurerm_storage_account.this.secondary_location, null)
}
output "storage_account_name" {
description = "The name of the storage account"
value = azurerm_storage_account.this.name
}
output "storage_account_tier" {
description = "The tier of the Storage Account."
value = azurerm_storage_account.this.account_tier
}
output "storage_account_replication_type" {
description = "The account replication type of the Storage Account."
value = azurerm_storage_account.this.account_replication_type
}
output "primary_connection_string" {
description = "The primary connection string for the storage account"
value = azurerm_storage_account.this.primary_connection_string
sensitive = true
}
output "secondary_connection_string" {
description = "The secondary connection string for the storage account"
value = try(azurerm_storage_account.this.secondary_connection_string, null)
sensitive = true
}
output "primary_access_key" {
description = "The primary access key for the storage account"
value = azurerm_storage_account.this.primary_access_key
sensitive = true
}
output "secondary_access_key" {
description = "The primary access key for the storage account."
value = azurerm_storage_account.this.secondary_access_key
sensitive = true
}
output "fqdn" {
description = "Fqdns for storage services."
value = length(azurerm_storage_account.this.name) > 0 ? { for svc in local.endpoints : svc => "${azurerm_storage_account.this.name}.${svc}.core.windows.net" } : null
}
output "local_user" {
description = "Storage Account Local User."
value = length(azurerm_storage_account_local_user.this) > 0 ? {
for name, user in azurerm_storage_account_local_user.this :
name => {
id = user.id
password = user.password
sid = user.sid
}
} : null
sensitive = true
}
output "management_locks" {
description = "Map of the management locks created"
value = length(azurerm_management_lock.this) > 0 ? {
for id, lock in azurerm_management_lock.this :
id => {
id = lock.id
name = lock.name
lock_level = lock.lock_level
notes = lock.notes
}
} : null
}
### Blob Inventory Policy
output "storage_blob_inventory_policy" {
description = "Id of the storage blob inventory policy created."
value = try(azurerm_storage_blob_inventory_policy.this[*].id, null)
}
### Blob
output "storage_blob" {
description = "Map of storage blob created."
value = length(azurerm_storage_blob.this) > 0 ? {
for name, blob in azurerm_storage_blob.this :
name => {
id = blob.id
name = blob.name
url = blob.url
storage_account_name = blob.storage_account_name
}
} : null
}
output "primary_blob_connection_string" {
description = "The connection string associated with the primary blob location."
value = azurerm_storage_account.this.primary_blob_connection_string
sensitive = true
}
output "secondary_blob_connection_string" {
description = "The connection string associated with the secondary blob location."
value = azurerm_storage_account.this.secondary_blob_connection_string
sensitive = true
}
output "primary_blob_host" {
description = "The hostname with port if applicable for blob storage in the primary location."
value = try(azurerm_storage_account.this.primary_blob_host, null)
}
output "primary_blob_endpoint" {
description = "The endpoint URL for blob storage in the primary location."
value = try(azurerm_storage_account.this.primary_blob_endpoint, null)
}
output "primary_blob_microsoft_endpoint" {
description = "The microsoft routing endpoint URL for blob storage in the primary location."
value = try(azurerm_storage_account.this.primary_blob_microsoft_endpoint, null)
}
output "primary_blob_microsoft_host" {
description = "The microsoft routing hostname with port if applicable for blob storage in the primary location."
value = try(azurerm_storage_account.this.primary_blob_microsoft_host, null)
}
output "secondary_blob_host" {
description = "The hostname with port if applicable for blob storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_blob_host, null)
}
output "secondary_blob_endpoint" {
description = "The endpoint URL for blob storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_blob_endpoint, null)
}
output "secondary_blob_microsoft_host" {
description = "The microsoft routing hostname with port if applicable for blob storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_blob_microsoft_host, null)
}
output "secondary_blob_microsoft_endpoint" {
description = "The microsoft routing endpoint URL for blob storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_blob_microsoft_endpoint, null)
}
### Container
output "storage_container" {
description = "Map of storage containers created."
value = length(azurerm_storage_container.this) > 0 ? {
for name, container in azurerm_storage_container.this :
name => {
id = container.id
name = container.name
storage_account_name = container.storage_account_name
container_access_type = container.container_access_type
has_immutability_policy = container.has_immutability_policy
has_legal_hold = container.has_legal_hold
resource_manager_id = container.resource_manager_id
}
} : null
}
### DFS
output "storage_data_lake_gen2_filesystem" {
description = "Map of storage data lake gen2 filesystem created."
value = length(azurerm_storage_data_lake_gen2_filesystem.this) > 0 ? {
for name, filesystem in azurerm_storage_data_lake_gen2_filesystem.this :
name => {
id = filesystem.id
name = filesystem.name
properties = filesystem.properties
ace = filesystem.ace
owner = filesystem.owner
group = filesystem.group
storage_account_name = filesystem.storage_account_id
}
} : null
}
output "storage_data_lake_gen2_path" {
description = "Map of storage data lake gen2 path created."
value = length(azurerm_storage_data_lake_gen2_path.this) > 0 ? {
for name, path in azurerm_storage_data_lake_gen2_path.this :
name => {
id = path.id
path = path.path
ace = path.ace
owner = path.owner
group = path.group
storage_account_name = path.storage_account_id
}
} : null
}
output "primary_dfs_host" {
description = "The hostname with port if applicable for dfs storage in the primary location."
value = try(azurerm_storage_account.this.primary_dfs_host, null)
}
output "primary_dfs_endpoint" {
description = "The endpoint URL for dfs storage in the primary location."
value = try(azurerm_storage_account.this.primary_dfs_endpoint, null)
}
output "primary_dfs_microsoft_endpoint" {
description = "The microsoft routing endpoint URL for dfs storage in the primary location."
value = try(azurerm_storage_account.this.primary_dfs_microsoft_endpoint, null)
}
output "primary_dfs_microsoft_host" {
description = "The microsoft routing hostname with port if applicable for dfs storage in the primary location."
value = try(azurerm_storage_account.this.primary_dfs_microsoft_host, null)
}
output "secondary_dfs_host" {
description = "The hostname with port if applicable for dfs storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_dfs_host, null)
}
output "secondary_dfs_endpoint" {
description = "The endpoint URL for dfs storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_dfs_host, null)
}
output "secondary_dfs_microsoft_host" {
description = "The microsoft routing hostname with port if applicable for dfs storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_dfs_host, null)
}
output "secondary_dfs_microsoft_endpoint" {
description = "The microsoft routing endpoint URL for dfs storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_dfs_microsoft_endpoint, null)
}
### Fileshare
output "storage_share" {
description = "Map of storage shares created."
value = length(azurerm_storage_share.this) > 0 ? {
for name, share in azurerm_storage_share.this : name => {
id = share.id
name = share.name
storage_account_name = share.storage_account_name
access_tier = share.access_tier
enabled_protocol = share.enabled_protocol
quota = share.quota
resource_manager_id = share.resource_manager_id
url = share.url
}
} : null
}
output "storage_share_directory" {
description = "Map of storage share directories created."
value = length(azurerm_storage_share_directory.this) > 0 ? {
for name, directories in azurerm_storage_share_directory.this : name => {
id = directories.id
name = directories.name
}
} : null
}
output "storage_share_file" {
description = "Map of storage share directories created."
value = length(azurerm_storage_share_file.this) > 0 ? {
for name, files in azurerm_storage_share_file.this : name => {
id = files.id
name = files.name
content_length = files.content_length
}
} : null
}
output "primary_file_host" {
description = "The hostname with port if applicable for file storage in the primary location."
value = try(azurerm_storage_account.this.primary_file_host, null)
}
output "primary_file_endpoint" {
description = "The endpoint URL for file storage in the primary location."
value = try(azurerm_storage_account.this.primary_file_endpoint, null)
}
output "primary_file_microsoft_endpoint" {
description = "The microsoft routing endpoint URL for file storage in the primary location."
value = try(azurerm_storage_account.this.primary_file_microsoft_endpoint, null)
}
output "primary_file_microsoft_host" {
description = "The microsoft routing hostname with port if applicable for file storage in the primary location."
value = try(azurerm_storage_account.this.primary_file_microsoft_host, null)
}
output "secondary_file_host" {
description = "The hostname with port if applicable for file storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_file_host, null)
}
output "secondary_file_endpoint" {
description = "The endpoint URL for file storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_file_endpoint, null)
}
output "secondary_file_microsoft_host" {
description = "The microsoft routing hostname with port if applicable for file storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_file_microsoft_host, null)
}
output "secondary_file_microsoft_endpoint" {
description = "The microsoft routing endpoint URL for file storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_file_microsoft_endpoint, null)
}
### Lifecycle Management Policy
output "management_policy_id" {
description = "ID of the management policy created"
value = try(azurerm_storage_management_policy.this[*].id, null)
}
### Private Endpoints
output "private_endpoint_blob" {
description = "Blob Private Endpoint"
value = try(azurerm_private_endpoint.blob[0], null)
}
output "private_endpoint_table" {
description = "Table Private Endpoint"
value = try(azurerm_private_endpoint.table[0], null)
}
output "private_endpoint_queue" {
description = "Queue Private Endpoint"
value = try(azurerm_private_endpoint.queue[0], null)
}
output "private_endpoint_file" {
description = "File Private Endpoint"
value = try(azurerm_private_endpoint.file[0], null)
}
output "private_endpoint_web" {
description = "Blob Private Endpoint"
value = try(azurerm_private_endpoint.web[0], null)
}
output "private_endpoint_dfs" {
description = "Blob Private Endpoint"
value = try(azurerm_private_endpoint.dfs[0], null)
}
### Queue
output "storage_queue" {
description = "Map of storage queues created."
value = length(azurerm_storage_queue.this) > 0 ? {
for name, queue in azurerm_storage_queue.this :
name => {
id = queue.id
name = queue.name
storage_account_name = queue.storage_account_name
resource_manager_id = queue.resource_manager_id
}
} : null
}
output "primary_queue_endpoint" {
description = " The endpoint URL for queue storage in the primary location."
value = try(azurerm_storage_account.this.primary_queue_endpoint, null)
}
output "primary_queue_host" {
description = "The hostname with port if applicable for queue storage in the primary location."
value = try(azurerm_storage_account.this.primary_queue_host, null)
}
output "primary_queue_microsoft_endpoint" {
description = " The microsoft endpoint URL for queue storage in the primary location."
value = try(azurerm_storage_account.this.primary_queue_microsoft_endpoint, null)
}
output "primary_queue_microsoft_host" {
description = "The microsoft hostname with port if applicable for queue storage in the primary location."
value = try(azurerm_storage_account.this.primary_queue_microsoft_host, null)
}
output "secondary_queue_endpoint" {
description = "The endpoint URL for queue storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_queue_endpoint, null)
}
output "secondary_queue_host" {
description = "The hostname with port if applicable for queue storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_queue_host, null)
}
output "secondary_queue_microsoft_endpoint" {
description = "The microsoft endpoint URL for queue storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_queue_microsoft_endpoint, null)
}
output "secondary_queue_microsoft_host" {
description = "The microsoft hostname with port if applicable for queue storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_queue_microsoft_host, null)
}
### Table
output "storage_table" {
description = "Map of storage tables created."
value = length(azurerm_storage_table.this) > 0 ? {
for name, table in azurerm_storage_table.this : name => {
id = table.id
name = table.name
storage_account_name = table.storage_account_name
}
} : null
}
output "storage_table_entity" {
description = "Map of storage table entities created."
value = length(azurerm_storage_table_entity.this) > 0 ? {
for name, table_entity in azurerm_storage_table_entity.this : name => {
id = table_entity.id
partition_key = table_entity.partition_key
row_key = table_entity.row_key
storage_account_name = table_entity.storage_account_name
}
} : null
}
output "primary_table_endpoint" {
description = "The endpoint with port if applicable for table storage in the primary location."
value = try(azurerm_storage_account.this.primary_table_endpoint, null)
}
output "primary_table_host" {
description = "The hostname with port if applicable for table storage in the primary location."
value = try(azurerm_storage_account.this.primary_table_host, null)
}
output "primary_table_microsoft_endpoint" {
description = "The endpoint with port if applicable for table storage in the primary location."
value = try(azurerm_storage_account.this.primary_table_microsoft_endpoint, null)
}
output "primary_table_microsoft_host" {
description = "The hostname with port if applicable for table storage in the primary location."
value = try(azurerm_storage_account.this.primary_table_microsoft_host, null)
}
output "secondary_table_endpoint" {
description = "The endpoint with port if applicable for table storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_table_endpoint, null)
}
output "secondary_table_host" {
description = "The hostname with port if applicable for table storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_table_host, null)
}
output "secondary_table_microsoft_endpoint" {
description = "The microsoft endpoint with port if applicable for table storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_table_microsoft_endpoint, null)
}
output "secondary_table_microsoft_host" {
description = "The microsoft hostname with port if applicable for table storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_table_microsoft_host, null)
}
### Web
output "primary_web_endpoint" {
description = "The endpoint with port if applicable for web storage in the primary location."
value = try(azurerm_storage_account.this.primary_web_endpoint, null)
}
output "primary_web_host" {
description = "The hostname with port if applicable for web storage in the primary location."
value = try(azurerm_storage_account.this.primary_web_host, null)
}
output "primary_web_microsoft_endpoint" {
description = "The endpoint with port if applicable for web storage in the primary location."
value = try(azurerm_storage_account.this.primary_web_microsoft_endpoint, null)
}
output "primary_web_microsoft_host" {
description = "The hostname with port if applicable for web storage in the primary location."
value = try(azurerm_storage_account.this.primary_web_microsoft_host, null)
}
output "secondary_web_endpoint" {
description = "The endpoint with port if applicable for web storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_web_endpoint, null)
}
output "secondary_web_host" {
description = "The hostname with port if applicable for web storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_web_host, null)
}
output "secondary_web_microsoft_endpoint" {
description = "The microsoft endpoint with port if applicable for web storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_web_microsoft_endpoint, null)
}
output "secondary_web_microsoft_host" {
description = "The microsoft hostname with port if applicable for web storage in the secondary location."
value = try(azurerm_storage_account.this.secondary_web_microsoft_host, null)
}