-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
150 lines (117 loc) · 5.51 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
# --------------------------------------------------------------------------------------------------
# Outputs from the root module.
# --------------------------------------------------------------------------------------------------
output "audit_bucket" {
description = "The S3 bucket used for storing audit logs."
value = one(module.audit_log_bucket[*].this_bucket)
}
# --------------------------------------------------------------------------------------------------
# Outputs from alarm-baseline module.
# --------------------------------------------------------------------------------------------------
output "alarm_sns_topic" {
description = "The SNS topic to which CloudWatch Alarms will be sent."
value = one(module.alarm_baseline[*].alarm_sns_topic)
}
# --------------------------------------------------------------------------------------------------
# Outputs from cloudtrail-baseline module.
# --------------------------------------------------------------------------------------------------
output "cloudtrail" {
description = "The trail for recording events in all regions."
value = one(module.cloudtrail_baseline[*].cloudtrail)
}
output "cloudtrail_sns_topic" {
description = "The sns topic linked to the cloudtrail."
value = one(module.cloudtrail_baseline[*].cloudtrail_sns_topic)
}
output "cloudtrail_kms_key" {
description = "The KMS key used for encrypting CloudTrail events."
value = one(module.cloudtrail_baseline[*].kms_key)
}
output "cloudtrail_log_delivery_iam_role" {
description = "The IAM role used for delivering CloudTrail events to CloudWatch Logs."
value = one(module.cloudtrail_baseline[*].log_delivery_iam_role)
}
output "cloudtrail_log_group" {
description = "The CloudWatch Logs log group which stores CloudTrail events."
value = one(module.cloudtrail_baseline[*].log_group)
}
# --------------------------------------------------------------------------------------------------
# Outputs from config-baseline module.
# --------------------------------------------------------------------------------------------------
output "config_iam_role" {
description = "The IAM role used for delivering AWS Config records to CloudWatch Logs."
value = aws_iam_role.recorder
}
output "config_configuration_recorder" {
description = "The configuration recorder in each region."
value = {
"us-gov-west-1" = one(module.config_baseline_us-gov-west-1[*].configuration_recorder)
"us-gov-east-1" = one(module.config_baseline_us-gov-east-1[*].configuration_recorder)
}
}
output "config_sns_topic" {
description = "The SNS topic) that AWS Config delivers notifications to."
value = {
"us-gov-west-1" = one(module.config_baseline_us-gov-west-1[*].config_sns_topic)
"us-gov-east-1" = one(module.config_baseline_us-gov-east-1[*].config_sns_topic)
}
}
# --------------------------------------------------------------------------------------------------
# Outputs from guardduty-baseline module.
# --------------------------------------------------------------------------------------------------
output "guardduty_detector" {
description = "The GuardDuty detector in each region."
value = {
"us-gov-west-1" = one(module.guardduty_baseline_us-gov-west-1[*].guardduty_detector)
"us-gov-east-1" = one(module.guardduty_baseline_us-gov-east-1[*].guardduty_detector)
}
}
# --------------------------------------------------------------------------------------------------
# Outputs from iam-baseline module.
# --------------------------------------------------------------------------------------------------
output "support_iam_role" {
description = "The IAM role used for the support user."
value = one(module.iam_baseline[*].support_iam_role)
}
# --------------------------------------------------------------------------------------------------
# Outputs from vpc-baseline module.
# --------------------------------------------------------------------------------------------------
output "vpc_flow_logs_iam_role" {
description = "The IAM role used for delivering VPC Flow Logs to CloudWatch Logs."
value = local.flow_logs_to_cw_logs ? aws_iam_role.flow_logs_publisher : null
}
output "vpc_flow_logs_group" {
description = "The CloudWatch Logs log group which stores VPC Flow Logs in each region."
value = local.flow_logs_to_cw_logs ? {
"us-gov-west-1" = one(module.vpc_baseline_us-gov-west-1[*].vpc_flow_logs_group)
"us-gov-east-1" = one(module.vpc_baseline_us-gov-east-1[*].vpc_flow_logs_group)
} : null
}
output "default_vpc" {
description = "The default VPC."
value = {
"us-gov-west-1" = one(module.vpc_baseline_us-gov-west-1[*].default_vpc)
"us-gov-east-1" = one(module.vpc_baseline_us-gov-east-1[*].default_vpc)
}
}
output "default_security_group" {
description = "The ID of the default security group."
value = {
"us-gov-west-1" = one(module.vpc_baseline_us-gov-west-1[*].default_security_group)
"us-gov-east-1" = one(module.vpc_baseline_us-gov-east-1[*].default_security_group)
}
}
output "default_network_acl" {
description = "The default network ACL."
value = {
"us-gov-west-1" = one(module.vpc_baseline_us-gov-west-1[*].default_network_acl)
"us-gov-east-1" = one(module.vpc_baseline_us-gov-east-1[*].default_network_acl)
}
}
output "default_route_table" {
description = "The default route table."
value = {
"us-gov-west-1" = one(module.vpc_baseline_us-gov-west-1[*].default_route_table)
"us-gov-east-1" = one(module.vpc_baseline_us-gov-east-1[*].default_route_table)
}
}