added pgcluster tf files
This commit is contained in:
parent
832fbd5f3e
commit
929c767c6a
2 changed files with 33 additions and 0 deletions
23
pgcluster.tf
Normal file
23
pgcluster.tf
Normal file
|
@ -0,0 +1,23 @@
|
|||
resource "openstack_compute_instance_v2" "pg-nodes" {
|
||||
count = var.pgcluster_instance_count
|
||||
name = "${var.pgcluster_name}-${count.index}.${var.dns_suffix}"
|
||||
flavor_name = "${var.pgcluster_instance_type}"
|
||||
key_pair = "thorslund"
|
||||
security_groups = ["https", "microk8s", "Allow SSH from SUNET jumphosts"]
|
||||
|
||||
|
||||
block_device {
|
||||
uuid = "5d24aca9-11be-4de1-9770-4a097d68f361"
|
||||
source_type = "image"
|
||||
volume_size = 20
|
||||
boot_index = 0
|
||||
destination_type = "volume"
|
||||
delete_on_termination = true
|
||||
}
|
||||
scheduler_hints {
|
||||
group = openstack_compute_servergroup_v2.controllers.id
|
||||
}
|
||||
network {
|
||||
name = "public"
|
||||
}
|
||||
}
|
10
vars.tf
10
vars.tf
|
@ -4,6 +4,9 @@ variable "worker_instance_count" {
|
|||
variable "controller_instance_count" {
|
||||
default = "3"
|
||||
}
|
||||
variable "pgcluster_instance_count" {
|
||||
default = "3"
|
||||
}
|
||||
|
||||
variable "controller_instance_type" {
|
||||
default = "b2.c2r4"
|
||||
|
@ -20,6 +23,13 @@ variable "worker_name" {
|
|||
variable "controller_name" {
|
||||
default = "internal-sto4-prod-k8sc"
|
||||
}
|
||||
variable "pgcluster_name" {
|
||||
default = "internal-sto4-prod-k8spg"
|
||||
}
|
||||
variable "pgcluster_instance_type"{
|
||||
default = "b2.c2r8"
|
||||
}
|
||||
|
||||
variable "dns_suffix" {
|
||||
default = "rut.sunet.se"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue