You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These examples illustrate how to use the resources and data sources associated with sdsaas.
4
+
5
+
The following resources are supported:
6
+
* ibm_sds_volume
7
+
* ibm_sds_host
8
+
9
+
## Usage
10
+
11
+
To run this example, execute the following commands:
12
+
13
+
```bash
14
+
$ terraform init
15
+
$ terraform plan
16
+
$ terraform apply
17
+
```
18
+
19
+
Run `terraform destroy` when you don't need these resources.
20
+
21
+
## sdsaas resources
22
+
23
+
### Resource: ibm_sds_volume
24
+
25
+
```hcl
26
+
resource "ibm_sds_volume" "sds_volume_instance" {
27
+
sds_endpoint = var.sds_endpoint
28
+
hostnqnstring = var.sds_volume_hostnqnstring
29
+
capacity = var.sds_volume_capacity
30
+
name = var.sds_volume_name
31
+
}
32
+
```
33
+
34
+
#### Inputs
35
+
36
+
| Name | Description | Type | Required |
37
+
|------|-------------|------|---------|
38
+
| ibmcloud\_api\_key | IBM Cloud API key |`string`| true |
39
+
| sds_endpoint | IBM Cloud Endpoint |`string`| false |
40
+
| hostnqnstring | The host nqn. |`string`| false |
41
+
| capacity | The capacity of the volume (in gigabytes). |`number`| true |
42
+
| name | The name of the volume. |`string`| false |
43
+
44
+
#### Outputs
45
+
46
+
| Name | Description |
47
+
|------|-------------|
48
+
| bandwidth | The maximum bandwidth (in megabits per second) for the volume. |
49
+
| created_at | The date and time that the volume was created. |
50
+
| hosts | List of host details that volume is mapped to. |
51
+
| iops | Iops The maximum I/O operations per second (IOPS) for this volume. |
52
+
| resource_type | The resource type of the volume. |
53
+
| status | The current status of the volume. |
54
+
| status_reasons | Reasons for the current status of the volume. |
55
+
56
+
### Resource: ibm_sds_host
57
+
58
+
```hcl
59
+
resource "ibm_sds_host" "sds_host_instance" {
60
+
sds_endpoint = var.sds_endpoint
61
+
name = var.sds_host_name
62
+
nqn = var.sds_host_nqn
63
+
volumes = var.sds_host_volumes
64
+
}
65
+
```
66
+
67
+
#### Inputs
68
+
69
+
| Name | Description | Type | Required |
70
+
|------|-------------|------|---------|
71
+
| ibmcloud\_api\_key | IBM Cloud API key |`string`| true |
72
+
| sds_endpoint | IBM Cloud Endpoint |`string`| false |
73
+
| name | The name for this host. The name must not be used by another host. If unspecified, the name will be a hyphenated list of randomly-selected words. |`string`| false |
74
+
| nqn | The NQN of the host configured in customer's environment. |`string`| true |
75
+
| volumes | The host-to-volume map. |`list()`| false |
76
+
77
+
#### Outputs
78
+
79
+
| Name | Description |
80
+
|------|-------------|
81
+
| created_at | The date and time that the host was created. |
82
+
83
+
84
+
## Assumptions
85
+
86
+
The `IBMCLOUD_SDS_ENDPOINT` can optionally be set instead of setting `sds_endpoint` in each of the resources. This is the endpoint provided to customers to perform operations against their service.
description="The capacity of the volume (in gigabytes)."
19
+
type=number
20
+
default=10
21
+
}
22
+
variable"sds_volume_name_1" {
23
+
description="The name of the volume."
24
+
type=string
25
+
default="demo-volume-1"
26
+
}
27
+
28
+
variable"sds_volume_name_2" {
29
+
description="The name of the volume."
30
+
type=string
31
+
default="demo-volume-2"
32
+
}
33
+
34
+
variable"sds_host_name" {
35
+
description="The name for this host. The name must not be used by another host. If unspecified, the name will be a hyphenated list of randomly-selected words."
36
+
type=string
37
+
default="demo-host"
38
+
}
39
+
variable"sds_host_nqn" {
40
+
description="The NQN of the host configured in customer's environment."
This area is primarily for IBM provider contributors and maintainers. For information on _using_ Terraform and the IBM provider, see the links below.
4
+
5
+
6
+
## Handy Links
7
+
*[Find out about contributing](../../../CONTRIBUTING.md) to the IBM provider!
8
+
* IBM Provider Docs: [Home](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs)
9
+
* IBM Provider Docs: [One of the resources](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/sds_volume)
10
+
* IBM API Docs: [IBM API Docs for block](https://cloud.ibm.com/apidocs/block-storage). [IBM API Docs for storage](https://cloud.ibm.com/apidocs/object-storage)
11
+
* IBM SDK: [IBM SDK for software defined storage](https://github.com/IBM/sds-go-sdk/tree/master/sdsaasv1)
0 commit comments