saif-utilities / string_utilities¶
Provides various string manipulation functionality.
Functions¶
Below are descriptions of the various string functions within this module. Each function may require a specific input variable and will return a specific output variable.
Random Password¶
Generates a random password string value.
Variable Details¶
- Variable Name:
random_password_options - Type:
object - Description: Options for generating random password values
- Default Value:
null
random_password_options Properties¶
| Property | Type | Description | Default Value |
|---|---|---|---|
length |
number |
The length of the random password to generate | Required (no default) |
special_characters |
bool |
Whether to include special characters in the password | Required (no default) |
auto_rotate |
bool |
Perisist random generated value or rotate each time |
Output¶
random_password_value: The generated random password.
Usage Example¶
module "my_password" {
source = "app.terraform.io/SAIFCorp/utilities/saif//modules/string_utilities"
version = "~> 1.0"
random_password_options = {
length = 16
special_characters = true
auto_rotate = true
}
}
output "my_password_value" {
# NOTE: This is sensitive
value = string_utilities.my_password.randomPassword_value
}
If you don't need random password generation, you can leave this variable as null (the default value).
Providers¶
| Name | Version |
|---|---|
| random | >= 3.0, < 4.0 |
Inputs¶
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| random_password_options | Options for generating random password values. | object({ |
null |
no |
Outputs¶
| Name | Description |
|---|---|
| random_password_value | The generated random password. |
Resources¶
- resource.random_password.random_password (/terraform-docs/modules/string_utilities/main.tf#1)