File tree Expand file tree Collapse file tree 2 files changed +33
-43
lines changed Expand file tree Collapse file tree 2 files changed +33
-43
lines changed Original file line number Diff line number Diff line change @@ -412,13 +412,18 @@ func TestAccLibvirtDomain_KernelInitrdCmdline(t *testing.T) {
412
412
name = "terraform-test-domain"
413
413
kernel = "${libvirt_volume.kernel.id}"
414
414
initrd = "${libvirt_volume.initrd.id}"
415
- cmdline {
416
- foo = 1
417
- bar = "bye"
418
- }
419
- cmdline {
420
- foo = 2
415
+
416
+
417
+ cmdline = [
418
+ {
419
+ arg1 = "value1"
420
+ }
421
+ ]
422
+ cmdline = [
423
+ {
424
+ arg1 = "value2"
421
425
}
426
+ ]
422
427
}` , randomDomainName )
423
428
424
429
resource .Test (t , resource.TestCase {
Original file line number Diff line number Diff line change @@ -101,11 +101,13 @@ resource "libvirt_domain" "domain-suse" {
101
101
102
102
kernel = "${libvirt_volume.kernel.id}"
103
103
104
- cmdline {
104
+ cmdline = [
105
+ {
105
106
arg1 = "value1"
106
107
arg2 = "value2"
107
108
"_" = "rw nosplash"
108
- }
109
+ }
110
+ ]
109
111
}
110
112
```
111
113
@@ -120,48 +122,31 @@ the following examples:
120
122
``` hcl
121
123
resource "libvirt_domain" "my_machine" {
122
124
//...
123
-
124
- cmdline {
125
- arg1 = "value1"
126
- }
127
- cmdline {
128
- arg2 = "value2"
129
- }
130
- }
125
+ cmdline = [
126
+ {
127
+ foo = "1"
128
+ bar = "bye"
129
+ },
130
+ {
131
+ foo = "2"
132
+ }
133
+ ]
131
134
```
132
135
133
136
``` hcl
134
137
resource "libvirt_domain" "my_machine" {
135
138
...
136
- cmdline = [
137
- {
138
- arg1 = "value1"
139
- },
140
- {
141
- arg2 = "value2"
142
- }
143
- ]
139
+ cmdline = [
140
+ {
141
+ foo = "1"
142
+ bar = "bye"
143
+ },
144
+ {
145
+ foo = "2"
146
+ }
147
+ ]
144
148
}
145
149
```
146
- The kernel supports passing the same option multiple times. If you need this, use separate cmdline blocks.
147
-
148
- ``` hcl
149
- resource "libvirt_domain" "my_machine" {
150
- //...
151
-
152
- cmdline {
153
- arg1 = "value1"
154
- }
155
- cmdline {
156
- arg1 = "value2"
157
- }
158
- }
159
- ```
160
-
161
- ~ > ** Note well:** ` kernel ` and ` initrd ` have to be specified at the same time; ` cmdline `
162
- arguments can be specified only when ` kernel ` and ` initrd ` have been defined.
163
- Otherwise libvirt will refuse to start the domain.
164
-
165
150
### UEFI images
166
151
167
152
Some extra arguments are also provided for using UEFI images:
You can’t perform that action at this time.
0 commit comments