Last active
March 26, 2025 10:36
-
-
Save vyusufcan/008684680a38b37dad6f4b12795f9a57 to your computer and use it in GitHub Desktop.
Random Username and Password Creation with Terraform
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" { | |
} | |
resource "random_string" "username" { | |
length = 8 | |
special = false | |
upper = false | |
} | |
resource "random_password" "password" { | |
length = 16 | |
special = true | |
override_special = "!@#_" | |
} | |
output "username" { | |
value = random_string.username.result | |
} | |
output "password" { | |
value = random_password.password.result | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment