This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
forked from nozaq/terraform-aws-secure-baseline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
268 lines (235 loc) · 15.1 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
# --------------------------------------------------------------------------------------------------
# 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 = {
"ap-northeast-1" = one(module.config_baseline_ap-northeast-1[*].configuration_recorder)
"ap-northeast-2" = one(module.config_baseline_ap-northeast-2[*].configuration_recorder)
"ap-northeast-3" = one(module.config_baseline_ap-northeast-3[*].configuration_recorder)
"ap-south-1" = one(module.config_baseline_ap-south-1[*].configuration_recorder)
"ap-southeast-1" = one(module.config_baseline_ap-southeast-1[*].configuration_recorder)
"ap-southeast-2" = one(module.config_baseline_ap-southeast-2[*].configuration_recorder)
"ca-central-1" = one(module.config_baseline_ca-central-1[*].configuration_recorder)
"eu-central-1" = one(module.config_baseline_eu-central-1[*].configuration_recorder)
"eu-west-1" = one(module.config_baseline_eu-west-1[*].configuration_recorder)
"eu-west-2" = one(module.config_baseline_eu-west-2[*].configuration_recorder)
"eu-west-3" = one(module.config_baseline_eu-west-3[*].configuration_recorder)
"sa-east-1" = one(module.config_baseline_sa-east-1[*].configuration_recorder)
"us-east-1" = one(module.config_baseline_us-east-1[*].configuration_recorder)
"us-east-2" = one(module.config_baseline_us-east-2[*].configuration_recorder)
"us-west-1" = one(module.config_baseline_us-west-1[*].configuration_recorder)
"us-west-2" = one(module.config_baseline_us-west-2[*].configuration_recorder)
}
}
output "config_sns_topic" {
description = "The SNS topic) that AWS Config delivers notifications to."
value = {
"ap-northeast-1" = one(module.config_baseline_ap-northeast-1[*].config_sns_topic)
"ap-northeast-2" = one(module.config_baseline_ap-northeast-2[*].config_sns_topic)
"ap-northeast-3" = one(module.config_baseline_ap-northeast-3[*].config_sns_topic)
"ap-south-1" = one(module.config_baseline_ap-south-1[*].config_sns_topic)
"ap-southeast-1" = one(module.config_baseline_ap-southeast-1[*].config_sns_topic)
"ap-southeast-2" = one(module.config_baseline_ap-southeast-2[*].config_sns_topic)
"ca-central-1" = one(module.config_baseline_ca-central-1[*].config_sns_topic)
"eu-central-1" = one(module.config_baseline_eu-central-1[*].config_sns_topic)
"eu-north-1" = one(module.config_baseline_eu-north-1[*].config_sns_topic)
"eu-west-1" = one(module.config_baseline_eu-west-1[*].config_sns_topic)
"eu-west-2" = one(module.config_baseline_eu-west-2[*].config_sns_topic)
"eu-west-3" = one(module.config_baseline_eu-west-3[*].config_sns_topic)
"sa-east-1" = one(module.config_baseline_sa-east-1[*].config_sns_topic)
"us-east-1" = one(module.config_baseline_us-east-1[*].config_sns_topic)
"us-east-2" = one(module.config_baseline_us-east-2[*].config_sns_topic)
"us-west-1" = one(module.config_baseline_us-west-1[*].config_sns_topic)
"us-west-2" = one(module.config_baseline_us-west-2[*].config_sns_topic)
}
}
# --------------------------------------------------------------------------------------------------
# Outputs from guardduty-baseline module.
# --------------------------------------------------------------------------------------------------
output "guardduty_detector" {
description = "The GuardDuty detector in each region."
value = {
"ap-northeast-1" = one(module.guardduty_baseline_ap-northeast-1[*].guardduty_detector)
"ap-northeast-2" = one(module.guardduty_baseline_ap-northeast-2[*].guardduty_detector)
"ap-northeast-3" = one(module.guardduty_baseline_ap-northeast-3[*].guardduty_detector)
"ap-south-1" = one(module.guardduty_baseline_ap-south-1[*].guardduty_detector)
"ap-southeast-1" = one(module.guardduty_baseline_ap-southeast-1[*].guardduty_detector)
"ap-southeast-2" = one(module.guardduty_baseline_ap-southeast-2[*].guardduty_detector)
"ca-central-1" = one(module.guardduty_baseline_ca-central-1[*].guardduty_detector)
"eu-central-1" = one(module.guardduty_baseline_eu-central-1[*].guardduty_detector)
"eu-north-1" = one(module.guardduty_baseline_eu-north-1[*].guardduty_detector)
"eu-west-1" = one(module.guardduty_baseline_eu-west-1[*].guardduty_detector)
"eu-west-2" = one(module.guardduty_baseline_eu-west-2[*].guardduty_detector)
"sa-east-1" = one(module.guardduty_baseline_sa-east-1[*].guardduty_detector)
"us-east-1" = one(module.guardduty_baseline_us-east-1[*].guardduty_detector)
"us-east-2" = one(module.guardduty_baseline_us-east-2[*].guardduty_detector)
"us-west-1" = one(module.guardduty_baseline_us-west-1[*].guardduty_detector)
"us-west-2" = one(module.guardduty_baseline_us-west-2[*].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 ? {
"ap-northeast-1" = one(module.vpc_baseline_ap-northeast-1[*].vpc_flow_logs_group)
"ap-northeast-2" = one(module.vpc_baseline_ap-northeast-2[*].vpc_flow_logs_group)
"ap-northeast-3" = one(module.vpc_baseline_ap-northeast-3[*].vpc_flow_logs_group)
"ap-south-1" = one(module.vpc_baseline_ap-south-1[*].vpc_flow_logs_group)
"ap-southeast-1" = one(module.vpc_baseline_ap-southeast-1[*].vpc_flow_logs_group)
"ap-southeast-2" = one(module.vpc_baseline_ap-southeast-2[*].vpc_flow_logs_group)
"ca-central-1" = one(module.vpc_baseline_ca-central-1[*].vpc_flow_logs_group)
"eu-central-1" = one(module.vpc_baseline_eu-central-1[*].vpc_flow_logs_group)
"eu-north-1" = one(module.vpc_baseline_eu-north-1[*].vpc_flow_logs_group)
"eu-west-1" = one(module.vpc_baseline_eu-west-1[*].vpc_flow_logs_group)
"eu-west-2" = one(module.vpc_baseline_eu-west-2[*].vpc_flow_logs_group)
"eu-west-3" = one(module.vpc_baseline_eu-west-3[*].vpc_flow_logs_group)
"sa-east-1" = one(module.vpc_baseline_sa-east-1[*].vpc_flow_logs_group)
"us-east-1" = one(module.vpc_baseline_us-east-1[*].vpc_flow_logs_group)
"us-east-2" = one(module.vpc_baseline_us-east-2[*].vpc_flow_logs_group)
"us-west-1" = one(module.vpc_baseline_us-west-1[*].vpc_flow_logs_group)
"us-west-2" = one(module.vpc_baseline_us-west-2[*].vpc_flow_logs_group)
} : null
}
output "default_vpc" {
description = "The default VPC."
value = {
"ap-northeast-1" = one(module.vpc_baseline_ap-northeast-1[*].default_vpc)
"ap-northeast-2" = one(module.vpc_baseline_ap-northeast-2[*].default_vpc)
"ap-northeast-3" = one(module.vpc_baseline_ap-northeast-3[*].default_vpc)
"ap-south-1" = one(module.vpc_baseline_ap-south-1[*].default_vpc)
"ap-southeast-1" = one(module.vpc_baseline_ap-southeast-1[*].default_vpc)
"ap-southeast-2" = one(module.vpc_baseline_ap-southeast-2[*].default_vpc)
"ca-central-1" = one(module.vpc_baseline_ca-central-1[*].default_vpc)
"eu-central-1" = one(module.vpc_baseline_eu-central-1[*].default_vpc)
"eu-north-1" = one(module.vpc_baseline_eu-north-1[*].default_vpc)
"eu-west-1" = one(module.vpc_baseline_eu-west-1[*].default_vpc)
"eu-west-2" = one(module.vpc_baseline_eu-west-2[*].default_vpc)
"eu-west-3" = one(module.vpc_baseline_eu-west-3[*].default_vpc)
"sa-east-1" = one(module.vpc_baseline_sa-east-1[*].default_vpc)
"us-east-1" = one(module.vpc_baseline_us-east-1[*].default_vpc)
"us-east-2" = one(module.vpc_baseline_us-east-2[*].default_vpc)
"us-west-1" = one(module.vpc_baseline_us-west-1[*].default_vpc)
"us-west-2" = one(module.vpc_baseline_us-west-2[*].default_vpc)
}
}
output "default_security_group" {
description = "The ID of the default security group."
value = {
"ap-northeast-1" = one(module.vpc_baseline_ap-northeast-1[*].default_security_group)
"ap-northeast-2" = one(module.vpc_baseline_ap-northeast-2[*].default_security_group)
"ap-northeast-3" = one(module.vpc_baseline_ap-northeast-3[*].default_security_group)
"ap-south-1" = one(module.vpc_baseline_ap-south-1[*].default_security_group)
"ap-southeast-1" = one(module.vpc_baseline_ap-southeast-1[*].default_security_group)
"ap-southeast-2" = one(module.vpc_baseline_ap-southeast-2[*].default_security_group)
"ca-central-1" = one(module.vpc_baseline_ca-central-1[*].default_security_group)
"eu-central-1" = one(module.vpc_baseline_eu-central-1[*].default_security_group)
"eu-north-1" = one(module.vpc_baseline_eu-north-1[*].default_security_group)
"eu-west-1" = one(module.vpc_baseline_eu-west-1[*].default_security_group)
"eu-west-2" = one(module.vpc_baseline_eu-west-2[*].default_security_group)
"eu-west-3" = one(module.vpc_baseline_eu-west-3[*].default_security_group)
"sa-east-1" = one(module.vpc_baseline_sa-east-1[*].default_security_group)
"us-east-1" = one(module.vpc_baseline_us-east-1[*].default_security_group)
"us-east-2" = one(module.vpc_baseline_us-east-2[*].default_security_group)
"us-west-1" = one(module.vpc_baseline_us-west-1[*].default_security_group)
"us-west-2" = one(module.vpc_baseline_us-west-2[*].default_security_group)
}
}
output "default_network_acl" {
description = "The default network ACL."
value = {
"ap-northeast-1" = one(module.vpc_baseline_ap-northeast-1[*].default_network_acl)
"ap-northeast-2" = one(module.vpc_baseline_ap-northeast-2[*].default_network_acl)
"ap-northeast-3" = one(module.vpc_baseline_ap-northeast-3[*].default_network_acl)
"ap-south-1" = one(module.vpc_baseline_ap-south-1[*].default_network_acl)
"ap-southeast-1" = one(module.vpc_baseline_ap-southeast-1[*].default_network_acl)
"ap-southeast-2" = one(module.vpc_baseline_ap-southeast-2[*].default_network_acl)
"ca-central-1" = one(module.vpc_baseline_ca-central-1[*].default_network_acl)
"eu-central-1" = one(module.vpc_baseline_eu-central-1[*].default_network_acl)
"eu-north-1" = one(module.vpc_baseline_eu-north-1[*].default_network_acl)
"eu-west-1" = one(module.vpc_baseline_eu-west-1[*].default_network_acl)
"eu-west-2" = one(module.vpc_baseline_eu-west-2[*].default_network_acl)
"eu-west-3" = one(module.vpc_baseline_eu-west-3[*].default_network_acl)
"sa-east-1" = one(module.vpc_baseline_sa-east-1[*].default_network_acl)
"us-east-1" = one(module.vpc_baseline_us-east-1[*].default_network_acl)
"us-east-2" = one(module.vpc_baseline_us-east-2[*].default_network_acl)
"us-west-1" = one(module.vpc_baseline_us-west-1[*].default_network_acl)
"us-west-2" = one(module.vpc_baseline_us-west-2[*].default_network_acl)
}
}
output "default_route_table" {
description = "The default route table."
value = {
"ap-northeast-1" = one(module.vpc_baseline_ap-northeast-1[*].default_route_table)
"ap-northeast-2" = one(module.vpc_baseline_ap-northeast-2[*].default_route_table)
"ap-northeast-3" = one(module.vpc_baseline_ap-northeast-3[*].default_route_table)
"ap-south-1" = one(module.vpc_baseline_ap-south-1[*].default_route_table)
"ap-southeast-1" = one(module.vpc_baseline_ap-southeast-1[*].default_route_table)
"ap-southeast-2" = one(module.vpc_baseline_ap-southeast-2[*].default_route_table)
"ca-central-1" = one(module.vpc_baseline_ca-central-1[*].default_route_table)
"eu-central-1" = one(module.vpc_baseline_eu-central-1[*].default_route_table)
"eu-north-1" = one(module.vpc_baseline_eu-north-1[*].default_route_table)
"eu-west-1" = one(module.vpc_baseline_eu-west-1[*].default_route_table)
"eu-west-2" = one(module.vpc_baseline_eu-west-2[*].default_route_table)
"eu-west-3" = one(module.vpc_baseline_eu-west-3[*].default_route_table)
"sa-east-1" = one(module.vpc_baseline_sa-east-1[*].default_route_table)
"us-east-1" = one(module.vpc_baseline_us-east-1[*].default_route_table)
"us-east-2" = one(module.vpc_baseline_us-east-2[*].default_route_table)
"us-west-1" = one(module.vpc_baseline_us-west-1[*].default_route_table)
"us-west-2" = one(module.vpc_baseline_us-west-2[*].default_route_table)
}
}