From 00ee96fb6fe4bd7289dd7f052ffbfee810ea49c2 Mon Sep 17 00:00:00 2001 From: Jon Perritt Date: Wed, 7 Jan 2015 17:09:25 -0700 Subject: [PATCH] openstack servers and keypairs docs --- .../providers/openstack/index.html.markdown | 47 +++++++++++ .../r/compute_instance.html.markdown | 80 +++++++++++++++++++ .../openstack/r/compute_keypair.html.markdown | 37 +++++++++ website/source/layouts/openstack.erb | 29 +++++++ 4 files changed, 193 insertions(+) create mode 100644 website/source/docs/providers/openstack/index.html.markdown create mode 100644 website/source/docs/providers/openstack/r/compute_instance.html.markdown create mode 100644 website/source/docs/providers/openstack/r/compute_keypair.html.markdown create mode 100644 website/source/layouts/openstack.erb diff --git a/website/source/docs/providers/openstack/index.html.markdown b/website/source/docs/providers/openstack/index.html.markdown new file mode 100644 index 000000000..652523c5b --- /dev/null +++ b/website/source/docs/providers/openstack/index.html.markdown @@ -0,0 +1,47 @@ +--- +layout: "openstack" +page_title: "Provider: OpenStack" +sidebar_current: "docs-openstack-index" +description: |- + The OpenStack provider is used to interact with the many resources supported by OpenStack. The provider needs to be configured with the proper credentials before it can be used. +--- + +# OpenStack Provider + +The OpenStack provider is used to interact with the +many resources supported by OpenStack. The provider needs to be configured +with the proper credentials before it can be used. + +Use the navigation to the left to read about the available resources. + +## Example Usage + +``` +# Configure the OpenStack Provider +provider "openstack" { + username = "admin" + tenant_name = "admin" + password = "pwd" + auth_url = "http://myauthurl:5000/v2.0" + region = "RegionOne" +} + +# Create a web server +resource "openstack_compute_instance" "test-server" { + ... +} +``` + +## Configuration Reference + +The following arguments are supported: + +* `username` - (Required) + +* `tenant_name` - (Required) + +* `password` - (Required) + +* `auth_url` - (Required) + +* `region` - (Required) diff --git a/website/source/docs/providers/openstack/r/compute_instance.html.markdown b/website/source/docs/providers/openstack/r/compute_instance.html.markdown new file mode 100644 index 000000000..f22624bf9 --- /dev/null +++ b/website/source/docs/providers/openstack/r/compute_instance.html.markdown @@ -0,0 +1,80 @@ +--- +layout: "openstack" +page_title: "OpenStack: openstack_compute_instance" +sidebar_current: "docs-openstack-resource-compute-instance" +description: |- + Manages a VM instance resource within OpenStack. +--- + +# openstack\_compute\_instance + +Manages a VM instance resource within OpenStack. + +## Example Usage + +``` +resource "openstack_compute_instance" "test-server" { + name = "tf-test" + image_ref = "ad091b52-742f-469e-8f3c-fd81cadf0743" + flavor_ref = "3" + metadata { + this = "that" + } + key_pair = "my_key_pair_name" + security_groups = ["test-group-1"] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) A unique name for the resource. + +* `image_ref` - (Required) The image reference (ID) for the desired image for + the server. Changing this creates a new server. + +* `flavor_ref` - (Required) The flavor reference (ID) for the desired flavor + for the server. Changing this resizes the existing server. + +* `security_groups` - (Optional) An array of one or more security group names + to associate with the server. Changing this results in adding/removing + security groups from the existing server. + +* `availability_zone` - (Optional) The availability zone in which to create + the server. Changing this creates a new server. + +* `networks` - (Optional) An array of one or more networks to attach to the + instance. The network object structure is documented below. + +* `metadata` - (Optional) Metadata key/value pairs to make available from + within the instance. Changing this updates the existing server metadata. + +* `admin_pass` - (Optional) The administrative password to assign to the server. + Changing this changes the root password on the existing server. + +* `key_pair` - (Optional) The name of a key pair to put on the server. The key + pair must already be created and associated with the tenant's account. + Changing this creates a new server. + +The `network` block supports: + +* `uuid` - (Required unless `port` is provided) The network UUID to attach to + the server. + +* `port` - (Required unless `uuid` is provided) The port UUID of a network to + attach to the server. + +* `fixed_ip` - (Optional) Specifies a fixed IP address to be used on this + network. + +## Attributes Reference + +The following attributes are exported: + +* `name` - See Argument Reference above. +* `access_ip_v4` - See Argument Reference above. +* `access_ip_v6` - See Argument Reference above. +* `metadata` - See Argument Reference above. +* `security_groups` - See Argument Reference above. +* `flavor_ref` - See Argument Reference above. diff --git a/website/source/docs/providers/openstack/r/compute_keypair.html.markdown b/website/source/docs/providers/openstack/r/compute_keypair.html.markdown new file mode 100644 index 000000000..15459a0ec --- /dev/null +++ b/website/source/docs/providers/openstack/r/compute_keypair.html.markdown @@ -0,0 +1,37 @@ +--- +layout: "openstack" +page_title: "OpenStack: openstack_compute_keypair" +sidebar_current: "docs-openstack-resource-compute-keypair" +description: |- + Manages a keypair resource within OpenStack. +--- + +# openstack\_compute\_keypair + +Manages a keypair resource within OpenStack. + +## Example Usage + +``` +resource "openstack_compute_keypair" "test-keypair" { + name = "my-keypair" + public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAjpC1hwiOCCmKEWxJ4qzTTsJbKzndLotBCz5PcwtUnflmU+gHJtWMZKpuEGVi29h0A/+ydKek1O18k10Ff+4tyFjiHDQAnOfgWf7+b1yK+qDip3X1C0UPMbwHlTfSGWLGZqd9LvEFx9k3h/M+VtMvwR1lJ9LUyTAImnNjWG7TaIPmui30HvM2UiFEmqkr4ijq45MyX2+fLIePLRIF61p4whjHAQYufqyno3BS48icQb4p6iVEZPo4AE2o9oIyQvj2mx4dk5Y8CgSETOZTYDOR3rU2fZTRDRgPJDH9FWvQjF5tA0p3d9CoWWd2s6GKKbfoUIi8R/Db1BSPJwkqB" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) A unique name for the keypair. Changing this creates a new + keypair. + +* `public_key` - (Required) A pregenerated OpenSSH-formatted public key. + Changing this creates a new keypair. + +## Attributes Reference + +The following attributes are exported: + +* `name` - See Argument Reference above. +* `public_key` - See Argument Reference above. diff --git a/website/source/layouts/openstack.erb b/website/source/layouts/openstack.erb new file mode 100644 index 000000000..7547a3b09 --- /dev/null +++ b/website/source/layouts/openstack.erb @@ -0,0 +1,29 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> + <% end %>