Skip to content

Commit 27c14cf

Browse files
authored
Add docs for new resources (#81)
* Account * Disk Offering * Domain * Kubernetes (version & Cluster) * Network Offering * Service Offering * User * Volume * Zone
1 parent 37cb4da commit 27c14cf

10 files changed

+513
-0
lines changed

website/docs/r/account.html.markdown

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
layout: default
3+
page_title: "CloudStack: cloudstack_account"
4+
sidebar_current: "docs-cloudstack-resource-account"
5+
description: |-
6+
Creates a Account
7+
---
8+
9+
# CloudStack: cloudstack_account
10+
11+
A `cloudstack_account` resource manages an account within CloudStack.
12+
13+
## Example Usage
14+
15+
```hcl
16+
resource "cloudstack_account" "example" {
17+
18+
first_name = "John"
19+
last_name = "Doe"
20+
password = "securepassword"
21+
username = "jdoe"
22+
account_type = 1 # 1 for admin, 2 for domain admin, 0 for regular user
23+
role_id = "1234abcd" # ID of the role associated with the account
24+
}
25+
```
26+
27+
## Argument Reference
28+
29+
The following arguments are supported:
30+
31+
* `email` - (Required) The email address of the account owner.
32+
* `first_name` - (Required) The first name of the account owner.
33+
* `last_name` - (Required) The last name of the account owner.
34+
* `password` - (Required) The password for the account.
35+
* `username` - (Required) The username of the account.
36+
* `account_type` - (Required) The account type. Possible values are `0` for regular user, `1` for admin, and `2` for domain admin.
37+
* `role_id` - (Required) The ID of the role associated with the account.
38+
* `account` - (Optional) The account name. If not specified, the username will be used as the account name.
39+
40+
## Attributes Reference
41+
42+
The following attributes are exported:
43+
44+
* `id` - The ID of the account.
45+
46+
## Import
47+
48+
Accounts can be imported; use `<ACCOUNTID>` as the import ID. For example:
49+
50+
```shell
51+
$ terraform import cloudstack_account.example <ACCOUNTID>
52+
```
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
layout: default
3+
page_title: "CloudStack: cloudstack_disk_offering"
4+
sidebar_current: "docs-cloudstack-resource-disk_offering"
5+
description: |-
6+
Creates a Disk Offering
7+
---
8+
9+
# CloudStack: cloudstack_disk_offering
10+
11+
A `cloudstack_disk_offering` resource manages a disk offering within CloudStack.
12+
13+
## Example Usage
14+
15+
```hcl
16+
resource "cloudstack_disk_offering" "example" {
17+
name = "example-disk-offering"
18+
display_text = "Example Disk Offering"
19+
disk_size = 100
20+
}
21+
```
22+
23+
24+
## Argument Reference
25+
26+
The following arguments are supported:
27+
28+
* `name` - (Required) The name of the disk offering.
29+
* `display_text` - (Required) The display text of the disk offering.
30+
* `disk_size` - (Required) The size of the disk offering in GB.
31+
32+
## Attributes Reference
33+
34+
The following attributes are exported:
35+
36+
* `id` - The ID of the disk offering.
37+
* `name` - The name of the disk offering.
38+
* `display_text` - The display text of the disk offering.
39+
* `disk_size` - The size of the disk offering in GB.
40+
41+
## Import
42+
43+
Disk offerings can be imported; use `<DISKOFFERINGID>` as the import ID. For example:
44+
45+
```shell
46+
$ terraform import cloudstack_disk_offering.example <DISKOFFERINGID>
47+
```

website/docs/r/domain.html.markdown

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
layout: default
3+
page_title: "CloudStack: cloudstack_domain"
4+
sidebar_current: "docs-cloudstack-resource-domain"
5+
description: |-
6+
Creates a Domain
7+
---
8+
9+
# CloudStack: cloudstack_domain
10+
11+
A `cloudstack_domain` resource manages a domain within CloudStack.
12+
13+
## Example Usage
14+
15+
```hcl
16+
resource "cloudstack_domain" "example" {
17+
name = "example-domain"
18+
network_domain = "example.local"
19+
parent_domain_id = "ROOT"
20+
}
21+
```
22+
23+
24+
## Argument Reference
25+
26+
The following arguments are supported:
27+
28+
* `name` - (Required) The name of the domain.
29+
* `domain_id` - (Optional) The ID of the domain.
30+
* `network_domain` - (Optional) The network domain for the domain.
31+
* `parent_domain_id` - (Optional) The ID of the parent domain.
32+
33+
## Attributes Reference
34+
35+
The following attributes are exported:
36+
37+
* `id` - The ID of the domain.
38+
* `name` - The name of the domain.
39+
* `network_domain` - The network domain for the domain.
40+
* `parent_domain_id` - The ID of the parent domain.
41+
42+
## Import
43+
44+
Domains can be imported; use `<DOMAINID>` as the import ID. For example:
45+
46+
```shell
47+
$ terraform import cloudstack_domain.example <DOMAINID>
48+
```
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
layout: default
3+
page_title: "CloudStack: cloudstack_kubernetes_cluster"
4+
sidebar_current: "docs-cloudstack-resource-kubernetes_cluster"
5+
description: |-
6+
Creates a Kubernetes Cluster
7+
---
8+
9+
# CloudStack: cloudstack_kubernetes_cluster
10+
11+
A `cloudstack_kubernetes_cluster` resource manages a Kubernetes cluster within CloudStack.
12+
13+
## Example Usage
14+
15+
```hcl
16+
resource "cloudstack_kubernetes_cluster" "example" {
17+
name = "example-cluster"
18+
zone = "zone-id"
19+
kubernetes_version = "1.18.6"
20+
service_offering = "small"
21+
size = 1
22+
autoscaling_enabled = true
23+
min_size = 1
24+
max_size = 5
25+
control_nodes_size = 1
26+
description = "An example Kubernetes cluster"
27+
keypair = "my-ssh-key"
28+
network_id = "net-id"
29+
state = "Running"
30+
project = "my-project"
31+
}
32+
```
33+
34+
35+
## Argument Reference
36+
37+
The following arguments are supported:
38+
39+
* `name` - (Required) The name of the Kubernetes cluster.
40+
* `zone` - (Required) The zone where the Kubernetes cluster will be deployed.
41+
* `kubernetes_version` - (Required) The Kubernetes version for the cluster.
42+
* `service_offering` - (Required) The service offering for the nodes in the cluster.
43+
* `size` - (Optional) The initial size of the Kubernetes cluster. Defaults to `1`.
44+
* `autoscaling_enabled` - (Optional) Whether autoscaling is enabled for the cluster.
45+
* `min_size` - (Optional) The minimum size of the Kubernetes cluster when autoscaling is enabled.
46+
* `max_size` - (Optional) The maximum size of the Kubernetes cluster when autoscaling is enabled.
47+
* `control_nodes_size` - (Optional) The size of the control nodes in the cluster.
48+
* `description` - (Optional) A description for the Kubernetes cluster.
49+
* `keypair` - (Optional) The SSH key pair to use for the nodes in the cluster.
50+
* `network_id` - (Optional) The network ID to connect the Kubernetes cluster to.
51+
* `ip_address` - (Computed) The IP address of the Kubernetes cluster.
52+
* `state` - (Optional) The state of the Kubernetes cluster. Defaults to `"Running"`.
53+
* `project` - (Optional) The project to assign the Kubernetes cluster to.
54+
55+
## Attributes Reference
56+
57+
The following attributes are exported:
58+
59+
* `id` - The ID of the Kubernetes cluster.
60+
* `name` - The name of the Kubernetes cluster.
61+
* `description` - The description of the Kubernetes cluster.
62+
* `control_nodes_size` - The size of the control nodes in the cluster.
63+
* `size` - The size of the Kubernetes cluster.
64+
* `autoscaling_enabled` - Whether autoscaling is enabled for the cluster.
65+
* `min_size` - The minimum size of the Kubernetes cluster when autoscaling is enabled.
66+
* `max_size` - The maximum size of the Kubernetes cluster when autoscaling is enabled.
67+
* `keypair` - The SSH key pair used for the nodes in the cluster.
68+
* `network_id` - The network ID connected to the Kubernetes cluster.
69+
* `ip_address` - The IP address of the Kubernetes cluster.
70+
* `state` - The state of the Kubernetes cluster.
71+
* `project` - The project assigned to the Kubernetes cluster.
72+
73+
## Import
74+
75+
Kubernetes clusters can be imported; use `<KUBERNETESCLUSTERID>` as the import ID. For example:
76+
77+
```shell
78+
$ terraform import cloudstack_kubernetes_cluster.example <KUBERNETESCLUSTERID>
79+
```
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
layout: default
3+
page_title: "CloudStack: cloudstack_kubernetes_version"
4+
sidebar_current: "docs-cloudstack-resource-kubernetes_version"
5+
description: |-
6+
Creates a Kubernetes Version
7+
---
8+
9+
# CloudStack: cloudstack_kubernetes_version
10+
11+
A `cloudstack_kubernetes_version` resource manages a Kubernetes version within CloudStack.
12+
13+
## Example Usage
14+
15+
```hcl
16+
resource "cloudstack_kubernetes_version" "example" {
17+
semantic_version = "1.19.0"
18+
url = "https://example.com/k8s/1.19.0.tar.gz"
19+
min_cpu = 2
20+
min_memory = 2048
21+
}
22+
```
23+
24+
## Argument Reference
25+
26+
The following arguments are supported:
27+
28+
* `semantic_version` - (Required) The semantic version of the Kubernetes version.
29+
* `url` - (Required) The URL to download the Kubernetes version package.
30+
* `min_cpu` - (Required) The minimum CPU requirement for the Kubernetes version.
31+
* `min_memory` - (Required) The minimum memory requirement for the Kubernetes version.
32+
* `name` - (Optional) The name of the Kubernetes version.
33+
* `zone` - (Optional) The zone in which the Kubernetes version should be added.
34+
* `checksum` - (Optional) The checksum of the Kubernetes version package.
35+
* `state` - (Optional) The state of the Kubernetes version. Defaults to "Enabled".
36+
37+
## Attributes Reference
38+
39+
The following attributes are exported:
40+
41+
* `id` - The ID of the Kubernetes version.
42+
* `semantic_version` - The semantic version of the Kubernetes version.
43+
* `name` - The name of the Kubernetes version.
44+
* `min_cpu` - The minimum CPU requirement for the Kubernetes version.
45+
* `min_memory` - The minimum memory requirement for the Kubernetes version.
46+
* `state` - The state of the Kubernetes version.
47+
48+
## Import
49+
50+
Kubernetes versions can be imported using the ID of the resource; use `<KUBERNETESVERSIONID>` as the import ID. For example:
51+
52+
```shell
53+
$ terraform import cloudstack_kubernetes_version.example <KUBERNETESVERSIONID>
54+
```
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
layout: default
3+
page_title: "CloudStack: cloudstack_network_offering"
4+
sidebar_current: "docs-cloudstack-resource-network_offering"
5+
description: |-
6+
Creates a Network Offering
7+
---
8+
9+
# CloudStack: cloudstack_network_offering
10+
11+
A `cloudstack_network_offering` resource manages a network offering within CloudStack.
12+
13+
## Example Usage
14+
15+
```hcl
16+
resource "cloudstack_network_offering" "example" {
17+
name = "example-network-offering"
18+
display_text = "Example Network Offering"
19+
guest_ip_type = "Shared"
20+
traffic_type = "Guest"
21+
}
22+
```
23+
24+
25+
## Argument Reference
26+
27+
The following arguments are supported:
28+
29+
* `name` - (Required) The name of the network offering.
30+
* `display_text` - (Required) The display text of the network offering.
31+
* `guest_ip_type` - (Required) The type of IP address allocation for the network offering. Possible values are "Shared" or "Isolated".
32+
* `traffic_type` - (Required) The type of traffic for the network offering. Possible values are "Guest" or "Management".
33+
34+
## Attributes Reference
35+
36+
The following attributes are exported:
37+
38+
* `id` - The ID of the network offering.
39+
* `name` - The name of the network offering.
40+
* `display_text` - The display text of the network offering.
41+
* `guest_ip_type` - The type of IP address allocation for the network offering.
42+
* `traffic_type` - The type of traffic for the network offering.
43+
44+
## Import
45+
46+
Network offerings can be imported; use `<NETWORKOFFERINGID>` as the import ID. For example:
47+
48+
```shell
49+
$ terraform import cloudstack_network_offering.example <NETWORKOFFERINGID>
50+
```
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
layout: default
3+
title: "CloudStack: cloudstack_service_offering"
4+
sidebar_current: "docs-cloudstack-resource-service_offering"
5+
description: |-
6+
Creates a Service Offering
7+
---
8+
9+
# CloudStack: cloudstack_service_offering
10+
11+
A `cloudstack_service_offering` resource manages a service offering within CloudStack.
12+
13+
## Example Usage
14+
15+
```hcl
16+
resource "cloudstack_service_offering" "example" {
17+
name = "example-service-offering"
18+
display_text = "Example Service Offering"
19+
}
20+
```
21+
22+
23+
## Argument Reference
24+
25+
The following arguments are supported:
26+
27+
* `name` - (Required) The name of the service offering.
28+
* `display_text` - (Required) The display text of the service offering.
29+
30+
## Attributes Reference
31+
32+
The following attributes are exported:
33+
34+
* `id` - The ID of the service offering.
35+
* `name` - The name of the service offering.
36+
* `display_text` - The display text of the service offering.
37+
38+
## Import
39+
40+
Service offerings can be imported; use `<SERVICEOFFERINGID>` as the import ID. For example:
41+
42+
```shell
43+
$ terraform import cloudstack_service_offering.example <SERVICEOFFERINGID>
44+
```

0 commit comments

Comments
 (0)