Last active
June 14, 2023 08:34
-
-
Save fegger-ducksify/8df0f02cfeaa3986740b4840d0caa632 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| key1: test1 | |
| key2: test2 | |
| key3: test3 | |
| key4: test4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| locals { | |
| yaml_content = yamldecode(file("${path.module}/data.yaml")) | |
| } | |
| resource "local_file" "createfile" { | |
| for_each = local.yaml_content | |
| filename = each.key | |
| content = each.value | |
| provisioner "local-exec" { | |
| command = "sleep 5" | |
| } | |
| } | |
| output "example_output" { | |
| value = local.yaml_content["key1"] | |
| } | |
| output "example_output2" { | |
| value = local.yaml_content["key2"] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment