terraform/website/source
danielcbright 8921e10d71 Added softlayer virtual guest and ssh keys functionality:
Here is an example that will setup the following:
+ An SSH key resource.
+ A virtual server resource that uses an existing SSH key.
+ A virtual server resource using an existing SSH key and a Terraform managed SSH key (created as "test_key_1" in the example below).

(create this as sl.tf and run terraform commands from this directory):
```hcl
provider "softlayer" {
    username = ""
    api_key = ""
}

resource "softlayer_ssh_key" "test_key_1" {
    name = "test_key_1"
    public_key = "${file(\"~/.ssh/id_rsa_test_key_1.pub\")}"
    # Windows Example:
    # public_key = "${file(\"C:\ssh\keys\path\id_rsa_test_key_1.pub\")}"
}

resource "softlayer_virtual_guest" "my_server_1" {
    name = "my_server_1"
    domain = "example.com"
    ssh_keys = ["123456"]
    image = "DEBIAN_7_64"
    region = "ams01"
    public_network_speed = 10
    cpu = 1
    ram = 1024
}

resource "softlayer_virtual_guest" "my_server_2" {
    name = "my_server_2"
    domain = "example.com"
    ssh_keys = ["123456", "${softlayer_ssh_key.test_key_1.id}"]
    image = "CENTOS_6_64"
    region = "ams01"
    public_network_speed = 10
    cpu = 1
    ram = 1024
}
```

You'll need to provide your SoftLayer username and API key,
so that Terraform can connect. If you don't want to put
credentials in your configuration file, you can leave them
out:

```
provider "softlayer" {}
```

...and instead set these environment variables:

- **SOFTLAYER_USERNAME**: Your SoftLayer username
- **SOFTLAYER_API_KEY**: Your API key
2016-05-03 15:58:58 -05:00
..
assets Added softlayer virtual guest and ssh keys functionality: 2016-05-03 15:58:58 -05:00
docs Added softlayer virtual guest and ssh keys functionality: 2016-05-03 15:58:58 -05:00
intro Fixed typos in remote.html.markdown and connection.html.markdown. (#6195) 2016-04-15 23:05:49 +01:00
layouts Added softlayer virtual guest and ssh keys functionality: 2016-05-03 15:58:58 -05:00
.gitignore
404.html.erb Update 404 page 2015-09-19 17:42:33 +01:00
community.html.erb Use HTTPS + www. for links 2016-01-14 16:03:26 -05:00
downloads.html.erb Minor typo 2016-04-22 23:46:15 -04:00
index.html.erb provider/aws: Update docs with t1 instance for accounts with EC2 Classic 2015-12-21 10:00:34 -06:00
robots.txt Add robots.txt 2014-10-21 23:20:26 -04:00
sitemap.xml.builder Add sitemap 2014-10-21 23:20:21 -04:00