cli: configurable state disk type on OpenStack (#1686)

This commit is contained in:
Malte Poll 2023-04-27 09:08:43 +02:00 committed by GitHub
parent ec1d5e9fb5
commit c11a3f4460
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 60 additions and 35 deletions

View file

@ -169,6 +169,7 @@ module "instance_group_control_plane" {
tags = local.tags
uid = local.uid
disk_size = var.state_disk_size
state_disk_type = var.state_disk_type
availability_zone = var.availability_zone
network_id = openstack_networking_network_v2.vpc_network.id
init_secret_hash = local.initSecretHash
@ -189,6 +190,7 @@ module "instance_group_worker" {
uid = local.uid
security_groups = [openstack_compute_secgroup_v2.vpc_secgroup.id]
disk_size = var.state_disk_size
state_disk_type = var.state_disk_type
availability_zone = var.availability_zone
network_id = openstack_networking_network_v2.vpc_network.id
init_secret_hash = local.initSecretHash

View file

@ -44,6 +44,7 @@ resource "openstack_compute_instance_v2" "instance_group_member" {
source_type = "blank"
destination_type = "volume"
volume_size = var.disk_size
volume_type = var.state_disk_type
boot_index = 1
delete_on_termination = true
}

View file

@ -47,6 +47,11 @@ variable "disk_size" {
description = "Disk size for the nodes, in GiB."
}
variable "state_disk_type" {
type = string
description = "Disk/volume type to be used."
}
variable "availability_zone" {
type = string
description = "The availability zone to deploy the nodes in."

View file

@ -26,6 +26,11 @@ variable "state_disk_size" {
description = "The size of the state disk in GB."
}
variable "state_disk_type" {
type = string
description = "Disk/volume type to be used."
}
variable "availability_zone" {
type = string
description = "The availability zone to deploy the nodes in."