-
Notifications
You must be signed in to change notification settings - Fork 0
/
output.tf
74 lines (69 loc) · 1.59 KB
/
output.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
# outputs
locals {
kubeconfig = <<KUBECONFIG
apiVersion: v1
clusters:
- cluster:
<<<<<<< HEAD
server: ${aws_eks_cluster.earnest-eks-cluster.endpoint}
certificate-authority-data: ${aws_eks_cluster.earnest-eks-cluster.certificate_authority.0.data}
=======
server: ${aws_eks_cluster.demo.endpoint}
certificate-authority-data: ${aws_eks_cluster.demo.certificate_authority.0.data}
>>>>>>> 5dc3eb4643346f9b444b0bb50ece321158145b55
name: kubernetes
contexts:
- context:
cluster: kubernetes
user: aws
name: aws
current-context: aws
kind: Config
preferences: {}
users:
- name: aws
user:
exec:
apiVersion: client.authentication.k8s.io/v1alpha1
<<<<<<< HEAD
command: heptio-authenticator-aws
args:
- "token"
- "-i"
- "${var.earnest-eks-cluster-name}"
=======
command: aws-iam-authenticator
args:
- "token"
- "-i"
- "${var.cluster-name}"
>>>>>>> 5dc3eb4643346f9b444b0bb50ece321158145b55
KUBECONFIG
}
output "kubeconfig" {
value = "${local.kubeconfig}"
}
# Join configuration
locals {
config-map-aws-auth = <<CONFIGMAPAWSAUTH
apiVersion: v1
kind: ConfigMap
metadata:
name: aws-auth
namespace: kube-system
data:
mapRoles: |
<<<<<<< HEAD
- rolearn: ${aws_iam_role.earnest-eks-node.arn}
=======
- rolearn: ${aws_iam_role.demo-node.arn}
>>>>>>> 5dc3eb4643346f9b444b0bb50ece321158145b55
username: system:node:{{EC2PrivateDNSName}}
groups:
- system:bootstrappers
- system:nodes
CONFIGMAPAWSAUTH
}
output "config-map-aws-auth" {
value = "${local.config-map-aws-auth}"
}