forked from aws-ia/terraform-aws-eks-blueprints-teams
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
45 lines (37 loc) · 1.55 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
################################################################################
# K8s Namespace
################################################################################
output "namespaces" {
description = "Mapf of Kubernetes namespaces created and their attributes"
value = kubernetes_namespace_v1.this
}
################################################################################
# K8s RBAC
################################################################################
output "rbac_group" {
description = "The name of the Kubernetes RBAC group"
value = var.enable_admin ? "system:masters" : var.name
}
output "aws_auth_configmap_role" {
description = "Dictionary containing the necessary details for adding the role created to the `aws-auth` configmap"
value = {
rolearn = try(aws_iam_role.this[0].arn, var.iam_role_arn)
username = var.name
groups = [var.enable_admin ? "system:masters" : var.name]
}
}
################################################################################
# IAM Role
################################################################################
output "iam_role_name" {
description = "The name of the IAM role"
value = try(aws_iam_role.this[0].name, null)
}
output "iam_role_arn" {
description = "The Amazon Resource Name (ARN) specifying the IAM role"
value = try(aws_iam_role.this[0].arn, var.iam_role_arn)
}
output "iam_role_unique_id" {
description = "Stable and unique string identifying the IAM role"
value = try(aws_iam_role.this[0].unique_id, null)
}