-
Notifications
You must be signed in to change notification settings - Fork 7
/
outputs.tf
488 lines (406 loc) · 14.2 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
# -------------------------------------------------------------------------------------------------
# IAM Role
# -------------------------------------------------------------------------------------------------
output "this_iam_role_name" {
description = "iam role name"
value = element(concat(aws_iam_role.this.*.name, [""]), 0)
}
output "this_iam_role_arn" {
description = "iam role arn"
value = element(concat(aws_iam_role.this.*.arn, [""]), 0)
}
# -------------------------------------------------------------------------------------------------
# IAM User
# -------------------------------------------------------------------------------------------------
output "this_user_name" {
description = "IAM user name"
value = element(concat(aws_iam_user.this.*.name, [""]), 0)
}
output "this_user_arn" {
description = "ARN of the IAM user"
value = element(concat(aws_iam_user.this.*.arn, [""]), 0)
}
output "this_aws_iam_access_key" {
description = "IAM Access Key of the created user"
value = element(concat(aws_iam_access_key.this.*.id, [""]), 0)
}
output "this_aws_iam_access_key_secret" {
description = "The secret key of the user"
value = element(concat(aws_iam_access_key.this.*.secret, [""]), 0)
sensitive = true
}
# -------------------------------------------------------------------------------------------------
# DynamoDB
# -------------------------------------------------------------------------------------------------
output "dynamodb_table_name" {
description = "DynamoDB table name"
value = module.dynamodb.table_name
}
output "dynamodb_table_id" {
description = "DynamoDB table ID"
value = module.dynamodb.table_id
}
output "dynamodb_table_arn" {
description = "DynamoDB table ARN"
value = module.dynamodb.table_arn
}
output "dynamodb_global_secondary_index_names" {
description = "DynamoDB secondary index names"
value = [module.dynamodb.global_secondary_index_names]
}
output "dynamodb_local_secondary_index_names" {
description = "DynamoDB local index names"
value = [module.dynamodb.local_secondary_index_names]
}
output "dynamodb_table_stream_arn" {
description = "DynamoDB table stream ARN"
value = module.dynamodb.table_stream_arn
}
output "dynamodb_table_stream_label" {
description = "DynamoDB table stream label"
value = module.dynamodb.table_stream_label
}
# -------------------------------------------------------------------------------------------------
# DynamoDB 2
# -------------------------------------------------------------------------------------------------
output "dynamodb2_table_name" {
description = "DynamoDB table name"
value = module.dynamodb2.table_name
}
output "dynamodb2_table_id" {
description = "DynamoDB table ID"
value = module.dynamodb2.table_id
}
output "dynamodb2_table_arn" {
description = "DynamoDB table ARN"
value = module.dynamodb2.table_arn
}
output "dynamodb2_global_secondary_index_names" {
description = "DynamoDB secondary index names"
value = [module.dynamodb2.global_secondary_index_names]
}
output "dynamodb2_local_secondary_index_names" {
description = "DynamoDB local index names"
value = [module.dynamodb2.local_secondary_index_names]
}
output "dynamodb2_table_stream_arn" {
description = "DynamoDB table stream ARN"
value = module.dynamodb2.table_stream_arn
}
output "dynamodb2_table_stream_label" {
description = "DynamoDB table stream label"
value = module.dynamodb2.table_stream_label
}
# -------------------------------------------------------------------------------------------------
# DynamoDB 3
# -------------------------------------------------------------------------------------------------
output "dynamodb3_table_name" {
description = "DynamoDB table name"
value = module.dynamodb3.table_name
}
output "dynamodb3_table_id" {
description = "DynamoDB table ID"
value = module.dynamodb3.table_id
}
output "dynamodb3_table_arn" {
description = "DynamoDB table ARN"
value = module.dynamodb3.table_arn
}
output "dynamodb3_global_secondary_index_names" {
description = "DynamoDB secondary index names"
value = [module.dynamodb3.global_secondary_index_names]
}
output "dynamodb3_local_secondary_index_names" {
description = "DynamoDB local index names"
value = [module.dynamodb3.local_secondary_index_names]
}
output "dynamodb3_table_stream_arn" {
description = "DynamoDB table stream ARN"
value = module.dynamodb3.table_stream_arn
}
output "dynamodb3_table_stream_label" {
description = "DynamoDB table stream label"
value = module.dynamodb3.table_stream_label
}
# -------------------------------------------------------------------------------------------------
# DynamoDB 4
# -------------------------------------------------------------------------------------------------
output "dynamodb4_table_name" {
description = "DynamoDB table name"
value = module.dynamodb4.table_name
}
output "dynamodb4_table_id" {
description = "DynamoDB table ID"
value = module.dynamodb4.table_id
}
output "dynamodb4_table_arn" {
description = "DynamoDB table ARN"
value = module.dynamodb4.table_arn
}
output "dynamodb4_global_secondary_index_names" {
description = "DynamoDB secondary index names"
value = [module.dynamodb4.global_secondary_index_names]
}
output "dynamodb4_local_secondary_index_names" {
description = "DynamoDB local index names"
value = [module.dynamodb4.local_secondary_index_names]
}
output "dynamodb4_table_stream_arn" {
description = "DynamoDB table stream ARN"
value = module.dynamodb4.table_stream_arn
}
output "dynamodb4_table_stream_label" {
description = "DynamoDB table stream label"
value = module.dynamodb4.table_stream_label
}
# -------------------------------------------------------------------------------------------------
# Redis
# -------------------------------------------------------------------------------------------------
output "this_redis_subnet_group_id" {
description = "The AWS elasticache subnet group ID"
value = element(concat(aws_elasticache_subnet_group.this.*.id, [""]), 0)
}
output "this_redis_subnet_group_name" {
description = "The AWS elasticache subnet group name"
value = element(concat(aws_elasticache_subnet_group.this.*.name, [""]), 0)
}
# -------------------------------------------------------------------------------------------------
# AWS Elasticache Group - Redis cluster details
# -------------------------------------------------------------------------------------------------
output "this_redis_replication_group_id" {
description = "The AWS Elasticache replication group ID"
value = element(concat(aws_elasticache_replication_group.this.*.id, [""]), 0)
}
output "this_redis_replication_group_replication_group_id" {
description = "The AWS Elasticache replication group replication group ID"
value = element(
concat(
aws_elasticache_replication_group.this.*.replication_group_id,
[""],
),
0,
)
}
output "this_redis_replication_group_number_cache_clusters" {
description = "The AWS Elasticache replication group number cache clusters"
value = element(
concat(
aws_elasticache_replication_group.this.*.number_cache_clusters,
[""],
),
0,
)
}
output "public_redis_endpoint_aws_route53_record" {
description = "Public Redis cluster end-point address (should be used by the service)"
value = element(
concat(aws_route53_record.public_redis_endpoint.*.fqdn, [""]),
0,
)
}
output "private_redis_endpoint_aws_route53_record" {
description = "Private Redis cluster end-point address (should be used by the service)"
value = element(
concat(aws_route53_record.private_redis_endpoint.*.fqdn, [""]),
0,
)
}
output "redis_port" {
description = "Redis port"
value = var.redis_port
}
# -------------------------------------------------------------------------------------------------
# AWS RDS
# -------------------------------------------------------------------------------------------------
output "rds_this_db_instance_address" {
description = "The address of the RDS instance"
value = module.rds.db_instance_address
}
output "rds_this_db_instance_arn" {
description = "The ARN of the RDS instance"
value = module.rds.db_instance_arn
}
output "rds_this_db_instance_availability_zone" {
description = "The availability zone of the RDS instance"
value = module.rds.db_instance_availability_zone
}
output "rds_this_db_instance_endpoint" {
description = "The connection endpoint"
value = module.rds.db_instance_endpoint
}
output "rds_this_db_instance_hosted_zone_id" {
description = "The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record)"
value = module.rds.db_instance_hosted_zone_id
}
output "rds_this_db_instance_identifier" {
description = "The RDS instance Identifier"
value = module.rds.db_instance_identifier
}
output "rds_this_db_instance_resource_id" {
description = "The RDS Resource ID of this instance"
value = module.rds.db_instance_resource_id
}
output "rds_this_db_instance_status" {
description = "The RDS instance status"
value = module.rds.db_instance_status
}
output "rds_this_db_instance_name" {
description = "The database name"
value = module.rds.db_instance_name
}
output "rds_this_db_instance_username" {
description = "The master username for the database"
value = module.rds.db_instance_username
sensitive = true
}
output "rds_this_db_instance_password" {
description = "The database password (this password may be old, because Terraform doesn't track it after initial creation)"
value = local.password
sensitive = true
}
output "rds_this_db_instance_port" {
description = "The database port"
value = module.rds.db_instance_port
}
output "rds_this_db_subnet_group_id" {
description = "The db subnet group name"
value = module.rds.db_subnet_group_id
}
output "rds_this_db_subnet_group_arn" {
description = "The ARN of the db subnet group"
value = module.rds.db_subnet_group_arn
}
output "rds_this_db_parameter_group_id" {
description = "The db parameter group id"
value = module.rds.db_parameter_group_id
}
output "rds_this_db_parameter_group_arn" {
description = "The ARN of the db parameter group"
value = module.rds.db_parameter_group_arn
}
output "public_rds_endpoint_aws_route53_record" {
description = "Public Redis cluster end-point address (should be used by the service)"
value = element(
concat(aws_route53_record.public_rds_endpoint.*.fqdn, [""]),
0,
)
}
output "private_rds_endpoint_aws_route53_record" {
description = "Private Redis cluster end-point address (should be used by the service)"
value = element(
concat(aws_route53_record.private_rds_endpoint.*.fqdn, [""]),
0,
)
}
#
# S3
#
output "this_aws_s3_bucket_id" {
description = "id of created S3 bucket"
value = element(
concat(aws_s3_bucket.this.*.id, [""]),
0,
)
}
output "this_aws_s3_bucket_arn" {
description = "id of created S3 bucket"
value = element(
concat(aws_s3_bucket.this.*.arn, [""]),
0,
)
}
# -------------------------------------------------------------------------------------------------
# SQS 1
# -------------------------------------------------------------------------------------------------
output "sqs1_queue_name" {
description = "SQS queue name"
value = module.sqs1.sqs_queue_name
}
output "sqs1_queue_id" {
description = "SQS queue ID"
value = module.sqs1.sqs_queue_id
}
output "sqs1_queue_arn" {
description = "SQS queue ARN"
value = module.sqs1.sqs_queue_arn
}
output "sqs1_dlq_queue_arn" {
description = "SQS queue ARN"
value = module.sqs1-dlq.sqs_queue_arn
}
# -------------------------------------------------------------------------------------------------
# SQS 2
# -------------------------------------------------------------------------------------------------
output "sqs2_queue_name" {
description = "SQS queue name"
value = module.sqs2.sqs_queue_name
}
output "sqs2_queue_id" {
description = "SQS queue ID"
value = module.sqs2.sqs_queue_id
}
output "sqs2_queue_arn" {
description = "SQS queue ARN"
value = module.sqs2.sqs_queue_arn
}
output "sqs2_dlq_queue_arn" {
description = "SQS queue ARN"
value = module.sqs2-dlq.sqs_queue_arn
}
# -------------------------------------------------------------------------------------------------
# SQS 3
# -------------------------------------------------------------------------------------------------
output "sqs3_queue_name" {
description = "SQS queue name"
value = module.sqs3.sqs_queue_name
}
output "sqs3_queue_id" {
description = "SQS queue ID"
value = module.sqs3.sqs_queue_id
}
output "sqs3_queue_arn" {
description = "SQS queue ARN"
value = module.sqs3.sqs_queue_arn
}
output "sqs3_dlq_queue_arn" {
description = "SQS queue ARN"
value = module.sqs3-dlq.sqs_queue_arn
}
# -------------------------------------------------------------------------------------------------
# SQS 4
# -------------------------------------------------------------------------------------------------
output "sqs4_queue_name" {
description = "SQS queue name"
value = module.sqs4.sqs_queue_name
}
output "sqs4_queue_id" {
description = "SQS queue ID"
value = module.sqs4.sqs_queue_id
}
output "sqs4_queue_arn" {
description = "SQS queue ARN"
value = module.sqs4.sqs_queue_arn
}
output "sqs4_dlq_queue_arn" {
description = "SQS queue ARN"
value = module.sqs4-dlq.sqs_queue_arn
}
# -------------------------------------------------------------------------------------------------
# SQS 5
# -------------------------------------------------------------------------------------------------
output "sqs5_queue_name" {
description = "SQS queue name"
value = module.sqs5.sqs_queue_name
}
output "sqs5_queue_id" {
description = "SQS queue ID"
value = module.sqs5.sqs_queue_id
}
output "sqs5_queue_arn" {
description = "SQS queue ARN"
value = module.sqs5.sqs_queue_arn
}
output "sqs5_dlq_queue_arn" {
description = "SQS queue ARN"
value = module.sqs5-dlq.sqs_queue_arn
}