/terraform-random-password

Terraform Module for the random_password resource

Primary LanguageMakefile

WAF ACL Rules

Build Status Tag License

Using Terragrunt Dependencies, this module is simple to use as input for the password of an RDS Database

This Terraform module creates random_passwords with predifined minimal strength of"

  • 16 chars length
  • Minimum 2 upper
  • Minimum 2 lower
  • Minimum 2 numbers
  • Minimum 2 special chars
  • Special chars defined are "!@#$%&*()-_=+[]{}<>:?"

Usage

Not using Keeper

module "random_password_no_keeper" {
  source = "../../"
}

output "random_password_no_keeper" {
  value = module.random_password_no_keeper.this_password
}

Using Keeper

## Without Keeper
module "random_password_with_keeper" {
  source = "../../"
  keepers = {
    # Generate a new password each time we have a new timestamp
    time = timestamp()
  }
}

output "random_password_with_keeper" {
  value = module.random_password_with_keeper.this_password
}

Inputs

Name Description Type Default Required
keepers map {} no
length number "16" no
lower bool "true" no
min_lower number "2" no
min_numeric number "2" no
min_special number "2" no
min_upper number "2" no
number bool "true" no
override_special string "!@#$%\u0026*()-_=+[]{}\u003c\u003e:?" no
special bool "true" no
upper bool "true" no

Outputs

Name Description
this_password
this_password_as_json
this_password_as_list
this_password_as_yaml
this_password_b64
this_password_md5
this_password_sha1
this_password_sha256
this_password_sha512

License

MIT

Copyright (c) 2019 Doingcloudright