Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ resource "azurerm_resource_group" "rg" {
}
```

<Tabs>
<Tab heading="aws">
The following example creates four `aws_iam_user` resources using a set created with the `toset()` function:

```hcl
Expand All @@ -40,6 +42,21 @@ resource "aws_iam_user" "the-accounts" {
name = each.key
}
```
</Tab>

<Tab heading="Azure">
The following example iterates over a set of environment names with the `for_each` meta-argument to create multiple Azure resource groups.

```hcl
resource "azurerm_resource_group" "rg" {
for_each = toset(["dev", "test", "staging", "prod"])
name = "rg-${each.key}"
location = "eastus"
}
```
Comment thread
Rebecca-Calixte marked this conversation as resolved.

</Tab>
</Tabs>

### Limitations on values

Expand Down
Loading