-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
90 lines (77 loc) · 1.76 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
locals {
kubeconfig = <<KUBECONFIG
apiVersion: v1
clusters:
- cluster:
server: ${aws_eks_cluster.rakam.endpoint}
certificate-authority-data: ${aws_eks_cluster.rakam.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.cluster-name}"
KUBECONFIG
}
output "kubeconfig" {
value = "${local.kubeconfig}"
sensitive = true
}
# Required Kubernetes Configuration to Join Worker Nodes
locals {
config_map_aws_auth = <<CONFIGMAPAWSAUTH
apiVersion: v1
kind: ConfigMap
metadata:
name: aws-auth
namespace: kube-system
data:
mapRoles: |
- rolearn: ${aws_iam_role.rakam-node.arn}
username: system:node:{{EC2PrivateDNSName}}
groups:
- system:bootstrappers
- system:nodes
CONFIGMAPAWSAUTH
}
output "config_map_aws_auth" {
value = "${local.config_map_aws_auth}"
sensitive = true
}
# Kinesis stream name
output "kinesis_stream_name" {
value = "${aws_kinesis_stream.rakamstream.name}"
}
# S3
output "s3_bucket_name" {
value = "${aws_s3_bucket.rakams3.bucket_domain_name}"
}
# RDS
output "mysql_endpoint" {
value = "${aws_db_instance.rakammysql.endpoint}"
}
# NLB
output "nlb-hostname" {
description = "Set this CNAME pointing to your domain, verified via ACM"
value = "${kubernetes_service.loadbalancer-nlb.load_balancer_ingress.0.hostname}"
}
# Snowflake
output "snowflake-iam-key-id" {
value = "${aws_iam_access_key.snowflake-user.id}"
}
output "snowflake-iam-key-secret" {
value = "${aws_iam_access_key.snowflake-user.secret}"
}