hbar
(hagay bar)
1
hey all
i was able to create vm using terraform but…
when i use the context block im facing an issue
Error: Unsupported block type
on terraform.tf line 34, in resource “opennebula_template” “mytemplate”:
34: context {
Blocks of type “context” are not expected here. Did you mean to define
argument “context”? If so, use the equals sign to assign it a value.
i am adding it exactly as the guide shows in formal terraform docs in here
https://registry.terraform.io/providers/OpenNebula/opennebula/latest/docs/resources/virtual_machine
cgonzalez
(Christian González)
2
Hello @hbar, you need to define the context block with an equal sign like below:
context = {
NETWORK = "YES"
HOSTNAME = "$NAME"
START_SCRIPT ="yum upgrade"
}
Omitting the equal sing for defining attributes was only supported in Terraform <0.12 (Terraform 0.12 Compatibility for Providers - Terraform by HashiCorp). We have an issue for updating the documentation in the GitHub repository.
hbar
(hagay bar)
3
you are the king!!! thanks