Skip to content

Commit 00ee96f

Browse files
committed
openstack servers and keypairs docs
1 parent 01e4164 commit 00ee96f

4 files changed

Lines changed: 193 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
layout: "openstack"
3+
page_title: "Provider: OpenStack"
4+
sidebar_current: "docs-openstack-index"
5+
description: |-
6+
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.
7+
---
8+
9+
# OpenStack Provider
10+
11+
The OpenStack provider is used to interact with the
12+
many resources supported by OpenStack. The provider needs to be configured
13+
with the proper credentials before it can be used.
14+
15+
Use the navigation to the left to read about the available resources.
16+
17+
## Example Usage
18+
19+
```
20+
# Configure the OpenStack Provider
21+
provider "openstack" {
22+
username = "admin"
23+
tenant_name = "admin"
24+
password = "pwd"
25+
auth_url = "http://myauthurl:5000/v2.0"
26+
region = "RegionOne"
27+
}
28+
29+
# Create a web server
30+
resource "openstack_compute_instance" "test-server" {
31+
...
32+
}
33+
```
34+
35+
## Configuration Reference
36+
37+
The following arguments are supported:
38+
39+
* `username` - (Required)
40+
41+
* `tenant_name` - (Required)
42+
43+
* `password` - (Required)
44+
45+
* `auth_url` - (Required)
46+
47+
* `region` - (Required)
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
layout: "openstack"
3+
page_title: "OpenStack: openstack_compute_instance"
4+
sidebar_current: "docs-openstack-resource-compute-instance"
5+
description: |-
6+
Manages a VM instance resource within OpenStack.
7+
---
8+
9+
# openstack\_compute\_instance
10+
11+
Manages a VM instance resource within OpenStack.
12+
13+
## Example Usage
14+
15+
```
16+
resource "openstack_compute_instance" "test-server" {
17+
name = "tf-test"
18+
image_ref = "ad091b52-742f-469e-8f3c-fd81cadf0743"
19+
flavor_ref = "3"
20+
metadata {
21+
this = "that"
22+
}
23+
key_pair = "my_key_pair_name"
24+
security_groups = ["test-group-1"]
25+
}
26+
```
27+
28+
## Argument Reference
29+
30+
The following arguments are supported:
31+
32+
* `name` - (Required) A unique name for the resource.
33+
34+
* `image_ref` - (Required) The image reference (ID) for the desired image for
35+
the server. Changing this creates a new server.
36+
37+
* `flavor_ref` - (Required) The flavor reference (ID) for the desired flavor
38+
for the server. Changing this resizes the existing server.
39+
40+
* `security_groups` - (Optional) An array of one or more security group names
41+
to associate with the server. Changing this results in adding/removing
42+
security groups from the existing server.
43+
44+
* `availability_zone` - (Optional) The availability zone in which to create
45+
the server. Changing this creates a new server.
46+
47+
* `networks` - (Optional) An array of one or more networks to attach to the
48+
instance. The network object structure is documented below.
49+
50+
* `metadata` - (Optional) Metadata key/value pairs to make available from
51+
within the instance. Changing this updates the existing server metadata.
52+
53+
* `admin_pass` - (Optional) The administrative password to assign to the server.
54+
Changing this changes the root password on the existing server.
55+
56+
* `key_pair` - (Optional) The name of a key pair to put on the server. The key
57+
pair must already be created and associated with the tenant's account.
58+
Changing this creates a new server.
59+
60+
The `network` block supports:
61+
62+
* `uuid` - (Required unless `port` is provided) The network UUID to attach to
63+
the server.
64+
65+
* `port` - (Required unless `uuid` is provided) The port UUID of a network to
66+
attach to the server.
67+
68+
* `fixed_ip` - (Optional) Specifies a fixed IP address to be used on this
69+
network.
70+
71+
## Attributes Reference
72+
73+
The following attributes are exported:
74+
75+
* `name` - See Argument Reference above.
76+
* `access_ip_v4` - See Argument Reference above.
77+
* `access_ip_v6` - See Argument Reference above.
78+
* `metadata` - See Argument Reference above.
79+
* `security_groups` - See Argument Reference above.
80+
* `flavor_ref` - See Argument Reference above.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout: "openstack"
3+
page_title: "OpenStack: openstack_compute_keypair"
4+
sidebar_current: "docs-openstack-resource-compute-keypair"
5+
description: |-
6+
Manages a keypair resource within OpenStack.
7+
---
8+
9+
# openstack\_compute\_keypair
10+
11+
Manages a keypair resource within OpenStack.
12+
13+
## Example Usage
14+
15+
```
16+
resource "openstack_compute_keypair" "test-keypair" {
17+
name = "my-keypair"
18+
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAjpC1hwiOCCmKEWxJ4qzTTsJbKzndLotBCz5PcwtUnflmU+gHJtWMZKpuEGVi29h0A/+ydKek1O18k10Ff+4tyFjiHDQAnOfgWf7+b1yK+qDip3X1C0UPMbwHlTfSGWLGZqd9LvEFx9k3h/M+VtMvwR1lJ9LUyTAImnNjWG7TaIPmui30HvM2UiFEmqkr4ijq45MyX2+fLIePLRIF61p4whjHAQYufqyno3BS48icQb4p6iVEZPo4AE2o9oIyQvj2mx4dk5Y8CgSETOZTYDOR3rU2fZTRDRgPJDH9FWvQjF5tA0p3d9CoWWd2s6GKKbfoUIi8R/Db1BSPJwkqB"
19+
}
20+
```
21+
22+
## Argument Reference
23+
24+
The following arguments are supported:
25+
26+
* `name` - (Required) A unique name for the keypair. Changing this creates a new
27+
keypair.
28+
29+
* `public_key` - (Required) A pregenerated OpenSSH-formatted public key.
30+
Changing this creates a new keypair.
31+
32+
## Attributes Reference
33+
34+
The following attributes are exported:
35+
36+
* `name` - See Argument Reference above.
37+
* `public_key` - See Argument Reference above.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<% wrap_layout :inner do %>
2+
<% content_for :sidebar do %>
3+
<div class="docs-sidebar hidden-print affix-top" role="complementary">
4+
<ul class="nav docs-sidenav">
5+
<li<%= sidebar_current("docs-home") %>>
6+
<a href="/docs/index.html">&laquo; Documentation Home</a>
7+
</li>
8+
9+
<li<%= sidebar_current("docs-openstack-index") %>>
10+
<a href="/docs/providers/openstack/index.html">OpenStack Provider</a>
11+
</li>
12+
13+
<li<%= sidebar_current("docs-openstack-resource") %>>
14+
<a href="#">Resources</a>
15+
<ul class="nav nav-visible">
16+
<li<%= sidebar_current("docs-openstack-resource-compute-instance") %>>
17+
<a href="/docs/providers/openstack/r/compute_instance.html">openstack_compute_instance</a>
18+
</li>
19+
<li<%= sidebar_current("docs-openstack-resource-compute-keypair") %>>
20+
<a href="/docs/providers/openstack/r/compute_keypair.html">openstack_compute_keypair</a>
21+
</li>
22+
</ul>
23+
</li>
24+
</ul>
25+
</div>
26+
<% end %>
27+
28+
<%= yield %>
29+
<% end %>

0 commit comments

Comments
 (0)