FEATURES PRICING ABOUT DOCS LOGIN

random_shuffle

The resource random_shuffle generates a random permutation of a list of strings given as an argument.

Example Usage

resource "random_shuffle" "az" {
  input = ["us-west-1a", "us-west-1c", "us-west-1d", "us-west-1e"]
  result_count = 2
}

resource "aws_elb" "example" {
  # Place the ELB in any two of the given availability zones, selected
  # at random.
  availability_zones = ["${random_shuffle.az.result}"]

  # ... and other aws_elb arguments ...
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:


See the source of this document at Terraform.io

REQUEST A DEMO