github.com/andresvia/terraform@v0.6.15-0.20160412045437-d51c75946785/website/source/docs/providers/clc/r/server.html.markdown (about) 1 --- 2 layout: "clc" 3 page_title: "clc: clc_server" 4 sidebar_current: "docs-clc-resource-server" 5 description: |- 6 Manages the lifecycle of a CLC server. 7 --- 8 9 # clc\_server 10 11 Manages a CLC server. 12 13 See also [Complete API documentation](https://www.ctl.io/api-docs/v2/#servers-create-server). 14 15 ## Example Usage 16 17 ``` 18 # Provision a server 19 resource "clc_server" "node" { 20 name_template = "trusty" 21 source_server_id = "UBUNTU-14-64-TEMPLATE" 22 group_id = "${clc_group.frontends.id}" 23 cpu = 2 24 memory_mb = 2048 25 password = "Green123$" 26 additional_disks 27 { 28 path = "/var" 29 size_gb = 100 30 type = "partitioned" 31 } 32 additional_disks 33 { 34 size_gb = 10 35 type = "raw" 36 } 37 } 38 39 output "server_id" { 40 value = "clc_server.node.id" 41 } 42 43 44 ``` 45 46 ## Argument Reference 47 48 49 The following arguments are supported: 50 51 * `name_template` - (Required, string) The basename of the server. A unique name will be generated by the platform. 52 * `source_server_id` - (Required, string) The name or ID of the base OS image. 53 Examples: "ubuntu-14-64-template", "rhel-7-64-template", "win2012r2dtc-64" 54 * `group_id` - (Required, string) The name or ID of the server group to spawn server into. 55 * `cpu` - (Required, int) The number of virtual cores 56 * `memory_mb` - (Required, int) Provisioned RAM 57 * `type` - (Required, string) The virtualization type 58 One of "standard", "hyperscale", "bareMetal" 59 * `password` - (Optional, string) The root/adminstrator password. Will be generated by platform if not provided. 60 * `description` - (Optional, string) Description for server (visible in control portal only) 61 * `power_state` - (Optional, string) See [PowerStates](#power_states) below for details. 62 If absent, defaults to `started`. 63 * `private_ip_address` - (Optional, string) Set internal IP address. If absent, allocated and assigned from pool. 64 * `network_id` - (Optional, string) GUID of network to use. (Must be set up in advance from control portal.) 65 When absent, the default network will be used. 66 * `storage_type` - (Optional, string) Backup and replication strategy for disks. 67 One of "standard", "premium" 68 * `additional_disks` - (Optional) See [Disks](#disks) below for details. 69 * `custom_fields` - (Optional) See [CustomFields](#custom_fields) below for details. 70 * `metadata` - (Optional) Misc state storage for non-CLC metadata. 71 72 73 74 <a id="power_states"></a> 75 ## PowerStates 76 77 `power_state` may be used to set initial power state or modify existing instances. 78 79 * `on` | `started` - machine powered on 80 * `off` | `stopped` - machine powered off forcefully 81 * `paused` - freeze machine: memory, processes, billing, monitoring. 82 * `shutdown` - shutdown gracefully 83 * `reboot` - restart gracefully 84 * `reset` - restart forcefully 85 86 <a id="disks"></a> 87 ## Disks 88 89 `additional_disks` is a block within the configuration that may be 90 repeated to specify the attached disks on a server. Each 91 `additional_disks` block supports the following: 92 93 * `type` - (Required, string) Either "raw" or "partitioned". 94 * `size_gb` - (Required, int) Size of allocated disk. 95 * `path` - (Required, string, type:`partitioned`) The mountpoint for the disk. 96 97 98 <a id="custom_fields"></a> 99 ## CustomFields 100 101 `custom_fields` is a block within the configuration that may be 102 repeated to bind custom fields for a server. CustomFields need be set 103 up in advance. Each `custom_fields` block supports the following: 104 105 * `id` - (Required, string) The ID of the custom field to set. 106 * `value` - (Required, string) The value for the specified field. 107