-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
48 lines (40 loc) · 1.49 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
48
data "rancher2_cluster_v2" "rancher_cluster" {
name = "local"
fleet_namespace = "fleet-local"
}
data "rancher2_cluster_v2" "harvesterkvm" {
name = var.harvester_name
fleet_namespace = "fleet-default"
}
module "guest_cluster" {
providers = {
rancher2 = rancher2
}
source = "./modules/guest_cluster"
rancher_api_url = var.rancher_api_url
rancher_access_key = var.rancher_access_key
rancher_secret_key = var.rancher_secret_key
cluster_name = "local-test"
rke2_version = var.rke2_version
harvester_cloud_credential_id = rancher2_cloud_credential.harvesterkvm.id
network_name = "harvester-public/vlan1"
image_name = var.image_name
}
module "guest_cluster_harvester_cloud_provider" {
providers = {
rancher2 = rancher2
}
source = "./modules/guest_cluster_harvester_cloud_provider"
rancher_api_url = var.rancher_api_url
rancher_access_key = var.rancher_access_key
rancher_secret_key = var.rancher_secret_key
cluster_name = "test-local-6"
rke2_version = var.rke2_version
harvester_cloud_credential_id = rancher2_cloud_credential.harvesterkvm.id
network_name = "harvester-public/vlan1"
image_name = var.image_name
}
# for testing output
# output "example_output" {
# value = module.guest_cluster.cloud_provider_config_content
# }