softlayer\virtual_guest
Provides virtual guest resource. This allows virtual guests to be created, updated and deleted. For additional details please refer to API documentation.
Example Usage
# Create a new virtual guest using image "Debian"
resource "softlayer_virtual_guest" "twc_terraform_sample" {
name = "twc-terraform-sample-name"
domain = "bar.example.com"
image = "DEBIAN_7_64"
region = "ams01"
public_network_speed = 10
hourly_billing = true
private_network_only = false
cpu = 1
ram = 1024
disks = [25, 10, 20]
user_data = "{\"value\":\"newvalue\"}"
dedicated_acct_host_only = true
local_disk = false
frontend_vlan_id = 1085155
backend_vlan_id = 1085157
}
# Create a new virtual guest using block device template
resource "softlayer_virtual_guest" "terraform-sample-BDTGroup" {
name = "terraform-sample-blockDeviceTemplateGroup"
domain = "bar.example.com"
region = "ams01"
public_network_speed = 10
hourly_billing = false
cpu = 1
ram = 1024
local_disk = false
block_device_template_group_gid = "****-****-****-****-****"
}
Argument Reference
The following arguments are supported:
-
namestring - Hostname for the computing instance.
- Required
-
domainstring - Domain for the computing instance.
- Required
-
cpuint - The number of CPU cores to allocate.
- Required
-
ramint - The amount of memory to allocate in megabytes.
- Required
-
regionstring - Specifies which datacenter the instance is to be provisioned in.
- Required
-
hourly_billingboolean - 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.
- Required
-
local_diskboolean - 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.
- Required
-
dedicated_acct_host_onlyboolean - Specifies whether or not the instance must only run on hosts with instances from the same account
- Default: nil
- Optional
-
imagestring - An identifier for the operating system to provision the computing instance with.
- Conditionally required - Disallowed when blockDeviceTemplateGroup.globalIdentifier is provided, as the template will specify the operating system.
-
block_device_template_group_gidstring - A global identifier for the template to be used to provision the computing instance.
- Conditionally required - Disallowed when operatingSystemReferenceCode is provided, as the template will specify the operating system.
-
public_network_speedint - Specifies the connection speed for the instance’s network components.
- Default: 10
- Optional
-
private_network_onlyboolean - 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.
- Default: False
- Optional
-
frontend_vlan_idint - Specifies the network vlan which is to be used for the frontend interface of the computing instance.
- Default: nil
- Optional
-
backend_vlan_idint - Specifies the network vlan which is to be used for the backend interface of the computing instance.
- Default: nil
- Optional
-
disksarray - Block device and disk image settings for the computing instance
- Optional
- 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.
-
user_datastring - Arbitrary data to be made available to the computing instance.
- Default: nil
- Optional
-
ssh_keysarray - SSH keys to install on the computing instance upon provisioning.
- Default: nil
- Optional
-
ipv4_addressstring - Uses editObject call, template data defined here.
- Default: nil
- Optional
-
ipv4_address_privatestring - Uses editObject call, template data defined here.
- Default: nil
- Optional
-
post_install_script_uristring - As defined in the SoftLayer_Virtual_Guest_SupplementalCreateObjectOptions.
- Default: nil
- Optional
Attributes Reference
The following attributes are exported:
id- id of the virtual guest.
See the source of this document at Terraform.io