terraform-aws-redshift
terraform-aws-redshift copied to clipboard
Invalid value for master_password (cannot contain [/@"' ])
Description
When creating a new Redshift cluster, I am facing the following error when using the attribute create_random_password = true
β Error: invalid value for master_password (cannot contain [/@"' ])
β
β with module.redshift_dwh.aws_redshift_cluster.this[0],
β on .terraform/modules/redshift_dwh/main.tf line 62, in resource "aws_redshift_cluster" "this":
β 62: master_password = var.snapshot_identifier != null ? null : local.master_password
β
β΅
Versions
-
Module version [Required]:
4.0.2 -
Terraform version:
v1.2.6
- Provider version(s):
registry.terraform.io/hashicorp/aws v4.33.0
Reproduction Code [Required]
module "redshift" {
source = "terraform-aws-modules/redshift/aws"
version = "4.0.2"
node_type = "dc2.large"
master_username = "redshift"
create_random_password = true
Expected behavior
The attribute create_random_password = true helps creating the password automatically.
Actual behavior
The randomized password has special characters that Redshift does not allow for creation.
Additional context
For workaround, I have done as follows
- added a custom
random_passwordresource to remove special characters. - set
create_random_password = false - manually set
master_passwordwith reference to my customrandom_passwordresource