azure - 使用 Azure 进行 Terraform
问题描述
如何使用位于不同订阅存储帐户的自定义映像 (VHD) 创建 VM (diff SubscriptionID)。用过这个
storage_os_disk {
name = "${var.Servername}-os-disk"
create_option = "FromImage"
caching = "${var.disk_perm}"
os_type = "${var.ostype}"
vhd_uri = "https://myimages.blob.core.newone.net/myvhds/REDHAT7.vhd"
}
解决方案
遗憾的是,您无法从不同订阅中的 VHD 文件创建 VM。您只需使用 VHD 文件在同一订阅和同一区域中创建 VM。不仅是虚拟机,镜像和快照也是同样的限制。
如果您确实想从 VHD 文件创建 VM,则必须将 VHD 文件复制到相同的订阅和区域中。我建议使用 AzCopy 工具。
推荐阅读
- python - Python中针对每个字符的多个选项列表查找最长字符串子集的最佳方法
- python - 如何设置条件来检查元素是否已被单击?
- python - 如何迭代 tweepy Cursor?For 循环不工作
- c++ - Makefile:更有效地更新库
- javascript - 遍历对象数组并获取下一个名称属性
- javascript - 如何在反应中优先考虑一个钩子?
- c# - “Collision2D”不包含“GameObject”的定义(使用对撞机时)
- statsmodels - statsmodel 属性 变量名
- python - 在 kml 文件中查找地标
- akka-stream - 带有循环的 Akka HTTP 流 API 永远不会完成