Random

random_id generates random numbers that are intended to be used as unique identifiers for other resources.

resource "random_id" "user-password" {
  byte_length = 8
}

output generated_user_password {
  value       = "${random_id.user-password.hex}"
  sensitive   = true
}

random_string:

resource "random_string" "password" {
  length = 16
  special = true
  override_special = "/@\" "
}

resource "aws_db_instance" "example" {
  password = "${random_string.password.result}"
}
random_uuid
resource "random_uuid" "test" { }

resource "azurerm_resource_group" "test" {
  name     = "${random_uuid.test.result}-rg"
  location = "Central US"
}