-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcluster.tf
32 lines (28 loc) · 1.03 KB
/
cluster.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
resource "scaleway_vpc_private_network" "qdrant-hybrid-cloud" {
name = "${var.prefix}-qdrant-hybrid-cloud"
vpc_id = scaleway_vpc.qdrant-hybrid-cloud.id
ipv4_subnet {
subnet = var.subnet_cidr
}
}
resource "scaleway_vpc" "qdrant-hybrid-cloud" {
name = "${var.prefix}-qdrant-hybrid-cloud"
}
resource "scaleway_k8s_cluster" "cluster" {
name = "${var.prefix}-qdrant-hybrid-cloud"
version = var.kubernetes_version
cni = "cilium"
private_network_id = scaleway_vpc_private_network.qdrant-hybrid-cloud.id
delete_additional_resources = true
depends_on = [scaleway_vpc_private_network.qdrant-hybrid-cloud]
}
resource "scaleway_k8s_pool" "node_pool" {
cluster_id = scaleway_k8s_cluster.cluster.id
name = "${var.prefix}-qdrant-hybrid-cloud"
node_type = var.node_type
size = var.pool_size
}
resource "local_file" "kubeconfig" {
content = scaleway_k8s_cluster.cluster.kubeconfig[0].config_file
filename = "kubeconfig"
}