-
-
Save gowatana/9867c94b3f3335addc76836494e4886b to your computer and use it in GitHub Desktop.
This file contains 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 "vcd_vapp" "vapp1" { | |
name = "tf-vapp-03" | |
description = "Terraform demo vApp" | |
} | |
resource "vcd_vapp_vm" "vapp1-vm1" { | |
vapp_name = vcd_vapp.vapp1.name | |
name = "vm01" | |
catalog_name = "catalog-01" | |
template_name = "vapp-template-01" | |
cpus = 2 | |
cpu_cores = 1 | |
memory = 2048 | |
customization { | |
enabled = true | |
allow_local_admin_password = true | |
auto_generate_password = false | |
admin_password = "VMware1!" | |
initscript = "systemctl stop iptables; systemctl disable iptables" | |
} | |
network { | |
type = "org" | |
name = vcd_vapp_org_network.routed-net-1.org_network_name | |
ip_allocation_mode = "POOL" | |
is_primary = true | |
} | |
} | |
output "vm1_ip" { | |
value = vcd_vapp_vm.vapp1-vm1.network[0].ip | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
下記の投稿むけ。
VMware Cloud Director 10.4 を Terraform で操作してみる。Part-03 vApp VM のゲスト OS カスタマイズ
https://vm.gowatana.jp/entry/2022/11/17/235833