-
Notifications
You must be signed in to change notification settings - Fork 11
/
outputs.tf
71 lines (61 loc) · 2.18 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
#####
# AWS Backup Vault Outputs
#####
output "backup_vault_id" {
description = "The name of the AWS Backup Vault"
value = var.vault_name != null ? concat(aws_backup_vault.main[*].id, [""])[0] : null
}
output "backup_vault_arn" {
description = "The Amazon Resource Name (ARN) that identifies the AWS Backup Vault"
value = var.vault_name != null ? concat(aws_backup_vault.main[*].arn, [""])[0] : null
}
output "backup_vault_recovery_points" {
description = "The number of recovery points that are stored in a backup vault"
value = var.vault_name != null ? concat(aws_backup_vault.main[*].recovery_points, [""])[0] : null
}
#####
# AWS Backup Plan Outputs
#####
output "backup_plan_id" {
description = "The name of the backup plan"
value = aws_backup_plan.main.id
}
output "backup_plan_arn" {
description = "The Amazon Resource Name (ARN) that identifies the backup plan"
value = aws_backup_plan.main.arn
}
output "backup_plan_version" {
description = "Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan."
value = aws_backup_plan.main.version
}
#####
# AWS Backup Selection Outputs
####
output "backup_selection_id" {
description = "The identifier of the backup selection"
value = concat(aws_backup_selection.main[*].id, [""])[0]
}
#####
# AWS Backup SNS Notification Outputs
####
output "backup_sns_topic_arn" {
description = "The Amazon Resource Name (ARN) that specifies the topic for a backup vault’s events"
value = var.create_sns_topic ? concat(aws_sns_topic.main[*].arn, [""])[0] : var.sns_topic_arn
}
output "backup_vault_events" {
description = "An array of events that indicate the status of jobs to back up resources to the backup vault."
value = flatten([
for events in aws_backup_vault_notifications.main[*] : events.backup_vault_events
if var.enable_sns_notifications])
}
#####
# AWS Backup IAM role Outputs
####
output "backup_vault_iam_role_name" {
description = "The name of the backup IAM role"
value = aws_iam_role.main.name
}
output "backup_vault_iam_role_arn" {
description = "The ARN of the backup IAM role"
value = aws_iam_role.main.arn
}