| --- |
| |
| <!-- Please do not edit this file, it is generated. --> |
| # generated by https://github.com/hashicorp/terraform-plugin-docs |
| page_title: "random_shuffle Resource - terraform-provider-random" |
| subcategory: "" |
| description: |- |
| The resource random_shuffle generates a random permutation of a list of strings given as an argument. |
| --- |
| |
| # random_shuffle (Resource) |
| |
| The resource `random_shuffle` generates a random permutation of a list of strings given as an argument. |
| |
| ## Example Usage |
| |
| ```python |
| # DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug |
| from constructs import Construct |
| from cdktf import Token, TerraformStack |
| # |
| # Provider bindings are generated by running `cdktf get`. |
| # See https://cdk.tf/provider-generation for more details. |
| # |
| from imports.aws.elb import Elb |
| from imports.random.shuffle import Shuffle |
| class MyConvertedCode(TerraformStack): |
| def __init__(self, scope, name, *, listener): |
| super().__init__(scope, name) |
| az = Shuffle(self, "az", |
| input=["us-west-1a", "us-west-1c", "us-west-1d", "us-west-1e"], |
| result_count=2 |
| ) |
| Elb(self, "example", |
| availability_zones=Token.as_list(az.result), |
| listener=listener |
| ) |
| ``` |
| |
| <!-- schema generated by tfplugindocs --> |
| ## Schema |
| |
| ### Required |
| |
| - `input` (List of String) The list of strings to shuffle. |
| |
| ### Optional |
| |
| - `keepers` (Map of String) Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider documentation](../index.html) for more information. |
| - `result_count` (Number) The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. |
| - `seed` (String) Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. |
| |
| **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. |
| |
| ### Read-Only |
| |
| - `id` (String) A static value used internally by Terraform, this should not be referenced in configurations. |
| - `result` (List of String) Random permutation of the list of strings given in `input`. |
| |
| <!-- cache-key: cdktf-0.19.0 input-86b1815d80e8e409f9aa5cc558980861275f4603260f1c637f82069bba22d88b 556251879b8ed0dc4c87a76b568667e0ab5e2c46efdd14a05c556daf05678783--> |