terraform/website
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
..
.bundle annoucnement bnr 2016-04-11 13:02:15 -05:00
helpers Do matching in sidebar_current via regex or equal sign 2015-05-08 10:40:51 +01:00
scripts Fix website metadata script 2016-04-12 20:09:27 +01:00
source Added softlayer virtual guest and ssh keys functionality: 2016-05-03 15:58:58 -05:00
Gemfile Fix issues building documentation behind corporate filewall on Windows. 2015-07-09 11:07:45 -04:00
Gemfile.lock Update middleman-hashicorp (#6315) 2016-04-22 22:52:52 -05:00
LICENSE.md website: initial commit 2014-07-16 17:51:48 -04:00
Makefile fix Makefile 2015-09-24 11:48:52 -07:00
README.md Update README to point to Makefile 2015-09-24 09:57:38 -07:00
Vagrantfile provider/azurerm: Clean up work for base provider 2015-12-15 18:31:02 -05:00
config.rb v0.6.15 2016-04-22 18:29:43 +00:00
config.ru Add Rack::Protection 2015-07-13 12:50:17 -04:00
packer.json Fix website metadata script 2016-04-12 20:09:27 +01:00

README.md

Terraform Website

This subdirectory contains the entire source for the Terraform Website. This is a Middleman project, which builds a static site from these source files.

Contributions Welcome

If you find a typo or you feel like you can improve the HTML, CSS, or JavaScript, we welcome contributions. Feel free to open issues or pull requests like any normal GitHub project, and we'll merge it in.

Running the Site Locally

Running the site locally is simple. First you need a working copy of Ruby >= 2.0 and Bundler. Then you can clone this repo and run make dev.

Then open up http://localhost:4567. Note that some URLs you may need to append ".html" to make them work (in the navigation).