我正在尝试使用资源 azurerm_virtual_machine 的 custom_data 字段,但遇到了这个错误。知道我缺少什么或者这是错误的用法吗?
resource "azurerm_virtual_machine" "csrVM" {
name = "csr-terraform-poc"
location = "${var.location}"
resource_group_name = "${azurerm_resource_group.terraformRG.name}"
network_interface_ids = ["${azurerm_network_interface.terraformNic1.id}",
"${azurerm_network_interface.terraformNic2.id}"]
primary_network_interface_id = "${azurerm_network_interface.terraformNic1.id}"
vm_size = "Standard_DS1_v2"
custom_data = "${file("customdata.txt")}"
#custom_data = <<CUSTOMDATA
#username testuser privilege 15 password testpass
#enable password testpass
#CUSTOMDATA
~>terraform apply -var-file=azure.tfvars
错误:azurerm_virtual_machine.csrVM::无效或未知键:custom_data
~>terraform -v Terraform v0.11.3 + provider.azurerm v1.1.1