Skip to content

Instantly share code, notes, and snippets.

@vyusufcan
Last active March 26, 2025 10:36
Show Gist options
  • Save vyusufcan/008684680a38b37dad6f4b12795f9a57 to your computer and use it in GitHub Desktop.
Save vyusufcan/008684680a38b37dad6f4b12795f9a57 to your computer and use it in GitHub Desktop.
Random Username and Password Creation with Terraform
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