Created
July 8, 2020 17:14
-
-
Save asalimonov/fea3c343977996bf7479f1dcb4dbd68d to your computer and use it in GitHub Desktop.
Terraform random passwords
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "random" { | |
version = "2.2.0" | |
} | |
variable "users" { | |
type = set(string) | |
default = ["alice", "bob"] | |
} | |
resource "random_password" "pwd" { | |
for_each = var.users | |
length = 16 | |
special = true | |
override_special = "_%@" | |
} | |
output "accs" { | |
value = random_password.pwd.* | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment