-
Notifications
You must be signed in to change notification settings - Fork 5
/
outputs.tf
75 lines (61 loc) · 1.39 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
#
# Outputs
#
locals {
config_map_aws_auth = <<CONFIGMAPAWSAUTH
apiVersion: v1
kind: ConfigMap
metadata:
name: aws-auth
namespace: kube-system
data:
mapRoles: |
- rolearn: ${aws_iam_role.thegraph-node.arn}
username: system:node:{{EC2PrivateDNSName}}
groups:
- system:bootstrappers
- system:nodes
CONFIGMAPAWSAUTH
kubeconfig = <<KUBECONFIG
apiVersion: v1
clusters:
- cluster:
server: ${aws_eks_cluster.thegraph.endpoint}
certificate-authority-data: ${aws_eks_cluster.thegraph.certificate_authority[0].data}
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
command: aws-iam-authenticator
args:
- "token"
- "-i"
- "${var.eks_cluster_name}"
KUBECONFIG
Public_IPS = <<IPS
IPs assigned to NAT Gateways that should be added in specific firewalls that protects ETH endpoints, other resources:
${aws_nat_gateway.eks_network_nat_gateway.0.public_ip}
${aws_nat_gateway.eks_network_nat_gateway.1.public_ip}
Postgresql DB instance:
${aws_db_instance.graph_postgres.address}
IPS
}
output "config_map_aws_auth" {
value = local.config_map_aws_auth
}
output "kubeconfig" {
value = local.kubeconfig
}
output "Public_IPS" {
value = local.Public_IPS
}