github.com/skyscape-cloud-services/terraform@v0.9.2-0.20170609144644-7ece028a1747/website/source/docs/providers/vcd/r/vapp_vm.html.markdown (about) 1 --- 2 layout: "vcd" 3 page_title: "vCloudDirector: vcd_vapp_vm" 4 sidebar_current: "docs-vcd-resource-vapp-vm" 5 description: |- 6 Provides a vCloud Director VM resource. This can be used to create, modify, and delete VMs within a vApp. 7 --- 8 9 # vcd\_vapp\_vm 10 11 Provides a vCloud Director VM resource. This can be used to create, 12 modify, and delete VMs within a vApp. 13 14 ~> **Note:** The new VM resource has been added as an addition to the way vApps have always worked with this provider i.e. creating a vApp will create 1 VM of the same name. This can only be deleted by removing the vApp. The new functionality only allows additional VMs to be added/removed. Future revisions will included the ability to configure a different network in addition to storage requirements. 15 16 ## Example Usage 17 18 ```hcl 19 resource "vcd_network" "net" { 20 # ... 21 } 22 23 resource "vcd_vapp" "web" { 24 name = "web" 25 catalog_name = "Boxes" 26 template_name = "lampstack-1.10.1-ubuntu-10.04" 27 memory = 2048 28 cpus = 1 29 30 network_name = "${vcd_network.net.name}" 31 network_href = "${vcd_network.net.href}" 32 ip = "10.10.104.160" 33 34 metadata { 35 role = "web" 36 env = "staging" 37 version = "v1" 38 } 39 } 40 41 resource "vcd_vapp_vm" "web2" { 42 name = "web2" 43 catalog_name = "Boxes" 44 template_name = "lampstack-1.10.1-ubuntu-10.04" 45 memory = 2048 46 cpus = 1 47 48 ip = "10.10.104.161" 49 } 50 51 resource "vcd_vapp_vm" "web3" { 52 name = "web3" 53 catalog_name = "Boxes" 54 template_name = "lampstack-1.10.1-ubuntu-10.04" 55 memory = 2048 56 cpus = 1 57 58 ip = "10.10.104.162" 59 } 60 ``` 61 62 ## Argument Reference 63 64 The following arguments are supported: 65 66 * `name` - (Required) A unique name for the vApp 67 * `catalog_name` - (Required) The catalog name in which to find the given vApp Template 68 * `template_name` - (Required) The name of the vApp Template to use 69 * `memory` - (Optional) The amount of RAM (in MB) to allocate to the vApp 70 * `cpus` - (Optional) The number of virtual CPUs to allocate to the vApp 71 * `initscript` (Optional) A script to be run only on initial boot 72 * `ip` - (Optional) The IP to assign to this vApp. Must be an IP address or 73 one of dhcp, allocated or none. If given the address must be within the 74 `static_ip_pool` set for the network. If left blank, and the network has 75 `dhcp_pool` set with at least one available IP then this will be set with 76 DHCP. 77 * `power_on` - (Optional) A boolean value stating if this vApp should be powered on. Default to `true`