forked from drpebcak/terraform-rancher-workload-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
47 lines (42 loc) · 2.06 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
41
42
43
44
45
46
47
terraform {
required_version = ">= 0.12"
}
locals {
name = var.name
aws_region = var.aws_region
master_instance_type = var.master_instance_type
worker_instance_type = var.worker_instance_type
master_node_count = var.master_node_count
master_volume_type = var.master_volume_type
worker_node_count = var.worker_node_count
worker_volume_type = var.worker_volume_type
ssh_keys = var.ssh_keys
cluster_description = var.cluster_description
kubernetes_version = var.kubernetes_version
cloud_provider_name = var.cloud_provider_name
backup_interval_hours = var.backup_interval_hours
backup_retention = var.backup_retention
rancher_token_key = var.rancher_token_key
rancher_api_url = var.rancher_api_url
rancher_deploy_user = var.rancher_deploy_user
private_subnets = var.private_subnets
deploy_user_enabled = var.deploy_user_enabled ? 1 : 0
vpc_id = var.vpc_id
extra_master_security_groups = var.extra_master_security_groups
extra_worker_security_groups = var.extra_worker_security_groups
scheduler_extra_args = var.scheduler_extra_args
kube_controller_extra_args = var.kube_controller_extra_args
kube_api_extra_args = var.kube_api_extra_args
kubelet_extra_args = var.kubelet_extra_args
ingress_provider = var.ingress_provider
cluster_cidr = var.cluster_cidr
service_cluster_ip_range = var.service_cluster_ip_range
cluster_dns_server = var.cluster_dns_server
master_tags = merge({ Name = "${local.name}-master", "kubernetes.io/cluster/${local.name}" = "owned" }, var.master_tags)
worker_tags = merge({ Name = "${local.name}-worker", "kubernetes.io/cluster/${local.name}" = "owned" }, var.worker_tags)
upgrade_drain = var.upgrade_drain
upgrade_max_unavailable_worker = var.upgrade_max_unavailable_worker
drain_delete_local_data = var.drain_delete_local_data
drain_force = var.drain_force
drain_timeout = var.drain_timeout
}