Skip to content

Instantly share code, notes, and snippets.

@gowatana
Created June 14, 2025 12:42
Show Gist options
  • Select an option

  • Save gowatana/a4b67e3f683ee3d09971f48ee3b658d5 to your computer and use it in GitHub Desktop.

Select an option

Save gowatana/a4b67e3f683ee3d09971f48ee3b658d5 to your computer and use it in GitHub Desktop.
resource "nutanix_virtual_machine_v2" "vm1" {
name = "web-01"
description = null
cluster {
ext_id = data.nutanix_clusters_v2.cluster1.cluster_entities[0].ext_id
}
num_sockets = 1
num_cores_per_socket = 1
memory_size_bytes = (1024 * 1024 * 1024) * 1 # GiB
disks {
backing_info {
vm_disk {
data_source {
reference {
image_reference {
image_ext_id = data.nutanix_images_v2.image1.images[0].ext_id
}
}
}
}
}
}
nics {
network_info {
subnet { ext_id = resource.nutanix_subnet_v2.overlay1.ext_id }
}
}
boot_config {
legacy_boot {
boot_order = ["CDROM", "DISK"]
}
}
guest_customization {
config {
cloud_init {
cloud_init_script {
user_data { value = filebase64("cloud-init_ol-web.yml") }
}
}
}
}
lifecycle {
ignore_changes = [
guest_customization,
cd_roms
]
}
}
@gowatana
Copy link
Author

下記の投稿むけ。

Terraform で FVN の NAT VPC を構成してみる。Part-04:VPC と仮想マシンの作成(tf ファイル分割)
https://blog.ntnx.jp/entry/2025/06/14/221256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment