From f2d2d080f61b9ca83fe4fc06c677fa8f22abc8e0 Mon Sep 17 00:00:00 2001 From: rptaylor Date: Tue, 18 Aug 2020 00:49:29 -0700 Subject: [PATCH] add master_volume_type variable (#6524) --- contrib/terraform/openstack/kubespray.tf | 1 + contrib/terraform/openstack/modules/compute/main.tf | 4 ++++ contrib/terraform/openstack/modules/compute/variables.tf | 2 ++ contrib/terraform/openstack/variables.tf | 4 ++++ 4 files changed, 11 insertions(+) diff --git a/contrib/terraform/openstack/kubespray.tf b/contrib/terraform/openstack/kubespray.tf index dda3bf201..15dafa7f5 100644 --- a/contrib/terraform/openstack/kubespray.tf +++ b/contrib/terraform/openstack/kubespray.tf @@ -51,6 +51,7 @@ module "compute" { node_root_volume_size_in_gb = var.node_root_volume_size_in_gb gfs_root_volume_size_in_gb = var.gfs_root_volume_size_in_gb gfs_volume_size_in_gb = var.gfs_volume_size_in_gb + master_volume_type = var.master_volume_type public_key_path = var.public_key_path image = var.image image_gfs = var.image_gfs diff --git a/contrib/terraform/openstack/modules/compute/main.tf b/contrib/terraform/openstack/modules/compute/main.tf index 3e3238a3e..e91316c43 100644 --- a/contrib/terraform/openstack/modules/compute/main.tf +++ b/contrib/terraform/openstack/modules/compute/main.tf @@ -167,6 +167,7 @@ resource "openstack_compute_instance_v2" "k8s_master" { uuid = data.openstack_images_image_v2.vm_image.id source_type = "image" volume_size = var.master_root_volume_size_in_gb + volume_type = var.master_volume_type boot_index = 0 destination_type = "volume" delete_on_termination = true @@ -215,6 +216,7 @@ resource "openstack_compute_instance_v2" "k8s_master_no_etcd" { uuid = data.openstack_images_image_v2.vm_image.id source_type = "image" volume_size = var.master_root_volume_size_in_gb + volume_type = var.master_volume_type boot_index = 0 destination_type = "volume" delete_on_termination = true @@ -303,6 +305,7 @@ resource "openstack_compute_instance_v2" "k8s_master_no_floating_ip" { uuid = data.openstack_images_image_v2.vm_image.id source_type = "image" volume_size = var.master_root_volume_size_in_gb + volume_type = var.master_volume_type boot_index = 0 destination_type = "volume" delete_on_termination = true @@ -346,6 +349,7 @@ resource "openstack_compute_instance_v2" "k8s_master_no_floating_ip_no_etcd" { uuid = data.openstack_images_image_v2.vm_image.id source_type = "image" volume_size = var.master_root_volume_size_in_gb + volume_type = var.master_volume_type boot_index = 0 destination_type = "volume" delete_on_termination = true diff --git a/contrib/terraform/openstack/modules/compute/variables.tf b/contrib/terraform/openstack/modules/compute/variables.tf index 608cafe4a..1a16a3c4a 100644 --- a/contrib/terraform/openstack/modules/compute/variables.tf +++ b/contrib/terraform/openstack/modules/compute/variables.tf @@ -38,6 +38,8 @@ variable "gfs_root_volume_size_in_gb" {} variable "gfs_volume_size_in_gb" {} +variable "master_volume_type" {} + variable "public_key_path" {} variable "image" {} diff --git a/contrib/terraform/openstack/variables.tf b/contrib/terraform/openstack/variables.tf index 6976929c4..c6c28f672 100644 --- a/contrib/terraform/openstack/variables.tf +++ b/contrib/terraform/openstack/variables.tf @@ -74,6 +74,10 @@ variable "gfs_volume_size_in_gb" { default = 75 } +variable "master_volume_type" { + default = "Default" +} + variable "public_key_path" { description = "The path of the ssh pub key" default = "~/.ssh/id_rsa.pub"