generated from aws-ia/terraform-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 126
/
outputs.tf
284 lines (253 loc) · 10.5 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
output "argo_rollouts" {
description = "Map of attributes of the Helm release created"
value = module.argo_rollouts
}
output "argo_workflows" {
description = "Map of attributes of the Helm release created"
value = module.argo_workflows
}
output "argocd" {
description = "Map of attributes of the Helm release created"
value = module.argocd
}
output "argo_events" {
description = "Map of attributes of the Helm release created"
value = module.argo_events
}
output "aws_cloudwatch_metrics" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.aws_cloudwatch_metrics
}
output "aws_efs_csi_driver" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.aws_efs_csi_driver
}
output "aws_for_fluentbit" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.aws_for_fluentbit
}
output "aws_fsx_csi_driver" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.aws_fsx_csi_driver
}
output "aws_load_balancer_controller" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.aws_load_balancer_controller
}
output "aws_node_termination_handler" {
description = "Map of attributes of the Helm release and IRSA created"
value = merge(
module.aws_node_termination_handler,
{
sqs = module.aws_node_termination_handler_sqs
}
)
}
output "aws_privateca_issuer" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.aws_privateca_issuer
}
output "cert_manager" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.cert_manager
}
output "cluster_autoscaler" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.cluster_autoscaler
}
output "cluster_proportional_autoscaler" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.cluster_proportional_autoscaler
}
output "eks_addons" {
description = "Map of attributes for each EKS addons enabled"
value = aws_eks_addon.this
}
output "external_dns" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.external_dns
}
output "external_secrets" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.external_secrets
}
output "fargate_fluentbit" {
description = "Map of attributes of the configmap and IAM policy created"
value = {
configmap = kubernetes_config_map_v1.aws_logging
iam_policy = aws_iam_policy.fargate_fluentbit
cloudwatch_log_group = aws_cloudwatch_log_group.fargate_fluentbit
}
}
output "gatekeeper" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.gatekeeper
}
output "ingress_nginx" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.ingress_nginx
}
output "karpenter" {
description = "Map of attributes of the Helm release and IRSA created"
value = merge(
module.karpenter,
{
node_instance_profile_name = try(aws_iam_instance_profile.karpenter[0].name, "")
node_iam_role_arn = try(aws_iam_role.karpenter[0].arn, "")
node_iam_role_name = try(aws_iam_role.karpenter[0].name, "")
sqs = module.karpenter_sqs
}
)
}
output "kube_prometheus_stack" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.kube_prometheus_stack
}
output "metrics_server" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.metrics_server
}
output "secrets_store_csi_driver" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.secrets_store_csi_driver
}
output "secrets_store_csi_driver_provider_aws" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.secrets_store_csi_driver_provider_aws
}
output "velero" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.velero
}
output "vpa" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.vpa
}
output "aws_gateway_api_controller" {
description = "Map of attributes of the Helm release and IRSA created"
value = module.aws_gateway_api_controller
}
output "bottlerocket_update_operator" {
description = "Map of attributes of the Helm release and IRSA created"
value = {
operator = module.bottlerocket_update_operator
crds = module.bottlerocket_shadow
}
}
################################################################################
# (Generic) Helm Release
################################################################################
output "helm_releases" {
description = "Map of attributes of the Helm release created"
value = helm_release.this
}
################################################################################
# GitOps Bridge
################################################################################
/*
This output is intended to be used with GitOps when the addons' Helm charts
are going to be installed by a GitOps tool such as ArgoCD or FluxCD.
We guarantee that this output will be maintained any time a new addon is
added or an addon is updated, and new metadata for the Helm chart is needed.
*/
output "gitops_metadata" {
description = "GitOps Bridge metadata"
value = merge(
{ for k, v in {
iam_role_arn = module.cert_manager.iam_role_arn
namespace = local.cert_manager_namespace
service_account = local.cert_manager_service_account
} : "cert_manager_${k}" => v if var.enable_cert_manager
},
{ for k, v in {
iam_role_arn = module.cluster_autoscaler.iam_role_arn
namespace = local.cluster_autoscaler_namespace
service_account = local.cluster_autoscaler_service_account
} : "cluster_autoscaler_${k}" => v if var.enable_cluster_autoscaler
},
{ for k, v in {
iam_role_arn = module.aws_cloudwatch_metrics.iam_role_arn
namespace = local.aws_cloudwatch_metrics_namespace
service_account = local.aws_cloudwatch_metrics_service_account
} : "aws_cloudwatch_metrics_${k}" => v if var.enable_aws_cloudwatch_metrics
},
{ for k, v in {
iam_role_arn = module.aws_efs_csi_driver.iam_role_arn
namespace = local.aws_efs_csi_driver_namespace
controller_service_account = local.aws_efs_csi_driver_controller_service_account
node_service_account = local.aws_efs_csi_driver_node_service_account
} : "aws_efs_csi_driver_${k}" => v if var.enable_aws_efs_csi_driver
},
{ for k, v in {
iam_role_arn = module.aws_fsx_csi_driver.iam_role_arn
namespace = local.aws_fsx_csi_driver_namespace
controller_service_account = local.aws_fsx_csi_driver_controller_service_account
node_service_account = local.aws_fsx_csi_driver_node_service_account
} : "aws_fsx_csi_driver_${k}" => v if var.enable_aws_fsx_csi_driver
},
{ for k, v in {
iam_role_arn = module.aws_privateca_issuer.iam_role_arn
namespace = local.aws_privateca_issuer_namespace
service_account = local.aws_privateca_issuer_service_account
} : "aws_privateca_issuer_${k}" => v if var.enable_aws_privateca_issuer
},
{ for k, v in {
iam_role_arn = module.external_dns.iam_role_arn
namespace = local.external_dns_namespace
service_account = local.external_dns_service_account
} : "external_dns_${k}" => v if var.enable_external_dns
},
{ for k, v in {
iam_role_arn = module.external_secrets.iam_role_arn
namespace = local.external_secrets_namespace
service_account = local.external_secrets_service_account
} : "external_secrets_${k}" => v if var.enable_external_secrets
},
{ for k, v in {
iam_role_arn = module.aws_load_balancer_controller.iam_role_arn
namespace = local.aws_load_balancer_controller_namespace
service_account = local.aws_load_balancer_controller_service_account
} : "aws_load_balancer_controller_${k}" => v if var.enable_aws_load_balancer_controller
},
{ for k, v in {
iam_role_arn = module.aws_for_fluentbit.iam_role_arn
namespace = local.aws_for_fluentbit_namespace
service_account = local.aws_for_fluentbit_service_account
log_group_name = try(aws_cloudwatch_log_group.aws_for_fluentbit[0].name, null)
} : "aws_for_fluentbit_${k}" => v if var.enable_aws_for_fluentbit && v != null
},
{ for k, v in {
iam_role_arn = module.aws_node_termination_handler.iam_role_arn
namespace = local.aws_node_termination_handler_namespace
service_account = local.aws_node_termination_handler_service_account
sqs_queue_url = module.aws_node_termination_handler_sqs.queue_url
} : "aws_node_termination_handler_${k}" => v if var.enable_aws_node_termination_handler
},
{ for k, v in {
iam_role_arn = module.karpenter.iam_role_arn
namespace = local.karpenter_namespace
service_account = local.karpenter_service_account_name
sqs_queue_name = module.karpenter_sqs.queue_name
node_instance_profile_name = local.output_karpenter_node_instance_profile_name
node_iam_role_name = try(aws_iam_role.karpenter[0].name, "")
} : "karpenter_${k}" => v if var.enable_karpenter
},
{ for k, v in {
iam_role_arn = module.velero.iam_role_arn
namespace = local.velero_namespace
service_account = local.velero_service_account
} : "velero_${k}" => v if var.enable_velero
},
{ for k, v in {
iam_role_arn = module.aws_gateway_api_controller.iam_role_arn
namespace = local.aws_gateway_api_controller_namespace
service_account = local.aws_gateway_api_controller_service_account
} : "aws_gateway_api_controller_${k}" => v if var.enable_aws_gateway_api_controller
},
{ for k, v in {
group_name = try(var.fargate_fluentbit.cwlog_group, aws_cloudwatch_log_group.fargate_fluentbit[0].name, null)
stream_prefix = local.fargate_fluentbit_cwlog_stream_prefix
} : "fargate_fluentbit_log_${k}" => v if var.enable_fargate_fluentbit && v != null
}
)
}