-
-
Save gowatana/c8712f2cf8de4f9fe5ff9cf27afcda95 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "nutanix_virtual_machine_v2" "vms" { | |
| count = var.vm_count | |
| name = format("${var.vm_name_prefix}-%02d", count.index + 1) | |
| 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 } | |
| } | |
| } | |
| boot_config { | |
| legacy_boot { | |
| boot_order = ["CDROM", "DISK"] | |
| } | |
| } | |
| guest_customization { | |
| config { | |
| cloud_init { | |
| cloud_init_script { | |
| user_data { value = var.cloud_init_b64 } | |
| } | |
| } | |
| } | |
| } | |
| lifecycle { | |
| ignore_changes = [ | |
| guest_customization, | |
| cd_roms | |
| ] | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
下記の投稿むけ。
Terraform で FVN の NAT VPC を構成してみる。Part-05:セグメントと仮想マシンの作成(Module 化)
https://blog.ntnx.jp/entry/2025/06/15/221729
Terraform で FVN の NAT VPC を構成してみる。Part-06:VPC ~ 仮想マシンの作成(Module 化)
https://blog.ntnx.jp/entry/2025/06/16/022510