Skip to content

Commit

Permalink
examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ned1313 committed Feb 21, 2024
1 parent 257c1f4 commit e1765b7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
5 changes: 4 additions & 1 deletion 2020-06-30-ModuleLooping/file-creator/outputs.tf
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# No outputs defined
# No outputs defined
output "stuff" {
value = local_file.my_file.id
}
17 changes: 17 additions & 0 deletions 2020-06-30-ModuleLooping/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,21 @@ module "files_foreach" {
content = each.value
filename = "${each.key}.txt"

}

provider "local" {
alias = "alt"
}

resource "local_file" "test" {
for_each = toset(["a", "b", "c"])
provider = local.alt

content = each.key
filename = "${each.key}.txt"
}

output "names" {
value = module.files[*].stuff

}

0 comments on commit e1765b7

Please sign in to comment.