Skip to content

Instantly share code, notes, and snippets.

@gowatana
Created June 10, 2025 14:27
Show Gist options
  • Select an option

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

Select an option

Save gowatana/9c4aa1d64b896c35a177c12c1b3c0b43 to your computer and use it in GitHub Desktop.
resource "nutanix_virtual_machine_v2" "vm1" {
name = "vm03"
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 = nutanix_subnet_v2.overlay1.ext_id }
ipv4_config {
should_assign_ip = true
ip_address { value = "10.0.2.101" }
}
}
}
boot_config {
legacy_boot {
boot_order = ["CDROM", "DISK"]
}
}
guest_customization {
config {
cloud_init {
cloud_init_script {
user_data { value = filebase64("cloud-init_nutanix.yml") }
}
}
}
}
lifecycle {
ignore_changes = [
nics,
guest_customization,
cd_roms
]
}
}
@gowatana
Copy link
Author

下記の投稿むけ。

Terraform で FVN の Overlay サブネットを作成してみる。Part-03:サブネットと仮想マシンの追加
https://blog.ntnx.jp/entry/2025/06/10/234105

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