-
Notifications
You must be signed in to change notification settings - Fork 673
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create & validate create and validate Read & Create Function Satellite Config Terraform satellite storage final assignment-creation read function assignment complete sat-storage create changed read changed update & delete modified review comments regex changed final changes delete assignments param added storage configuration final add assignments to groups data sources for config and assignment added storage configuration enhancements storage configuration design updated storage configuration data source updated storage configuration data source updated - 1 satellite-storage docs added comments added secrets updated sensitive attribute added changed storage class param to computed secrets baseline updated secrets updated removed user secret parameters from config data source
- Loading branch information
1 parent
a2c0516
commit 7dc3743
Showing
27 changed files
with
2,132 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module "satellite-storage-assignment"{ | ||
source = "./modules/assignment" | ||
|
||
assignment_name = var.assignment_name | ||
cluster = var.cluster | ||
config = var.config | ||
controller = var.controller | ||
} |
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,11 @@ | ||
module "satellite-storage-configuration" { | ||
source = "./modules/configuration" | ||
|
||
location = var.location | ||
config_name = var.config_name | ||
storage_template_name = var.storage_template_name | ||
storage_template_version = var.storage_template_version | ||
user_config_parameters = var.user_config_parameters | ||
user_secret_parameters = var.user_secret_parameters | ||
storage_class_parameters = var.storage_class_parameters | ||
} |
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,85 @@ | ||
# This Module is used to create satellite storage assignment | ||
|
||
This module creates a `satellite storage assignment` based on a storage template of your choice. For more information on storage templates and their parameters refer -> https://cloud.ibm.com/docs/satellite?topic=satellite-storage-template-ov&interface=ui | ||
|
||
## Prerequisite | ||
|
||
* Set up the IBM Cloud command line interface (CLI), the Satellite plug-in, and other related CLIs. | ||
* Install cli and plugin package | ||
```console | ||
ibmcloud plugin install container-service | ||
``` | ||
## Usage | ||
|
||
``` | ||
terraform init | ||
``` | ||
``` | ||
terraform plan | ||
``` | ||
``` | ||
terraform apply | ||
``` | ||
``` | ||
terraform destroy | ||
``` | ||
## Example Usage | ||
|
||
``` hcl | ||
module "satellite-storage-assignment" { | ||
assignment_name = var.assignment_name | ||
cluster = var.cluster | ||
config = var.config | ||
controller = var.controller | ||
} | ||
``` | ||
|
||
### Assigning a Configuration to a cluster | ||
```hcl | ||
resource "ibm_satellite_storage_assignment" "odf_assignment" { | ||
assignment_name = var.assignment_name | ||
config = var.config | ||
cluster = var.cluster | ||
controller = var.controller | ||
} | ||
``` | ||
|
||
### Assigning a Configuration to Cluster Groups | ||
```hcl | ||
resource "ibm_satellite_storage_assignment" "odf_assignment" { | ||
assignment_name = var.assignment_name | ||
config = var.config | ||
groups = var.groups | ||
} | ||
``` | ||
|
||
### Updating the Configuration Revision to a cluster | ||
```hcl | ||
resource "ibm_satellite_storage_assignment" "odf_assignment" { | ||
assignment_name = var.assignment_name | ||
config = var.config | ||
cluster = var.cluster | ||
controller = var.controller | ||
update_config_revision = true | ||
} | ||
``` | ||
|
||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
## Inputs | ||
|
||
| Name | Description | Type | Required | | ||
|------|-------------|------|---------| | ||
| ibmcloud\_api\_key | IBM Cloud API key | `string` | true | | ||
| assignment_name | Name of the Assignment. | `string` | true | | ||
| groups | One or more cluster groups on which you want to apply the configuration. Note that at least one cluster group is required. | `list[string]` | true | | ||
| cluster | ID of the Satellite cluster or Service Cluster that you want to apply the configuration to. | `string` | true | | ||
| config | Storage Configuration Name or ID. | `string` | true | | ||
| controller | The Name or ID of the Satellite Location. | `string` | true | | ||
| update_config_revision | Update an assignment to the latest available storage configuration version. | `bool` | false | | ||
|
||
## Note | ||
* You cannot use the `groups` argument with `cluster` & `controller`, this is applicable when creating assignments to cluster groups. | ||
* Similarly `cluster` & `controller` are to be used together and cannot be used with `groups`, this is applicable when creating assignments to clusters. | ||
|
||
|
||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
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,7 @@ | ||
// Provision satellite_storage_assignment resource instance | ||
resource "ibm_satellite_storage_assignment" "instance" { | ||
assignment_name = var.assignment_name | ||
cluster = var.cluster | ||
config = var.config | ||
controller = var.controller | ||
} |
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,7 @@ | ||
terraform { | ||
required_providers { | ||
ibm = { | ||
source = "ibm-cloud/ibm" | ||
} | ||
} | ||
} |
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,29 @@ | ||
variable "assignment_name" { | ||
type = string | ||
description = "Name of the Assignment." | ||
} | ||
|
||
variable "groups" { | ||
type = list(string) | ||
description = "One or more cluster groups on which you want to apply the configuration. Note that at least one cluster group is required." | ||
} | ||
|
||
variable "cluster" { | ||
type = string | ||
description = "ID of the Satellite cluster or Service Cluster that you want to apply the configuration to." | ||
} | ||
|
||
variable "config" { | ||
type = string | ||
description = "Storage Configuration Name or ID." | ||
} | ||
|
||
variable "controller" { | ||
type = string | ||
description = "The Name or ID of the Satellite Location." | ||
} | ||
|
||
variable "update_config_revision" { | ||
type = bool | ||
description = "Update an assignment to the latest available storage configuration version." | ||
} |
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,85 @@ | ||
# This Module is used to create satellite storage configuration | ||
|
||
This module creates a `satellite storage configuration` based on a storage template of your choice. For more information on storage templates and their parameters refer -> https://cloud.ibm.com/docs/satellite?topic=satellite-storage-template-ov&interface=ui | ||
|
||
## Prerequisite | ||
|
||
* Set up the IBM Cloud command line interface (CLI), the Satellite plug-in, and other related CLIs. | ||
* Install cli and plugin package | ||
```console | ||
ibmcloud plugin install container-service | ||
``` | ||
## Usage | ||
|
||
``` | ||
terraform init | ||
``` | ||
``` | ||
terraform plan | ||
``` | ||
``` | ||
terraform apply | ||
``` | ||
``` | ||
terraform destroy | ||
``` | ||
## Example Usage | ||
|
||
``` hcl | ||
module "satellite-storage-configuration" { | ||
source = "./modules/configuration" | ||
location = var.location | ||
config_name = var.config_name | ||
storage_template_name = var.storage_template_name | ||
storage_template_version = var.storage_template_version | ||
user_config_parameters = var.user_config_parameters | ||
user_secret_parameters = var.user_secret_parameters | ||
storage_class_parameters = var.storage_class_parameters | ||
} | ||
``` | ||
|
||
### Example using the `odf-remote` storage template | ||
``` hcl | ||
resource "ibm_satellite_storage_configuration" "odf_storage_configuration" { | ||
location = var.location | ||
config_name = var.config_name | ||
storage_template_name = "odf-remote" | ||
storage_template_version = "4.12" | ||
user_config_parameters = { | ||
osd-size = "100Gi" | ||
osd-storage-class = "ibmc-vpc-block-metro-5iops-tier" | ||
billing-type = "advanced" | ||
cluster-encryption = "false" | ||
ibm-cos-endpoint = "" | ||
ibm-cos-location = "" | ||
ignore-noobaa = "false" | ||
kms-base-url = "" | ||
kms-encryption = "false" | ||
kms-instance-id = "" | ||
kms-instance-name = "" | ||
kms-token-url = "" | ||
num-of-osd = "1" | ||
odf-upgrade = "false" | ||
perform-cleanup = "false" | ||
worker-nodes = "" | ||
} | ||
user_secret_parameters = { | ||
iam-api-key = "api-key-value" | ||
} | ||
} | ||
``` | ||
|
||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
## Inputs | ||
|
||
| Name | Description | Type | Required | | ||
|------|-------------|------|---------| | ||
| ibmcloud\_api\_key | IBM Cloud API key | `string` | true | | ||
| config_name | The Storage Configuration Name. | `string` | true | | ||
| storage_template_name | The Name of the Storage Template to create the configuration. | `string` | true | | ||
| storage_template_version | The Version of the Storage Template. | `string` | true | | ||
| user_config_parameters | The different configuration parameters available based on the selected storage template | `map` | true | | ||
| user_secret_parameters | The different secrets required based on the selected storage template | `map` | true | | ||
| storage_class_parameters | Define your own storage classes if supported by the storage template | `list[map]` | true | | ||
|
||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
Oops, something went wrong.