File tree Expand file tree Collapse file tree 6 files changed +16
-0
lines changed
environments/skeleton/{{cookiecutter.environment}}/tofu Expand file tree Collapse file tree 6 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ module "compute" {
1818 vnic_types = lookup (each. value , " vnic_types" , var. vnic_types )
1919 volume_backed_instances = lookup (each. value , " volume_backed_instances" , var. volume_backed_instances )
2020 root_volume_size = lookup (each. value , " root_volume_size" , var. root_volume_size )
21+ root_volume_type = lookup (each. value , " root_volume_type" , var. root_volume_type )
2122 gateway_ip = lookup (each. value , " gateway_ip" , var. gateway_ip )
2223 nodename_template = lookup (each. value , " nodename_template" , var. cluster_nodename_template )
2324
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ resource "openstack_compute_instance_v2" "control" {
4848 source_type = " image"
4949 destination_type = var. volume_backed_instances ? " volume" : " local"
5050 volume_size = var. volume_backed_instances ? var. root_volume_size : null
51+ volume_type = var. volume_backed_instances ? var. root_volume_type : null
5152 boot_index = 0
5253 delete_on_termination = true
5354 }
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ module "login" {
1818 vnic_types = lookup (each. value , " vnic_types" , var. vnic_types )
1919 volume_backed_instances = lookup (each. value , " volume_backed_instances" , var. volume_backed_instances )
2020 root_volume_size = lookup (each. value , " root_volume_size" , var. root_volume_size )
21+ root_volume_type = lookup (each. value , " root_volume_type" , var. root_volume_type )
2122 gateway_ip = lookup (each. value , " gateway_ip" , var. gateway_ip )
2223 nodename_template = lookup (each. value , " nodename_template" , var. cluster_nodename_template )
2324
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ resource "openstack_compute_instance_v2" "compute_fixed_image" {
8282 source_type = " image"
8383 destination_type = " volume"
8484 volume_size = var. root_volume_size
85+ volume_type = var. root_volume_type
8586 boot_index = 0
8687 delete_on_termination = true
8788 }
@@ -136,6 +137,7 @@ resource "openstack_compute_instance_v2" "compute" {
136137 source_type = " image"
137138 destination_type = " volume"
138139 volume_size = var. root_volume_size
140+ volume_type = var. root_volume_type
139141 boot_index = 0
140142 delete_on_termination = true
141143 }
Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ variable "root_volume_size" {
4949 default = 40
5050}
5151
52+ variable "root_volume_type" {
53+ type = string
54+ default = null
55+ }
56+
5257variable "extra_volumes" {
5358 description = <<- EOF
5459 Mapping defining additional volumes to create and attach.
Original file line number Diff line number Diff line change @@ -228,6 +228,12 @@ variable "root_volume_size" {
228228 default = 40
229229}
230230
231+ variable "root_volume_type" {
232+ description = " Type of root volume, if using volume backed instances. If unset, the target cloud default volume type is used."
233+ type = string
234+ default = null
235+ }
236+
231237variable "gateway_ip" {
232238 description = " Address to add default route via"
233239 type = string
You can’t perform that action at this time.
0 commit comments