Skip to content

Instantly share code, notes, and snippets.

@riweston
Created June 11, 2021 07:02
Show Gist options
  • Save riweston/8aa40f8e50116d6cc524def03fa81c72 to your computer and use it in GitHub Desktop.
Save riweston/8aa40f8e50116d6cc524def03fa81c72 to your computer and use it in GitHub Desktop.
resource "random_shuffle" "this" {
input = ["us-west-1a", "us-west-1c", "us-west-1d", "us-west-1e"]
result_count = 1
}
resource "random_password" "this" {
length = 16
special = true
}
resource "random_pet" "this" {}
output "virtual_machine" {
value = {
name = random_pet.this.id
region = random_shuffle.this.result
username = "admin"
password = random_password.this.result
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment