-
Notifications
You must be signed in to change notification settings - Fork 55
Add boot mode for instance #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
HeinzM
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boot_mode integrates with existing uefi logic
Code formatted and consistent
Can't test backwards compatibility, but your tests seems to cover this point.
Suggestion: add a short description for boot_mode in schema + docs example.
|
Thanks @HeinzM - I've addressed your comments. |
kiranchavala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tested manully with boot_mode and uefi parameter and the vm boots up fine
resource "cloudstack_instance" "initial_vm" {
boot_mode = "secure"
display_name = "kiran-test"
expunge = true
name = "kiran-test"
network_id = "f4c6e072-8f74-410d-836d-f096d3dd34d4"
service_offering = "CKS"
start_vm = true
template = "ubuntu"
uefi = true
zone = "ref-trl-9722-k-Mol8-kiran-chavala"
}
erraform apply
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# cloudstack_instance.initial_vm will be created
+ resource "cloudstack_instance" "initial_vm" {
+ boot_mode = "secure"
+ disk_offering = (known after apply)
+ display_name = "kiran-test"
+ expunge = true
+ group = (known after apply)
+ id = (known after apply)
+ ip_address = (known after apply)
+ name = "kiran-test"
+ network_id = "f4c6e072-8f74-410d-836d-f096d3dd34d4"
+ override_disk_offering = (known after apply)
+ project = (known after apply)
+ root_disk_size = (known after apply)
+ service_offering = "CKS"
+ start_vm = true
+ tags = (known after apply)
+ template = "ubuntu
+ uefi = true
+ zone = "ref-trl-9722-k-Mol8-kiran-chavala"
}
```
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
cloudstack_instance.initial_vm: Creating...
cloudstack_instance.initial_vm: Still creating... [00m10s elapsed]
cloudstack_instance.initial_vm: Creation complete after 14s [id=4aaea6e5-3c39-4ee0-a037-828606b6fdd7]
Doesn't allow setting boot mode when uefi is false
On setting UEFI to
trueand boot_mode tosecureit successfully deploys the VM