Skip to content

Commit 025f8ca

Browse files
authored
fix: added supported documentation for some of the complex object type input variable for the DA solution. (#216)
1 parent 7200a84 commit 025f8ca

File tree

3 files changed

+154
-4
lines changed

3 files changed

+154
-4
lines changed

.secrets.baseline

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2024-06-28T12:56:39Z",
6+
"generated_at": "2024-07-10T14:07:34Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -86,6 +86,24 @@
8686
"type": "Secret Keyword",
8787
"verified_result": null
8888
}
89+
],
90+
"solutions/standard/DA-types.md": [
91+
{
92+
"hashed_secret": "44cdfc3615970ada14420caaaa5c5745fca06002",
93+
"is_secret": false,
94+
"is_verified": false,
95+
"line_number": 58,
96+
"type": "Secret Keyword",
97+
"verified_result": null
98+
},
99+
{
100+
"hashed_secret": "bd0d0d73a240c29656fb8ae0dfa5f863077788dc",
101+
"is_secret": false,
102+
"is_verified": false,
103+
"line_number": 63,
104+
"type": "Secret Keyword",
105+
"verified_result": null
106+
}
89107
]
90108
},
91109
"version": "0.13.1+ibm.62.dss",

solutions/standard/DA-types.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Configuring complex inputs in Databases for Elasticsearch
2+
3+
Several optional input variables in the IBM Cloud [Databases for Elasticsearch deployable architecture](https://cloud.ibm.com/catalog#deployable_architecture) use complex object types. You specify these inputs when you configure you deployable architecture.
4+
5+
- [Service credentials](#svc-credential-name) (`service_credential_names`)
6+
- [Users](#users) (`users`)
7+
- [Autoscaling](#autoscaling) (`auto_scaling`)
8+
9+
## Service credentials <a name="svc-credential-name"></a>
10+
11+
You can specify a set of IAM credentials to connect to the database with the `service_credential_names` input variable. Include a credential name and IAM service role for each key-value pair. Each role provides a specific level of access to the database. For more information, see [Adding and viewing credentials](https://cloud.ibm.com/docs/account?topic=account-service_credentials&interface=ui).
12+
13+
- Variable name: `service_credential_names`.
14+
- Type: A map. The key is the name of the service credential. The value is the role that is assigned to that credential.
15+
- Default value: An empty map (`{}`).
16+
17+
### Options for service_credential_names
18+
19+
- Key (required): The name of the service credential.
20+
- Value (required): The IAM service role that is assigned to the credential. For more information, see [IBM Cloud IAM roles](https://cloud.ibm.com/docs/account?topic=account-userroles).
21+
22+
### Example service credential
23+
24+
```hcl
25+
{
26+
"es_admin" : "Administrator",
27+
"es_reader" : "Operator",
28+
"es_viewer" : "Viewer",
29+
"es_editor" : "Editor"
30+
}
31+
```
32+
33+
34+
## Users <a name="users"></a>
35+
36+
If you can't use the IAM-enabled `service_credential_names` input variable for access, you can create users and roles directly in the database. For more information, see [Managing users and roles](https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=databases-for-elasticsearch-user-management&interface=ui).
37+
38+
:exclamation: **Important:** The `users` input contains sensitive information (the user's password).
39+
40+
- Variable name: `users`.
41+
- Type: A list of objects that represent a user
42+
- Default value: An empty list (`[]`)
43+
44+
### Options for users
45+
46+
- `name` (required): The username for the user account.
47+
- `password` (required): The password for the user account in the range of 10-32 characters.
48+
- `type` (required): The user type. The "type" field is required to generate the connection string for the outputs.
49+
- `role`: The user role. The role determines the user's access level and permissions.
50+
51+
### Example users
52+
53+
54+
```hcl
55+
[
56+
{
57+
"name": "es_admin",
58+
"password": "securepassword123",
59+
"type": "database",
60+
},
61+
{
62+
"name": "es_reader",
63+
"password": "readpassword123",
64+
"type": "ops_manager"
65+
}
66+
]
67+
```
68+
69+
## Autoscaling <a name="autoscaling"></a>
70+
71+
The Autoscaling variable sets the rules for how database increase resources in response to usage. Make sure you understand the effects of autoscaling, especially for production environments. For more information, see [Autoscaling](https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=databases-for-elasticsearch-autoscaling&interface=cli#autoscaling-considerations).
72+
73+
- Variable name: `auto_scaling`
74+
- Type: An object with `disk` and `memory` configurations
75+
76+
### Disk options for auto_scaling
77+
78+
Disk autoscaling specifies thresholds when scaling can occur based on disk usage, disk I/O utilization, or both.
79+
80+
The disk object in the `auto_scaling` input contains the following options. All options are optional.
81+
82+
- `capacity_enabled`: Whether disk capacity autoscaling is enabled (default: `false`).
83+
- `free_space_less_than_percent`: The percentage of free disk space that triggers autoscaling (default: `10`).
84+
- `io_above_percent`: The percentage of I/O (input/output) disk usage that triggers autoscaling (default: `90`).
85+
- `io_enabled`: Indicates whether IO-based autoscaling is enabled (default: `false`).
86+
- `io_over_period`: How long I/O usage is evaluated for autoscaling (default: `"15m"` (15 minutes)).
87+
- `rate_increase_percent`: The percentage increase in disk capacity when autoscaling is triggered (default: `10`).
88+
- `rate_limit_mb_per_member`: The limit in megabytes for the rate of disk increase per member (default: `3670016`).
89+
- `rate_period_seconds`: How long (in seconds) the rate limit is applied for disk (default: `900` (15 minutes)).
90+
- `rate_units`: The units to use for the rate increase (default: `"mb"` (megabytes)).
91+
92+
93+
### Memory options for auto_scaling
94+
95+
The memory object within auto_scaling contains the following options. All options are optional.
96+
97+
- `io_above_percent`: The percentage of I/O memory usage that triggers autoscaling (default: `90`).
98+
- `io_enabled`: Whether IO-based autoscaling for memory is enabled (default: `false`).
99+
- `io_over_period`: How long I/O usage is evaluated for memory autoscaling (default: `"15m"` (15 minutes)).
100+
- `rate_increase_percent`: The percentage increase in memory capacity that triggers autoscaling (default: `10`).
101+
- `rate_limit_mb_per_member`: The limit in megabytes for the rate of memory increase per member (default: `114688`).
102+
- `rate_period_seconds`: How long (in seconds) the rate limit is applied for memory (default: `900` (15 minutes)).
103+
- `rate_units`: The memory size units to use for the rate increase (default: `"mb"` (megabytes)).
104+
105+
### Example autoscaling
106+
107+
The following example shows values for both disk and memory for the `auto_scaling` input.
108+
109+
```hcl
110+
{
111+
"disk": {
112+
"capacity_enabled": true,
113+
"free_space_less_than_percent": 15,
114+
"io_above_percent": 85,
115+
"io_enabled": true,
116+
"io_over_period": "15m",
117+
"rate_increase_percent": 15,
118+
"rate_limit_mb_per_member": 3670016,
119+
"rate_period_seconds": 900,
120+
"rate_units": "mb"
121+
},
122+
"memory": {
123+
"io_above_percent": 90,
124+
"io_enabled": true,
125+
"io_over_period": "15m",
126+
"rate_increase_percent": 10,
127+
"rate_limit_mb_per_member": 114688,
128+
"rate_period_seconds": 900,
129+
"rate_units": "mb"
130+
}
131+
}
132+
```

solutions/standard/variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ variable "member_host_flavor" {
8787
}
8888

8989
variable "service_credential_names" {
90-
description = "The map of name and role for service credentials that you want to create for the database."
90+
description = "The map of name and role for service credentials that you want to create for the database. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-icd-elasticsearch/tree/main/solutions/standard/DA-types.md)."
9191
type = map(string)
9292
default = {}
9393
}
@@ -108,7 +108,7 @@ variable "users" {
108108
}))
109109
default = []
110110
sensitive = true
111-
description = "The list of users that have access to the database. Multiple blocks are allowed. The user password must be 10-32 characters. In most cases, you can use IAM service credentials (by specifying `service_credential_names`) to control access to the database instance. This block creates native database users. [Learn more](https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=databases-for-elasticsearch-user-management&interface=ui)."
111+
description = "The list of users that have access to the database. Multiple blocks are allowed. The user password must be 10-32 characters. In most cases, you can use IAM service credentials (by specifying `service_credential_names`) to control access to the database instance. This block creates native database users. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-icd-elasticsearch/tree/main/solutions/standard/DA-types.md)."
112112
}
113113

114114
variable "tags" {
@@ -180,6 +180,6 @@ variable "auto_scaling" {
180180
rate_units = optional(string, "mb")
181181
})
182182
})
183-
description = "The rules to allow the database to increase resources in response to usage. Only a single autoscaling block is allowed. Make sure you understand the effects of autoscaling, especially for production environments. [Learn more](https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=databases-for-elasticsearch-autoscaling&interface=cli#autoscaling-considerations)."
183+
description = "The rules to allow the database to increase resources in response to usage. Only a single autoscaling block is allowed. Make sure you understand the effects of autoscaling, especially for production environments. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-icd-elasticsearch/tree/main/solutions/standard/DA-types.md)."
184184
default = null
185185
}

0 commit comments

Comments
 (0)