File tree Expand file tree Collapse file tree 7 files changed +16
-5
lines changed
environments/skeleton/{{cookiecutter.environment}}/tofu Expand file tree Collapse file tree 7 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -157,11 +157,6 @@ compute = {
157
157
}
158
158
```
159
159
160
- If there is no default route at all (either from a subnet gateway or from
161
- ` gateway_ip ` ) then a dummy route is created via the access network interface to
162
- ensure [ correct] ( https://docs.k3s.io/installation/airgap#default-network-route )
163
- ` k3s ` operation.
164
-
165
160
When using a subnet with no default gateway, OpenStack's nameserver for the
166
161
subnet may refuse lookups. External nameservers can be defined using the
167
162
[ resolv_conf] ( ../ansible/roles/resolv_conf/README.md ) role.
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ module "compute" {
18
18
vnic_types = lookup (each. value , " vnic_types" , var. vnic_types )
19
19
volume_backed_instances = lookup (each. value , " volume_backed_instances" , var. volume_backed_instances )
20
20
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 )
21
22
gateway_ip = lookup (each. value , " gateway_ip" , var. gateway_ip )
22
23
nodename_template = lookup (each. value , " nodename_template" , var. cluster_nodename_template )
23
24
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ resource "openstack_compute_instance_v2" "control" {
48
48
source_type = " image"
49
49
destination_type = var. volume_backed_instances ? " volume" : " local"
50
50
volume_size = var. volume_backed_instances ? var. root_volume_size : null
51
+ volume_type = var. volume_backed_instances ? var. root_volume_type : null
51
52
boot_index = 0
52
53
delete_on_termination = true
53
54
}
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ module "login" {
18
18
vnic_types = lookup (each. value , " vnic_types" , var. vnic_types )
19
19
volume_backed_instances = lookup (each. value , " volume_backed_instances" , var. volume_backed_instances )
20
20
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 )
21
22
gateway_ip = lookup (each. value , " gateway_ip" , var. gateway_ip )
22
23
nodename_template = lookup (each. value , " nodename_template" , var. cluster_nodename_template )
23
24
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ resource "openstack_compute_instance_v2" "compute_fixed_image" {
82
82
source_type = " image"
83
83
destination_type = " volume"
84
84
volume_size = var. root_volume_size
85
+ volume_type = var. root_volume_type
85
86
boot_index = 0
86
87
delete_on_termination = true
87
88
}
@@ -136,6 +137,7 @@ resource "openstack_compute_instance_v2" "compute" {
136
137
source_type = " image"
137
138
destination_type = " volume"
138
139
volume_size = var. root_volume_size
140
+ volume_type = var. root_volume_type
139
141
boot_index = 0
140
142
delete_on_termination = true
141
143
}
Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ variable "root_volume_size" {
49
49
default = 40
50
50
}
51
51
52
+ variable "root_volume_type" {
53
+ type = string
54
+ default = null
55
+ }
56
+
52
57
variable "extra_volumes" {
53
58
description = <<- EOF
54
59
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" {
228
228
default = 40
229
229
}
230
230
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
+
231
237
variable "gateway_ip" {
232
238
description = " Address to add default route via"
233
239
type = string
You can’t perform that action at this time.
0 commit comments