Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Terraform Random Password Module
variable "length" {
default = "20"
}
resource "random_id" "password" {
byte_length = "${var.length * 3 / 4}"
}
output "password" {
value = "${random_id.password.b64}"
}
module "password" {
source = "../"
length = "20"
}
output "password" { value = "${module.password.password}" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment