github.com/pmcatominey/terraform@v0.7.0-rc2.0.20160708105029-1401a52a5cc5/website/source/docs/providers/softlayer/r/virtual_guest.html.markdown (about) 1 --- 2 layout: "softlayer" 3 page_title: "SoftLayer: virtual_guest" 4 sidebar_current: "docs-softlayer-resource-virtual-guest" 5 description: |- 6 Manages SoftLayer Virtual Guests. 7 --- 8 9 # softlayer\virtual_guest 10 11 Provides virtual guest resource. This allows virtual guests to be created, updated 12 and deleted. For additional details please refer to [API documentation](http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest). 13 14 ## Example Usage 15 16 ``` 17 # Create a new virtual guest using image "Debian" 18 resource "softlayer_virtual_guest" "twc_terraform_sample" { 19 name = "twc-terraform-sample-name" 20 domain = "bar.example.com" 21 image = "DEBIAN_7_64" 22 region = "ams01" 23 public_network_speed = 10 24 hourly_billing = true 25 private_network_only = false 26 cpu = 1 27 ram = 1024 28 disks = [25, 10, 20] 29 user_data = "{\"value\":\"newvalue\"}" 30 dedicated_acct_host_only = true 31 local_disk = false 32 frontend_vlan_id = 1085155 33 backend_vlan_id = 1085157 34 } 35 ``` 36 37 ``` 38 # Create a new virtual guest using block device template 39 resource "softlayer_virtual_guest" "terraform-sample-BDTGroup" { 40 name = "terraform-sample-blockDeviceTemplateGroup" 41 domain = "bar.example.com" 42 region = "ams01" 43 public_network_speed = 10 44 hourly_billing = false 45 cpu = 1 46 ram = 1024 47 local_disk = false 48 block_device_template_group_gid = "****-****-****-****-****" 49 } 50 ``` 51 52 ## Argument Reference 53 54 The following arguments are supported: 55 56 * `name` | *string* 57 * Hostname for the computing instance. 58 * **Required** 59 * `domain` | *string* 60 * Domain for the computing instance. 61 * **Required** 62 * `cpu` | *int* 63 * The number of CPU cores to allocate. 64 * **Required** 65 * `ram` | *int* 66 * The amount of memory to allocate in megabytes. 67 * **Required** 68 * `region` | *string* 69 * Specifies which datacenter the instance is to be provisioned in. 70 * **Required** 71 * `hourly_billing` | *boolean* 72 * Specifies the billing type for the instance. When true the computing instance will be billed on hourly usage, otherwise it will be billed on a monthly basis. 73 * **Required** 74 * `local_disk` | *boolean* 75 * Specifies the disk type for the instance. When true the disks for the computing instance will be provisioned on the host which it runs, otherwise SAN disks will be provisioned. 76 * **Required** 77 * `dedicated_acct_host_only` | *boolean* 78 * Specifies whether or not the instance must only run on hosts with instances from the same account 79 * *Default*: nil 80 * *Optional* 81 * `image` | *string* 82 * An identifier for the operating system to provision the computing instance with. 83 * **Conditionally required** - Disallowed when blockDeviceTemplateGroup.globalIdentifier is provided, as the template will specify the operating system. 84 * `block_device_template_group_gid` | *string* 85 * A global identifier for the template to be used to provision the computing instance. 86 * **Conditionally required** - Disallowed when operatingSystemReferenceCode is provided, as the template will specify the operating system. 87 * `public_network_speed` | *int* 88 * Specifies the connection speed for the instance's network components. 89 * *Default*: 10 90 * *Optional* 91 * `private_network_only` | *boolean* 92 * Specifies whether or not the instance only has access to the private network. When true this flag specifies that a compute instance is to only have access to the private network. 93 * *Default*: False 94 * *Optional* 95 * `frontend_vlan_id` | *int* 96 * Specifies the network vlan which is to be used for the frontend interface of the computing instance. 97 * *Default*: nil 98 * *Optional* 99 * `backend_vlan_id` | *int* 100 * Specifies the network vlan which is to be used for the backend interface of the computing instance. 101 * *Default*: nil 102 * *Optional* 103 * `disks` | *array* 104 * Block device and disk image settings for the computing instance 105 * *Optional* 106 * *Default*: The smallest available capacity for the primary disk will be used. If an image template is specified the disk capacity will be be provided by the template. 107 * `user_data` | *string* 108 * Arbitrary data to be made available to the computing instance. 109 * *Default*: nil 110 * *Optional* 111 * `ssh_keys` | *array* 112 * SSH keys to install on the computing instance upon provisioning. 113 * *Default*: nil 114 * *Optional* 115 * `ipv4_address` | *string* 116 * Uses editObject call, template data [defined here](https://sldn.softlayer.com/reference/datatypes/SoftLayer_Virtual_Guest). 117 * *Default*: nil 118 * *Optional* 119 * `ipv4_address_private` | *string* 120 * Uses editObject call, template data [defined here](https://sldn.softlayer.com/reference/datatypes/SoftLayer_Virtual_Guest). 121 * *Default*: nil 122 * *Optional* 123 * `post_install_script_uri` | *string* 124 * As defined in the [SoftLayer_Virtual_Guest_SupplementalCreateObjectOptions](https://sldn.softlayer.com/reference/datatypes/SoftLayer_Virtual_Guest_SupplementalCreateObjectOptions). 125 * *Default*: nil 126 * *Optional* 127 128 ## Attributes Reference 129 130 The following attributes are exported: 131 132 * `id` - id of the virtual guest. 133 134