-
Notifications
You must be signed in to change notification settings - Fork 675
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(partner center sell): merge conflict resolved
Signed-off-by: Peter Harasztia <[email protected]>
- Loading branch information
Showing
89 changed files
with
5,587 additions
and
2,161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Examples for sdsaas | ||
|
||
These examples illustrate how to use the resources and data sources associated with sdsaas. | ||
|
||
The following resources are supported: | ||
* ibm_sds_volume | ||
* ibm_sds_host | ||
|
||
## Usage | ||
|
||
To run this example, execute the following commands: | ||
|
||
```bash | ||
$ terraform init | ||
$ terraform plan | ||
$ terraform apply | ||
``` | ||
|
||
Run `terraform destroy` when you don't need these resources. | ||
|
||
## sdsaas resources | ||
|
||
### Resource: ibm_sds_volume | ||
|
||
```hcl | ||
resource "ibm_sds_volume" "sds_volume_instance" { | ||
sds_endpoint = var.sds_endpoint | ||
hostnqnstring = var.sds_volume_hostnqnstring | ||
capacity = var.sds_volume_capacity | ||
name = var.sds_volume_name | ||
} | ||
``` | ||
|
||
#### Inputs | ||
|
||
| Name | Description | Type | Required | | ||
|------|-------------|------|---------| | ||
| ibmcloud\_api\_key | IBM Cloud API key | `string` | true | | ||
| sds_endpoint | IBM Cloud Endpoint | `string` | false | | ||
| hostnqnstring | The host nqn. | `string` | false | | ||
| capacity | The capacity of the volume (in gigabytes). | `number` | true | | ||
| name | The name of the volume. | `string` | false | | ||
|
||
#### Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| bandwidth | The maximum bandwidth (in megabits per second) for the volume. | | ||
| created_at | The date and time that the volume was created. | | ||
| hosts | List of host details that volume is mapped to. | | ||
| iops | Iops The maximum I/O operations per second (IOPS) for this volume. | | ||
| resource_type | The resource type of the volume. | | ||
| status | The current status of the volume. | | ||
| status_reasons | Reasons for the current status of the volume. | | ||
|
||
### Resource: ibm_sds_host | ||
|
||
```hcl | ||
resource "ibm_sds_host" "sds_host_instance" { | ||
sds_endpoint = var.sds_endpoint | ||
name = var.sds_host_name | ||
nqn = var.sds_host_nqn | ||
volumes = var.sds_host_volumes | ||
} | ||
``` | ||
|
||
#### Inputs | ||
|
||
| Name | Description | Type | Required | | ||
|------|-------------|------|---------| | ||
| ibmcloud\_api\_key | IBM Cloud API key | `string` | true | | ||
| sds_endpoint | IBM Cloud Endpoint | `string` | false | | ||
| 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 | | ||
| nqn | The NQN of the host configured in customer's environment. | `string` | true | | ||
| volumes | The host-to-volume map. | `list()` | false | | ||
|
||
#### Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| created_at | The date and time that the host was created. | | ||
|
||
|
||
## Assumptions | ||
|
||
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. | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| terraform | ~> 0.12 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| ibm | 1.13.1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
provider "ibm" { | ||
ibmcloud_api_key = var.ibmcloud_api_key | ||
} | ||
|
||
// Provision sds_volume resource instance | ||
resource "ibm_sds_volume" "sds_volume_instance_1" { | ||
sds_endpoint = var.sds_endpoint | ||
|
||
hostnqnstring = var.sds_volume_hostnqnstring | ||
capacity = var.sds_volume_capacity | ||
name = var.sds_volume_name_1 | ||
} | ||
|
||
// Provision sds_volume resource instance | ||
resource "ibm_sds_volume" "sds_volume_instance_2" { | ||
sds_endpoint = var.sds_endpoint | ||
|
||
hostnqnstring = var.sds_volume_hostnqnstring | ||
capacity = var.sds_volume_capacity | ||
name = var.sds_volume_name_2 | ||
} | ||
|
||
// Provision sds_host resource instance | ||
resource "ibm_sds_host" "sds_host_instance" { | ||
sds_endpoint = var.sds_endpoint | ||
|
||
name = var.sds_host_name | ||
nqn = var.sds_host_nqn | ||
volumes { | ||
volume_id = ibm_sds_volume.sds_volume_instance_1.id | ||
volume_name = ibm_sds_volume.sds_volume_instance_1.name | ||
} | ||
volumes { | ||
volume_id = ibm_sds_volume.sds_volume_instance_2.id | ||
volume_name = ibm_sds_volume.sds_volume_instance_2.name | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// This output allows sds_volume data to be referenced by other resources and the terraform CLI | ||
// Modify this output if only certain data should be exposed | ||
output "ibm_sds_volume" { | ||
value = [ibm_sds_volume.sds_volume_instance_1, ibm_sds_volume.sds_volume_instance_2] | ||
description = "sds_volume resource instance" | ||
} | ||
// This output allows sds_host data to be referenced by other resources and the terraform CLI | ||
// Modify this output if only certain data should be exposed | ||
output "ibm_sds_host" { | ||
value = ibm_sds_host.sds_host_instance | ||
description = "sds_host resource instance" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
variable "ibmcloud_api_key" { | ||
description = "IBM Cloud API key" | ||
type = string | ||
} | ||
|
||
variable "sds_endpoint" { | ||
description = "IBM SDS Endpoint" | ||
type = string | ||
default = "<endpoint>" | ||
} | ||
|
||
variable "sds_volume_hostnqnstring" { | ||
description = "The host nqn." | ||
type = string | ||
default = "nqn.2014-06.org:9345" | ||
} | ||
variable "sds_volume_capacity" { | ||
description = "The capacity of the volume (in gigabytes)." | ||
type = number | ||
default = 10 | ||
} | ||
variable "sds_volume_name_1" { | ||
description = "The name of the volume." | ||
type = string | ||
default = "demo-volume-1" | ||
} | ||
|
||
variable "sds_volume_name_2" { | ||
description = "The name of the volume." | ||
type = string | ||
default = "demo-volume-2" | ||
} | ||
|
||
variable "sds_host_name" { | ||
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." | ||
type = string | ||
default = "demo-host" | ||
} | ||
variable "sds_host_nqn" { | ||
description = "The NQN of the host configured in customer's environment." | ||
type = string | ||
default = "nqn.2014-06.org:9345" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
terraform { | ||
required_version = ">= 1.0" | ||
required_providers { | ||
ibm = { | ||
source = "IBM-Cloud/ibm" | ||
version = "1.71.0-beta1" | ||
} | ||
} | ||
} |
Oops, something went wrong.