-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
45 lines (37 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
41
42
43
44
45
# Get some public IPs to use for our load balancer
variable "project_id" {
description = "packet project id (e.g. 405efe9c-cce9-4c71-87c1-949c290b27dc)"
}
variable "facility" {
type = string
description = "Packet facility to deploy the cluster in"
}
variable "kubeconfig_path" {
default = "~/.kube/config"
description = "which kubeconfig(-admin) file to use"
}
variable "calicoctl" {
# default = intentionally left blank as a form of local state validation.
# https://docs.projectcalico.org/v3.9/getting-started/calicoctl/install#installing-calicoctl-as-a-binary-on-a-single-host
description = "path to locally installed calicoctl"
}
variable "kubectl" {
# default = intentionally left blank as a form of local state validation.
# make sure to install kubectl
# https://kubernetes.io/docs/tasks/tools/install-kubectl/
description = "path to locally installed kubectl"
}
variable "worker_nodes_hostname" {
# example: module.worker-pool-helium.worker_nodes_hostname
description = "which worker nodes to add to calico BGPPeer configuration"
}
# Simple script
resource "null_resource" "wait_for_kubernetes" {
provisioner "local-exec" {
command = "${path.module}/scripts/wait-for-kubernetes.sh"
environment = {
KUBECTL = var.kubectl
KUBECONFIG = var.kubeconfig_path
}
}
}