forked from Young-ook/terraform-aws-spinnaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathx509.tf
21 lines (18 loc) · 779 Bytes
/
x509.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# x509 certificates for spinnaker cli and helm/tiller communication
# x509 certificates authority
data "template_file" "x509" {
template = file(format("%s/resources/x509.tpl", path.module))
vars = {
country = lookup(var.x509_prop, "country", "KR")
state = lookup(var.x509_prop, "state", "ICN")
location = lookup(var.x509_prop, "location", "ICN")
organization = lookup(var.x509_prop, "organization", "ORG")
common_name = lookup(var.x509_prop, "common_name", "[email protected]")
groups = lookup(var.x509_prop, "groups", "admin")
}
}
resource "local_file" "gen-x509-ca" {
content = data.template_file.x509.rendered
filename = format("%s/%s/x509.sh", path.cwd, local.cluster-name)
file_permission = "0600"
}