-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsecrets.tf
48 lines (42 loc) · 799 Bytes
/
secrets.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
resource "kubernetes_secret" "postgres_password" {
metadata {
name = "postgres-password"
labels = {
role = "deployment"
}
}
data = {
password = var.postgres_password
}
}
resource "kubernetes_secret" "django_secret_key" {
metadata {
name = "django-secret-key"
labels = {
role = "deployment"
}
}
data = {
secret_key = var.django_secret_key
}
}
resource "kubernetes_secret" "dockerhub_cred" {
metadata {
name = "dockerhub-cred"
labels = {
role = "deployment"
}
}
data = {
".dockerconfigjson" = <<DOCKER
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "${base64encode("${var.dockerhub_username}:${var.dockerhub_password}")}"
}
}
}
DOCKER
}
type = "kubernetes.io/dockerconfigjson"
}