-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.tf
36 lines (31 loc) · 913 Bytes
/
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
terraform {
required_providers {
linode = {
source = "linode/linode"
version = "2.25.0"
}
}
}
# Configure the Linode Provider
provider "linode" {
token = var.akamai_api_token
}
# Create an LKE cluster for running the wasmCloud cluster
resource "linode_lke_cluster" "wasmcloud" {
label = "wasmcloud"
k8s_version = "1.30"
region = var.lke_region
tags = ["wasmcloud"]
pool {
type = var.lke_instance_type
count = 3
}
}
# This is the kubeconfig you can use for interacting with the LKE cluster,
# please note that it's needed by the commands listed in the helm.tf file for
# the purposes of deploying the wasmCloud cluster inside of LKE.
resource "local_file" "kubeconfig" {
content = base64decode(linode_lke_cluster.wasmcloud.kubeconfig)
filename = "${path.module}/kubeconfig"
}
# From here on, k8s.tf will take over the