Skip to content

Instantly share code, notes, and snippets.

@gowatana
Created June 10, 2025 13:36
Show Gist options
  • Select an option

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

Select an option

Save gowatana/aea1ae8e6384497e8156bccc9d276165 to your computer and use it in GitHub Desktop.
resource "nutanix_virtual_machine_v2" "vm2" {
name = "vm02"
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 = data.nutanix_subnets_v2.overlay1.subnets[0].ext_id }
ipv4_config {
should_assign_ip = true
ip_address { value = "10.0.1.102" }
}
}
}
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
Copy Markdown
Author

下記の投稿むけ。

Terraform で FVN の Overlay サブネットを作成してみる。Part-02:仮想マシンの作成
https://blog.ntnx.jp/entry/2025/05/16/235814

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