-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
41 lines (38 loc) · 1.31 KB
/
main.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
/*
// todo: fixme - refactor to zone or check with terraform-data
resource "cloudflare_record" "sks_record" {
zone_id = local.cloudflare_zone_id
name = "${var.subdomain}-${local.env_name}"
value = "${local.env_name}.${local.domain}"
type = "CNAME"
ttl = 1
proxied = true
}
*/
resource "cloudflare_record" "sks_record_env" {
zone_id = local.cloudflare_zone_id
name = "${var.subdomain}-${var.zone}-${local.env_name}"
value = "${var.zone}-${local.env_name}.${local.domain}"
type = "CNAME"
ttl = 1
proxied = true
}
module "deployment" {
source = "devops-wien/deployment/kubernetes"
version = "0.0.14"
# source = "../terraform-kubernetes-deployment"
client_certificate = local.client_certificate
client_key = local.client_key
cluster_ca_certificate = local.cluster_ca_certificate
host = local.host
dns_names = [
"${var.subdomain}-${local.env_name}.${local.domain}",
"${var.subdomain}-${var.zone}-${local.env_name}.${local.domain}"
]
image = var.image
target_port = var.target_port
zone = var.zone
name = var.subdomain
env_name = local.env_name
deployment_strategy = local.deployment_strategy
}