-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
73 lines (59 loc) · 1.56 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
locals {
west_region = "jp-west-1"
west_az = "west-11"
instance_key_name = "deployerkey"
instance_type_bn = "e-medium"
instance_type_px = "e-medium"
instance_type_cp = "e-medium"
instance_type_wk = "e-medium"
private_network_cidr = "192.168.10.0/24"
instances_cp = {
"cp01" : { private_ip : "192.168.10.13/24" }
}
instances_wk = {
"wk01" : { private_ip : "192.168.10.23/24" }
"wk02" : { private_ip : "192.168.10.24/24" }
}
private_ip_bn = "192.168.10.12/24"
private_ip_px = "192.168.10.13/24"
}
#####
# Provider
#
provider "nifcloud" {
region = local.west_region
}
#####
# Elastic IP
#
# elastic ip
resource "nifcloud_elastic_ip" "bn" {
ip_type = false
availability_zone = local.west_az
description = "bastion"
}
resource "nifcloud_elastic_ip" "px" {
ip_type = false
availability_zone = local.west_az
description = "egress"
}
#####
# Module
#
module "k8s_infrastructure" {
source = "../../"
availability_zone = local.west_az
prefix = "dev"
private_network_cidr = local.private_network_cidr
instance_key_name = local.instance_key_name
instances_cp = local.instances_cp
instances_wk = local.instances_wk
elasticip_bn = nifcloud_elastic_ip.bn.public_ip
elasticip_px = nifcloud_elastic_ip.px.public_ip
instance_type_bn = local.instance_type_bn
instance_type_px = local.instance_type_px
instance_type_cp = local.instance_type_cp
instance_type_wk = local.instance_type_wk
private_ip_bn = local.private_ip_bn
private_ip_px = local.private_ip_px
}