-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path03-rancher.tf
45 lines (38 loc) · 905 Bytes
/
03-rancher.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
locals {
full_domain = join(".", [var.domain.subdomain, module.cloud.ip_addresses[0], var.domain.domain])
}
provider "rancher2" {
alias = "bootstrap"
api_url = "https://${local.full_domain}"
insecure = true
bootstrap = true
}
provider "rancher2" {
alias = "admin"
api_url = module.rancher.admin_url
token_key = module.rancher.admin_token
insecure = true
}
module "rancher" {
source = "./modules/rancher"
depends_on = [
module.rke
]
providers = {
rancher2.bootstrap = rancher2.bootstrap
rancher2.admin = rancher2.admin
}
rancher_domain = local.full_domain
}
module "rancher-extra" {
source = "./modules/rancher-extra"
depends_on = [
module.rke
]
providers = {
rancher2.admin = rancher2.admin
}
ssh_key_pair = module.cloud.test_keypair
cloud_extra_cluster = var.cloud_extra_cluster
prefix = var.prefix
}