Skip to content

Commit

Permalink
more docs tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
robwhitby committed Sep 25, 2024
1 parent 1b853dc commit 84fbcf5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
18 changes: 17 additions & 1 deletion docs/data-sources/teams.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,23 @@ description: |-

Retrieves all teams


## Example Usage

```terraform
data "ee-platform_teams" "all_teams" {}
output "teams" {
value = data.ee-platform_teams.all_teams.teams
}
# example looping over teams
# key === team id
resource "local_file" "foo" {
for_each = data.ee-platform_teams.all_teams.teams
filename = "/tmp/test/${each.key}"
content = "name = ${each.value.name}, department = ${each.value.department}"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
12 changes: 7 additions & 5 deletions examples/provider-install-verification/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ terraform {

provider "ee-platform" {}

data "ee-platform_teams" "teams" {}
data "ee-platform_teams" "all_teams" {}

output "all_teams" {
value = data.ee-platform_teams.teams.teams
output "teams" {
value = data.ee-platform_teams.all_teams.teams
}

# example looping over teams
# key === team id
resource "local_file" "foo" {
for_each = data.ee-platform_teams.teams.teams
for_each = data.ee-platform_teams.all_teams.teams
filename = "/tmp/test/${each.key}"
content = each.value.name
content = "name = ${each.value.name}, department = ${each.value.department}"
}

0 comments on commit 84fbcf5

Please sign in to comment.