openstack servers and keypairs docs
This commit is contained in:
parent
01e41646d3
commit
00ee96fb6f
|
@ -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)
|
|
@ -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.
|
|
@ -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.
|
|
@ -0,0 +1,29 @@
|
||||||
|
<% wrap_layout :inner do %>
|
||||||
|
<% content_for :sidebar do %>
|
||||||
|
<div class="docs-sidebar hidden-print affix-top" role="complementary">
|
||||||
|
<ul class="nav docs-sidenav">
|
||||||
|
<li<%= sidebar_current("docs-home") %>>
|
||||||
|
<a href="/docs/index.html">« Documentation Home</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-openstack-index") %>>
|
||||||
|
<a href="/docs/providers/openstack/index.html">OpenStack Provider</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-openstack-resource") %>>
|
||||||
|
<a href="#">Resources</a>
|
||||||
|
<ul class="nav nav-visible">
|
||||||
|
<li<%= sidebar_current("docs-openstack-resource-compute-instance") %>>
|
||||||
|
<a href="/docs/providers/openstack/r/compute_instance.html">openstack_compute_instance</a>
|
||||||
|
</li>
|
||||||
|
<li<%= sidebar_current("docs-openstack-resource-compute-keypair") %>>
|
||||||
|
<a href="/docs/providers/openstack/r/compute_keypair.html">openstack_compute_keypair</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= yield %>
|
||||||
|
<% end %>
|
Loading…
Reference in New Issue