Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit 243312c

Browse files
committed
docs added
examples dir layout updated
1 parent 62af52b commit 243312c

40 files changed

+1211
-55
lines changed

docs/index.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gcorelabs Provider"
4+
subcategory: ""
5+
description: |-
6+
7+
---
8+
9+
# gcorelabs Provider
10+
11+
12+
13+
## Example Usage
14+
15+
```terraform
16+
terraform {
17+
required_version = ">= 0.13.0"
18+
required_providers {
19+
gcore = {
20+
source = "local.gcorelabs.com/repo/gcore"
21+
version = "~>0.0.11"
22+
}
23+
}
24+
}
25+
```
26+
27+
<!-- schema generated by tfplugindocs -->
28+
## Schema
29+
30+
### Optional
31+
32+
- **gcore_api** (String) Region API
33+
- **gcore_platform** (String) Platform ulr is used for generate jwt
34+
- **password** (String)
35+
- **user_name** (String)

docs/resources/gcore_floatingip.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gcore_floatingip Resource - terraform-provider-gcorelabs"
4+
subcategory: ""
5+
description: |-
6+
A floating IP is a static IP address that points to one of your Instances. It allows you to redirect network traffic to any of your Instances in the same datacenter.
7+
---
8+
9+
# gcore_floatingip (Resource)
10+
11+
A floating IP is a static IP address that points to one of your Instances. It allows you to redirect network traffic to any of your Instances in the same datacenter.
12+
13+
## Example Usage
14+
15+
```terraform
16+
provider gcore {
17+
user_name = "[email protected]"
18+
password = "testtest"
19+
gcore_platform = "http://api.stg-45.staging.gcdn.co"
20+
gcore_api = "http://10.100.179.92:33081"
21+
}
22+
23+
resource "gcore_floatingip" "floating_ip" {
24+
project_id = 1
25+
region_id = 1
26+
// fixed_ip_address = "192.168.10.39" // instance`s interface ip
27+
// port_id = "5c992875-f653-4b7b-af5b-1dc3019e5ffa" //instance`s interface port_id
28+
}
29+
```
30+
31+
<!-- schema generated by tfplugindocs -->
32+
## Schema
33+
34+
### Optional
35+
36+
- **fixed_ip_address** (String)
37+
- **id** (String) The ID of this resource.
38+
- **last_updated** (String)
39+
- **port_id** (String)
40+
- **project_id** (Number)
41+
- **project_name** (String)
42+
- **region_id** (Number)
43+
- **region_name** (String)
44+
45+
### Read-Only
46+
47+
- **created_at** (String)
48+
- **floating_ip_address** (String)
49+
- **router_id** (String)
50+
- **status** (String)
51+
- **updated_at** (String)
52+
53+

docs/resources/gcore_instance.md

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gcore_instance Resource - terraform-provider-gcorelabs"
4+
subcategory: ""
5+
description: |-
6+
Represent instance
7+
---
8+
9+
# gcore_instance (Resource)
10+
11+
Represent instance
12+
13+
## Example Usage
14+
15+
```terraform
16+
provider gcore {
17+
user_name = "[email protected]"
18+
password = "testtest"
19+
gcore_platform = "http://api.stg-45.staging.gcdn.co"
20+
gcore_api = "http://10.100.179.92:33081"
21+
}
22+
resource "gcore_network" "network" {
23+
name = "network_example"
24+
mtu = 1450
25+
type = "vxlan"
26+
region_id = 1
27+
project_id = 1
28+
}
29+
30+
resource "gcore_subnet" "subnet" {
31+
name = "subnet_example"
32+
cidr = "192.168.10.0/24"
33+
network_id = gcore_network.network.id
34+
dns_nameservers = ["8.8.4.4", "1.1.1.1"]
35+
36+
host_routes {
37+
destination = "10.0.3.0/24"
38+
nexthop = "10.0.0.13"
39+
}
40+
41+
gateway_ip = "192.168.10.1"
42+
region_id = 1
43+
project_id = 1
44+
}
45+
46+
resource "gcore_volume" "first_volume" {
47+
name = "boot volume"
48+
type_name = "ssd_hiiops"
49+
size = 5
50+
image_id = "f4ce3d30-e29c-4cfd-811f-46f383b6081f"
51+
region_id = 1
52+
project_id = 1
53+
}
54+
55+
resource "gcore_volume" "second_volume" {
56+
name = "second volume"
57+
type_name = "ssd_hiiops"
58+
size = 5
59+
region_id = 1
60+
project_id = 1
61+
}
62+
63+
resource "gcore_instance" "instance" {
64+
flavor_id = "g1-standard-2-4"
65+
name = "test"
66+
67+
volume {
68+
source = "existing-volume"
69+
volume_id = gcore_volume.first_volume.id
70+
boot_index = 0
71+
}
72+
73+
volume {
74+
source = "existing-volume"
75+
volume_id = gcore_volume.second_volume.id
76+
boot_index = 1
77+
}
78+
79+
interface {
80+
type = "subnet"
81+
network_id = gcore_network.network.id
82+
subnet_id = gcore_subnet.subnet.id
83+
//port_id = null
84+
//ip_address = null
85+
//fip_source = null
86+
//existing_fip_id = null
87+
}
88+
89+
90+
security_group {
91+
id = "d75db0b2-58f1-4a11-88c6-a932bb897310"
92+
name = "default"
93+
}
94+
95+
metadata {
96+
key = "some_key"
97+
value = "some_data"
98+
}
99+
100+
configuration {
101+
key = "some_key"
102+
value = "some_data"
103+
}
104+
105+
region_id = 1
106+
project_id = 1
107+
}
108+
```
109+
110+
<!-- schema generated by tfplugindocs -->
111+
## Schema
112+
113+
### Required
114+
115+
- **flavor_id** (String)
116+
- **interface** (Block Set, Min: 1) (see [below for nested schema](#nestedblock--interface))
117+
- **volume** (Block Set, Min: 1) (see [below for nested schema](#nestedblock--volume))
118+
119+
### Optional
120+
121+
- **addresses** (Block List) (see [below for nested schema](#nestedblock--addresses))
122+
- **allow_app_ports** (Boolean)
123+
- **configuration** (Block List) (see [below for nested schema](#nestedblock--configuration))
124+
- **flavor** (Map of String)
125+
- **id** (String) The ID of this resource.
126+
- **keypair_name** (String)
127+
- **last_updated** (String)
128+
- **metadata** (Block List) (see [below for nested schema](#nestedblock--metadata))
129+
- **name** (String)
130+
- **name_templates** (List of String)
131+
- **password** (String)
132+
- **project_id** (Number)
133+
- **project_name** (String)
134+
- **region_id** (Number)
135+
- **region_name** (String)
136+
- **security_group** (Block List) Firewalls list (see [below for nested schema](#nestedblock--security_group))
137+
- **status** (String)
138+
- **userdata** (String)
139+
- **username** (String)
140+
- **vm_state** (String)
141+
142+
<a id="nestedblock--interface"></a>
143+
### Nested Schema for `interface`
144+
145+
Optional:
146+
147+
- **existing_fip_id** (String)
148+
- **fip_source** (String)
149+
- **ip_address** (String)
150+
- **network_id** (String) required if type is 'subnet' or 'any_subnet'
151+
- **port_id** (String) required if type is 'reserved_fixed_ip'
152+
- **subnet_id** (String) required if type is 'subnet'
153+
- **type** (String) Avalilable value is 'subnet', 'any_subnet', 'external', 'reserved_fixed_ip'
154+
155+
156+
<a id="nestedblock--volume"></a>
157+
### Nested Schema for `volume`
158+
159+
Required:
160+
161+
- **source** (String) Currently available only 'existing-volume' value
162+
163+
Optional:
164+
165+
- **attachment_tag** (String)
166+
- **boot_index** (Number) If boot_index==0 volumes can not detached
167+
- **delete_on_termination** (Boolean)
168+
- **id** (String) The ID of this resource.
169+
- **image_id** (String)
170+
- **name** (String)
171+
- **size** (Number)
172+
- **type_name** (String)
173+
- **volume_id** (String)
174+
175+
176+
<a id="nestedblock--addresses"></a>
177+
### Nested Schema for `addresses`
178+
179+
Required:
180+
181+
- **net** (Block List, Min: 1) (see [below for nested schema](#nestedblock--addresses--net))
182+
183+
<a id="nestedblock--addresses--net"></a>
184+
### Nested Schema for `addresses.net`
185+
186+
Required:
187+
188+
- **addr** (String)
189+
- **type** (String)
190+
191+
192+
193+
<a id="nestedblock--configuration"></a>
194+
### Nested Schema for `configuration`
195+
196+
Required:
197+
198+
- **key** (String)
199+
- **value** (String)
200+
201+
202+
<a id="nestedblock--metadata"></a>
203+
### Nested Schema for `metadata`
204+
205+
Required:
206+
207+
- **key** (String)
208+
- **value** (String)
209+
210+
211+
<a id="nestedblock--security_group"></a>
212+
### Nested Schema for `security_group`
213+
214+
Required:
215+
216+
- **id** (String) Firewall unique id
217+
- **name** (String)
218+
219+

docs/resources/gcore_keypair.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gcore_keypair Resource - terraform-provider-gcorelabs"
4+
subcategory: ""
5+
description: |-
6+
Represent a ssh key, do not depends on region
7+
---
8+
9+
# gcore_keypair (Resource)
10+
11+
Represent a ssh key, do not depends on region
12+
13+
## Example Usage
14+
15+
```terraform
16+
provider gcore {
17+
user_name = "[email protected]"
18+
password = "testtest"
19+
gcore_platform = "http://api.stg-45.staging.gcdn.co"
20+
gcore_api = "http://10.100.179.92:33081"
21+
}
22+
23+
resource "gcore_keypair" "kp" {
24+
project_id = 1
25+
public_key = "your public key here"
26+
sshkey_name = "test"
27+
}
28+
29+
output "kp" {
30+
value = gcore_keypair.kp
31+
}
32+
```
33+
34+
<!-- schema generated by tfplugindocs -->
35+
## Schema
36+
37+
### Required
38+
39+
- **public_key** (String)
40+
- **sshkey_name** (String)
41+
42+
### Optional
43+
44+
- **id** (String) The ID of this resource.
45+
- **project_id** (Number)
46+
- **project_name** (String)
47+
48+
### Read-Only
49+
50+
- **fingerprint** (String)
51+
- **sshkey_id** (String)
52+
53+

0 commit comments

Comments
 (0)