-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathsecrets.hcl
37 lines (31 loc) · 1.15 KB
/
secrets.hcl
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
{{- $environments := .Values.environments -}}
{{- $services := .Values.services -}}
{{- $regions := .Values.regions -}}
{{ range $region := $regions -}}
package "platform/production/security/{{ $region }}/database/postgres/billing/admin_acccount" {
description = "Administrative access for database management."
annotations = {
"infosec.elastic.co/v1/SecretManagement#rotationPeriod" = "90"
"infosec.elastic.co/v1/SecretManagement#generationDate" = "{{ now | isodate }}"
}
secrets = {
"PASSWORD" = "{{ strongPassword | b64enc }}"
"USER" = "admin-{{ randAlpha 8 }}"
}
}
{{- range $quality := $environments -}}
{{- range $srv := $services }}
package "app/{{ $quality }}/security/{{ $region }}/database/postgres/{{ $srv }}/usage_account" {
description = "{{ $srv }} usage account."
annotations = {
"infosec.elastic.co/v1/SecretManagement#rotationPeriod" = "30"
"infosec.elastic.co/v1/SecretManagement#generationDate" = "{{ now | isodate }}"
}
secrets = {
"PASSWORD" = "{{ strongPassword | b64enc }}"
"USER" = "{{ $srv }}-{{ randAlpha 8 }}"
}
}
{{ end }}
{{ end }}
{{ end }}