File tree Expand file tree Collapse file tree 3 files changed +34
-17
lines changed
environments/skeleton/{{cookiecutter.environment}}/tofu Expand file tree Collapse file tree 3 files changed +34
-17
lines changed Original file line number Diff line number Diff line change @@ -40,4 +40,20 @@ module "compute" {
40
40
# input dict validation:
41
41
group_name = each. key
42
42
group_keys = keys (each. value )
43
+ allowed_keys = [
44
+ " nodes" ,
45
+ " flavor" ,
46
+ " image_id" ,
47
+ " extra_networks" ,
48
+ " vnic_types" ,
49
+ " compute_init_enable" ,
50
+ " ignore_image_changes" ,
51
+ " volume_backed_instances" ,
52
+ " root_volume_size" ,
53
+ " extra_volumes" ,
54
+ " match_ironic_node" ,
55
+ " availability_zone" ,
56
+ " gateway_ip" ,
57
+ " nodename_template" ,
58
+ ]
43
59
}
Original file line number Diff line number Diff line change @@ -43,4 +43,20 @@ module "login" {
43
43
# input dict validation:
44
44
group_name = each. key
45
45
group_keys = keys (each. value )
46
+ allowed_keys = [
47
+ " nodes" ,
48
+ " flavor" ,
49
+ " image_id" ,
50
+ " extra_networks" ,
51
+ " vnic_types" ,
52
+ " volume_backed_instances" ,
53
+ " root_volume_size" ,
54
+ " extra_volumes" ,
55
+ " fip_addresses" ,
56
+ " fip_network" ,
57
+ " match_ironic_node" ,
58
+ " availability_zone" ,
59
+ " gateway_ip" ,
60
+ " nodename_template" ,
61
+ ]
46
62
}
Original file line number Diff line number Diff line change @@ -149,27 +149,12 @@ variable "group_keys" {
149
149
type = list
150
150
validation {
151
151
condition = length (setsubtract (var. group_keys , var. allowed_keys )) == 0
152
- error_message = " Compute group ${ var . group_name } in var.compute contains invalid key(s): ${
152
+ error_message = " Node group ${ var . group_name } contains invalid key(s): ${
153
153
join (" , " , setsubtract (var. group_keys , var. allowed_keys ))} "
154
154
}
155
155
}
156
156
157
157
variable "allowed_keys" {
158
158
type = list
159
- default = [
160
- " nodes" ,
161
- " flavor" ,
162
- " image_id" ,
163
- " extra_networks" ,
164
- " vnic_types" ,
165
- " compute_init_enable" ,
166
- " ignore_image_changes" ,
167
- " volume_backed_instances" ,
168
- " root_volume_size" ,
169
- " extra_volumes" ,
170
- " match_ironic_node" ,
171
- " availability_zone" ,
172
- " gateway_ip" ,
173
- " nodename_template"
174
- ]
159
+ # don't provide a default here as allowed keys may depend on module use
175
160
}
You can’t perform that action at this time.
0 commit comments