» random_password

Identical to random_string with the exception that the result is treated as sensitive and, thus, not displayed in console output.

This resource does use a cryptographic random number generator.

» Example Usage

resource "random_password" "password" {
  length = 16
  special = true
  override_special = "_%@"
}

resource "aws_db_instance" "example" {
  instance_class = "db.t3.micro"
  allocated_storage = 64
  engine = "mysql"
  username = "someone"
  password = random_password.password.result
}