-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
43 lines (40 loc) · 1.74 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
module "cluster" {
source = "git::https://github.com/nimbolus/tf-k3s-cluster?ref=v0.8.1"
cluster_name = var.rancher_name
cluster_availability_zone = var.cluster_availability_zone
cluster_servers = var.cluster_size
cluster_image_name = var.cluster_image_name
cluster_image_id = var.cluster_image_id
cluster_image_scsi_bus = var.cluster_image_scsi_bus
cluster_flavor_name = var.cluster_flavor_name
cluster_data_volume_type = var.cluster_data_volume_type
cluster_data_volume_size = var.cluster_data_volume_size
cluster_key_pair = var.cluster_key_pair
cluster_server_group_policy = var.cluster_server_group_policy
cluster_floating_ip_pool = var.cluster_floating_ip_pool
cluster_server1_floating_ip = var.cluster_server1_floating_ip
cluster_servers_floating_ip = var.cluster_servers_floating_ip
cluster_network_id = var.cluster_network_id
cluster_subnet_id = var.cluster_subnet_id
cluster_instance_properties = var.cluster_instance_properties
cluster_k3s_version = var.cluster_k3s_version
cluster_k3s_channel = var.cluster_k3s_channel
}
resource "openstack_networking_secgroup_rule_v2" "http" {
direction = "ingress"
ethertype = "IPv4"
protocol = "tcp"
port_range_min = 80
port_range_max = 80
remote_ip_prefix = var.rancher_ip_whitelist
security_group_id = module.cluster.secgroup_id
}
resource "openstack_networking_secgroup_rule_v2" "https" {
direction = "ingress"
ethertype = "IPv4"
protocol = "tcp"
port_range_min = 443
port_range_max = 443
remote_ip_prefix = var.rancher_ip_whitelist
security_group_id = module.cluster.secgroup_id
}