FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

clc_server

Manages a CLC server.

Resources and Documentation:

Example Usage

# Provision a server
resource "clc_server" "node" {
  name_template = "trusty"
  source_server_id = "UBUNTU-14-64-TEMPLATE"
  group_id = "${clc_group.frontends.id}"
  cpu = 2
  memory_mb = 2048
  password = "Green123$"
  additional_disks
    {
        path = "/var"
        size_gb = 100
        type = "partitioned"
    }
  additional_disks
    {
        size_gb = 10
        type = "raw"
    }
}

output "server_id" {
  value = "clc_server.node.id"
}


Argument Reference

The following arguments are supported:

Server Types

standard

Cloud servers standard offer basic, commodity level performance with mixed spindle/SSD storage profiles. Additional features storage backups, snapshot/clone/archive, and widespread availability.

hyperscale

Hyperscale hyperscale servers offer significantly higher IOPS than standard servers for CPU and IO intensive servers. See the FAQ for more details.

Physical host redundancy can be managed via Anti-Affinity policies.

bareMetal

Bare metal bareMetal offers optimal compute performance and is available in select datacenters in CLC for approved customers. For more info see the FAQ.

For bareMetal, the required fields source_server_id, cpu, and memory_mb are ignored and instead the following fields are required:

Values for configuration_id and os_type are specific to each datacenter and are available via the API endpoints here.

PowerStates

power_state may be used to set initial power state or modify existing instances.

Disks

additional_disks is a block within the configuration that may be repeated to specify the attached disks on a server. Each additional_disks block supports the following:

CustomFields

custom_fields is a block within the configuration that may be repeated to bind custom fields for a server. CustomFields need be set up in advance. Each custom_fields block supports the following:

Packages

packages is a block within the configuration that may be repeated to specify packages and their associated parameters to be run at instantiation. Packages facilitate various tasks like ssh key installation, kernel upgrades, etc. Package ID as well as parameters are configured via this block.

Example:

# Configure the CLC Provider
provider "clc_server" "ubuntu" {
  ...
  packages
    {
      id = "77abb844-579d-478d-3955-c69ab4a7ba1a"
      SshKey = "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAA..."
    }
}

See the source of this document at Terraform.io