Vmware
錯誤:查找 vApp 時出錯:和ñF和ñFENF未找到實體
我正在嘗試使用 terraform VCD 提供程序在 vmware vcloud director 10 中創建 VM。
版本
terraform { required_providers { vcd = { source = "vmware/vcd" version = "3.0.0" } } }
主要程式碼:
resource "vcd_vapp" "vms" { name = "apatsev-vapp" power_on = "true" } resource "vcd_vapp_vm" "vm1" { vapp_name = "apatsev_vm" name = "apatsev1" catalog_name = "CentOS" template_name = "CentOS7_64-bit" memory = 2048 cpus = 2 cpu_cores = 1 depends_on = [vcd_vapp.vms] }
錯誤:
Error: error finding vApp: [ENF] entity not found on main.tf line 28, in resource "vcd_vapp_vm" "vm1": 28: resource "vcd_vapp_vm" "vm1" {
如何修復錯誤?
工作程式碼:
resource "vcd_vapp" "vms" { name = "apatsev-vapp" power_on = "true" } resource "vcd_vapp_vm" "vm1" { vapp_name = vcd_vapp.vms.name name = "apatsev1" catalog_name = "CentOS" template_name = "CentOS7_64-bit" memory = 2048 cpus = 2 cpu_cores = 1 depends_on = [vcd_vapp.vms] }