Last active
May 26, 2023 20:29
-
-
Save arehmandev/f963272fd766fcfa176fea029f3c5359 to your computer and use it in GitHub Desktop.
Revisions
-
Abdul Rehman revised this gist
Oct 9, 2020 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,9 @@ locals { list3 = ["4", "5", "6"] list4 = ["d", "e", "f"] nested_loop = { for k in setproduct(local.list1, local.list2, local.list3, local.list4) : "${k[0]}-${k[1]}-${k[2]}-${k[3]}" => { "1" : k[0], "2" : k[1], "3" : k[2], "4" : k[3] } } nested_loop2 = { for entry in flatten(values({ for k in local.list1 : -
Abdul Rehman revised this gist
Oct 9, 2020 . 1 changed file with 82 additions and 83 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,489 +1,488 @@ Apply complete! Resources: 0 added, 0 changed, 0 destroyed.[0m Outputs: map_output = { "1-a-4-d" = { "1" = "1" "2" = "a" "3" = "4" "4" = "d" } "1-a-4-e" = { "1" = "1" "2" = "a" "3" = "4" "4" = "e" } "1-a-4-f" = { "1" = "1" "2" = "a" "3" = "4" "4" = "f" } "1-a-5-d" = { "1" = "1" "2" = "a" "3" = "5" "4" = "d" } "1-a-5-e" = { "1" = "1" "2" = "a" "3" = "5" "4" = "e" } "1-a-5-f" = { "1" = "1" "2" = "a" "3" = "5" "4" = "f" } "1-a-6-d" = { "1" = "1" "2" = "a" "3" = "6" "4" = "d" } "1-a-6-e" = { "1" = "1" "2" = "a" "3" = "6" "4" = "e" } "1-a-6-f" = { "1" = "1" "2" = "a" "3" = "6" "4" = "f" } "1-b-4-d" = { "1" = "1" "2" = "b" "3" = "4" "4" = "d" } "1-b-4-e" = { "1" = "1" "2" = "b" "3" = "4" "4" = "e" } "1-b-4-f" = { "1" = "1" "2" = "b" "3" = "4" "4" = "f" } "1-b-5-d" = { "1" = "1" "2" = "b" "3" = "5" "4" = "d" } "1-b-5-e" = { "1" = "1" "2" = "b" "3" = "5" "4" = "e" } "1-b-5-f" = { "1" = "1" "2" = "b" "3" = "5" "4" = "f" } "1-b-6-d" = { "1" = "1" "2" = "b" "3" = "6" "4" = "d" } "1-b-6-e" = { "1" = "1" "2" = "b" "3" = "6" "4" = "e" } "1-b-6-f" = { "1" = "1" "2" = "b" "3" = "6" "4" = "f" } "1-c-4-d" = { "1" = "1" "2" = "c" "3" = "4" "4" = "d" } "1-c-4-e" = { "1" = "1" "2" = "c" "3" = "4" "4" = "e" } "1-c-4-f" = { "1" = "1" "2" = "c" "3" = "4" "4" = "f" } "1-c-5-d" = { "1" = "1" "2" = "c" "3" = "5" "4" = "d" } "1-c-5-e" = { "1" = "1" "2" = "c" "3" = "5" "4" = "e" } "1-c-5-f" = { "1" = "1" "2" = "c" "3" = "5" "4" = "f" } "1-c-6-d" = { "1" = "1" "2" = "c" "3" = "6" "4" = "d" } "1-c-6-e" = { "1" = "1" "2" = "c" "3" = "6" "4" = "e" } "1-c-6-f" = { "1" = "1" "2" = "c" "3" = "6" "4" = "f" } "2-a-4-d" = { "1" = "2" "2" = "a" "3" = "4" "4" = "d" } "2-a-4-e" = { "1" = "2" "2" = "a" "3" = "4" "4" = "e" } "2-a-4-f" = { "1" = "2" "2" = "a" "3" = "4" "4" = "f" } "2-a-5-d" = { "1" = "2" "2" = "a" "3" = "5" "4" = "d" } "2-a-5-e" = { "1" = "2" "2" = "a" "3" = "5" "4" = "e" } "2-a-5-f" = { "1" = "2" "2" = "a" "3" = "5" "4" = "f" } "2-a-6-d" = { "1" = "2" "2" = "a" "3" = "6" "4" = "d" } "2-a-6-e" = { "1" = "2" "2" = "a" "3" = "6" "4" = "e" } "2-a-6-f" = { "1" = "2" "2" = "a" "3" = "6" "4" = "f" } "2-b-4-d" = { "1" = "2" "2" = "b" "3" = "4" "4" = "d" } "2-b-4-e" = { "1" = "2" "2" = "b" "3" = "4" "4" = "e" } "2-b-4-f" = { "1" = "2" "2" = "b" "3" = "4" "4" = "f" } "2-b-5-d" = { "1" = "2" "2" = "b" "3" = "5" "4" = "d" } "2-b-5-e" = { "1" = "2" "2" = "b" "3" = "5" "4" = "e" } "2-b-5-f" = { "1" = "2" "2" = "b" "3" = "5" "4" = "f" } "2-b-6-d" = { "1" = "2" "2" = "b" "3" = "6" "4" = "d" } "2-b-6-e" = { "1" = "2" "2" = "b" "3" = "6" "4" = "e" } "2-b-6-f" = { "1" = "2" "2" = "b" "3" = "6" "4" = "f" } "2-c-4-d" = { "1" = "2" "2" = "c" "3" = "4" "4" = "d" } "2-c-4-e" = { "1" = "2" "2" = "c" "3" = "4" "4" = "e" } "2-c-4-f" = { "1" = "2" "2" = "c" "3" = "4" "4" = "f" } "2-c-5-d" = { "1" = "2" "2" = "c" "3" = "5" "4" = "d" } "2-c-5-e" = { "1" = "2" "2" = "c" "3" = "5" "4" = "e" } "2-c-5-f" = { "1" = "2" "2" = "c" "3" = "5" "4" = "f" } "2-c-6-d" = { "1" = "2" "2" = "c" "3" = "6" "4" = "d" } "2-c-6-e" = { "1" = "2" "2" = "c" "3" = "6" "4" = "e" } "2-c-6-f" = { "1" = "2" "2" = "c" "3" = "6" "4" = "f" } "3-a-4-d" = { "1" = "3" "2" = "a" "3" = "4" "4" = "d" } "3-a-4-e" = { "1" = "3" "2" = "a" "3" = "4" "4" = "e" } "3-a-4-f" = { "1" = "3" "2" = "a" "3" = "4" "4" = "f" } "3-a-5-d" = { "1" = "3" "2" = "a" "3" = "5" "4" = "d" } "3-a-5-e" = { "1" = "3" "2" = "a" "3" = "5" "4" = "e" } "3-a-5-f" = { "1" = "3" "2" = "a" "3" = "5" "4" = "f" } "3-a-6-d" = { "1" = "3" "2" = "a" "3" = "6" "4" = "d" } "3-a-6-e" = { "1" = "3" "2" = "a" "3" = "6" "4" = "e" } "3-a-6-f" = { "1" = "3" "2" = "a" "3" = "6" "4" = "f" } "3-b-4-d" = { "1" = "3" "2" = "b" "3" = "4" "4" = "d" } "3-b-4-e" = { "1" = "3" "2" = "b" "3" = "4" "4" = "e" } "3-b-4-f" = { "1" = "3" "2" = "b" "3" = "4" "4" = "f" } "3-b-5-d" = { "1" = "3" "2" = "b" "3" = "5" "4" = "d" } "3-b-5-e" = { "1" = "3" "2" = "b" "3" = "5" "4" = "e" } "3-b-5-f" = { "1" = "3" "2" = "b" "3" = "5" "4" = "f" } "3-b-6-d" = { "1" = "3" "2" = "b" "3" = "6" "4" = "d" } "3-b-6-e" = { "1" = "3" "2" = "b" "3" = "6" "4" = "e" } "3-b-6-f" = { "1" = "3" "2" = "b" "3" = "6" "4" = "f" } "3-c-4-d" = { "1" = "3" "2" = "c" "3" = "4" "4" = "d" } "3-c-4-e" = { "1" = "3" "2" = "c" "3" = "4" "4" = "e" } "3-c-4-f" = { "1" = "3" "2" = "c" "3" = "4" "4" = "f" } "3-c-5-d" = { "1" = "3" "2" = "c" "3" = "5" "4" = "d" } "3-c-5-e" = { "1" = "3" "2" = "c" "3" = "5" "4" = "e" } "3-c-5-f" = { "1" = "3" "2" = "c" "3" = "5" "4" = "f" } "3-c-6-d" = { "1" = "3" "2" = "c" "3" = "6" "4" = "d" } "3-c-6-e" = { "1" = "3" "2" = "c" "3" = "6" "4" = "e" } "3-c-6-f" = { "1" = "3" "2" = "c" "3" = "6" @@ -977,4 +976,4 @@ map_output2 = { "3" = "6" "4" = "f" } } -
Abdul Rehman revised this gist
Oct 9, 2020 . 2 changed files with 660 additions and 168 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,493 +1,979 @@ Apply complete! Resources: 0 added, 0 changed, 0 destroyed.[0m Outputs: map_output = { "1-a-4=d" = { "1" = "1" "2" = "a" "3" = "4" "4" = "d" } "1-a-4=e" = { "1" = "1" "2" = "a" "3" = "4" "4" = "e" } "1-a-4=f" = { "1" = "1" "2" = "a" "3" = "4" "4" = "f" } "1-a-5=d" = { "1" = "1" "2" = "a" "3" = "5" "4" = "d" } "1-a-5=e" = { "1" = "1" "2" = "a" "3" = "5" "4" = "e" } "1-a-5=f" = { "1" = "1" "2" = "a" "3" = "5" "4" = "f" } "1-a-6=d" = { "1" = "1" "2" = "a" "3" = "6" "4" = "d" } "1-a-6=e" = { "1" = "1" "2" = "a" "3" = "6" "4" = "e" } "1-a-6=f" = { "1" = "1" "2" = "a" "3" = "6" "4" = "f" } "1-b-4=d" = { "1" = "1" "2" = "b" "3" = "4" "4" = "d" } "1-b-4=e" = { "1" = "1" "2" = "b" "3" = "4" "4" = "e" } "1-b-4=f" = { "1" = "1" "2" = "b" "3" = "4" "4" = "f" } "1-b-5=d" = { "1" = "1" "2" = "b" "3" = "5" "4" = "d" } "1-b-5=e" = { "1" = "1" "2" = "b" "3" = "5" "4" = "e" } "1-b-5=f" = { "1" = "1" "2" = "b" "3" = "5" "4" = "f" } "1-b-6=d" = { "1" = "1" "2" = "b" "3" = "6" "4" = "d" } "1-b-6=e" = { "1" = "1" "2" = "b" "3" = "6" "4" = "e" } "1-b-6=f" = { "1" = "1" "2" = "b" "3" = "6" "4" = "f" } "1-c-4=d" = { "1" = "1" "2" = "c" "3" = "4" "4" = "d" } "1-c-4=e" = { "1" = "1" "2" = "c" "3" = "4" "4" = "e" } "1-c-4=f" = { "1" = "1" "2" = "c" "3" = "4" "4" = "f" } "1-c-5=d" = { "1" = "1" "2" = "c" "3" = "5" "4" = "d" } "1-c-5=e" = { "1" = "1" "2" = "c" "3" = "5" "4" = "e" } "1-c-5=f" = { "1" = "1" "2" = "c" "3" = "5" "4" = "f" } "1-c-6=d" = { "1" = "1" "2" = "c" "3" = "6" "4" = "d" } "1-c-6=e" = { "1" = "1" "2" = "c" "3" = "6" "4" = "e" } "1-c-6=f" = { "1" = "1" "2" = "c" "3" = "6" "4" = "f" } "2-a-4=d" = { "1" = "2" "2" = "a" "3" = "4" "4" = "d" } "2-a-4=e" = { "1" = "2" "2" = "a" "3" = "4" "4" = "e" } "2-a-4=f" = { "1" = "2" "2" = "a" "3" = "4" "4" = "f" } "2-a-5=d" = { "1" = "2" "2" = "a" "3" = "5" "4" = "d" } "2-a-5=e" = { "1" = "2" "2" = "a" "3" = "5" "4" = "e" } "2-a-5=f" = { "1" = "2" "2" = "a" "3" = "5" "4" = "f" } "2-a-6=d" = { "1" = "2" "2" = "a" "3" = "6" "4" = "d" } "2-a-6=e" = { "1" = "2" "2" = "a" "3" = "6" "4" = "e" } "2-a-6=f" = { "1" = "2" "2" = "a" "3" = "6" "4" = "f" } "2-b-4=d" = { "1" = "2" "2" = "b" "3" = "4" "4" = "d" } "2-b-4=e" = { "1" = "2" "2" = "b" "3" = "4" "4" = "e" } "2-b-4=f" = { "1" = "2" "2" = "b" "3" = "4" "4" = "f" } "2-b-5=d" = { "1" = "2" "2" = "b" "3" = "5" "4" = "d" } "2-b-5=e" = { "1" = "2" "2" = "b" "3" = "5" "4" = "e" } "2-b-5=f" = { "1" = "2" "2" = "b" "3" = "5" "4" = "f" } "2-b-6=d" = { "1" = "2" "2" = "b" "3" = "6" "4" = "d" } "2-b-6=e" = { "1" = "2" "2" = "b" "3" = "6" "4" = "e" } "2-b-6=f" = { "1" = "2" "2" = "b" "3" = "6" "4" = "f" } "2-c-4=d" = { "1" = "2" "2" = "c" "3" = "4" "4" = "d" } "2-c-4=e" = { "1" = "2" "2" = "c" "3" = "4" "4" = "e" } "2-c-4=f" = { "1" = "2" "2" = "c" "3" = "4" "4" = "f" } "2-c-5=d" = { "1" = "2" "2" = "c" "3" = "5" "4" = "d" } "2-c-5=e" = { "1" = "2" "2" = "c" "3" = "5" "4" = "e" } "2-c-5=f" = { "1" = "2" "2" = "c" "3" = "5" "4" = "f" } "2-c-6=d" = { "1" = "2" "2" = "c" "3" = "6" "4" = "d" } "2-c-6=e" = { "1" = "2" "2" = "c" "3" = "6" "4" = "e" } "2-c-6=f" = { "1" = "2" "2" = "c" "3" = "6" "4" = "f" } "3-a-4=d" = { "1" = "3" "2" = "a" "3" = "4" "4" = "d" } "3-a-4=e" = { "1" = "3" "2" = "a" "3" = "4" "4" = "e" } "3-a-4=f" = { "1" = "3" "2" = "a" "3" = "4" "4" = "f" } "3-a-5=d" = { "1" = "3" "2" = "a" "3" = "5" "4" = "d" } "3-a-5=e" = { "1" = "3" "2" = "a" "3" = "5" "4" = "e" } "3-a-5=f" = { "1" = "3" "2" = "a" "3" = "5" "4" = "f" } "3-a-6=d" = { "1" = "3" "2" = "a" "3" = "6" "4" = "d" } "3-a-6=e" = { "1" = "3" "2" = "a" "3" = "6" "4" = "e" } "3-a-6=f" = { "1" = "3" "2" = "a" "3" = "6" "4" = "f" } "3-b-4=d" = { "1" = "3" "2" = "b" "3" = "4" "4" = "d" } "3-b-4=e" = { "1" = "3" "2" = "b" "3" = "4" "4" = "e" } "3-b-4=f" = { "1" = "3" "2" = "b" "3" = "4" "4" = "f" } "3-b-5=d" = { "1" = "3" "2" = "b" "3" = "5" "4" = "d" } "3-b-5=e" = { "1" = "3" "2" = "b" "3" = "5" "4" = "e" } "3-b-5=f" = { "1" = "3" "2" = "b" "3" = "5" "4" = "f" } "3-b-6=d" = { "1" = "3" "2" = "b" "3" = "6" "4" = "d" } "3-b-6=e" = { "1" = "3" "2" = "b" "3" = "6" "4" = "e" } "3-b-6=f" = { "1" = "3" "2" = "b" "3" = "6" "4" = "f" } "3-c-4=d" = { "1" = "3" "2" = "c" "3" = "4" "4" = "d" } "3-c-4=e" = { "1" = "3" "2" = "c" "3" = "4" "4" = "e" } "3-c-4=f" = { "1" = "3" "2" = "c" "3" = "4" "4" = "f" } "3-c-5=d" = { "1" = "3" "2" = "c" "3" = "5" "4" = "d" } "3-c-5=e" = { "1" = "3" "2" = "c" "3" = "5" "4" = "e" } "3-c-5=f" = { "1" = "3" "2" = "c" "3" = "5" "4" = "f" } "3-c-6=d" = { "1" = "3" "2" = "c" "3" = "6" "4" = "d" } "3-c-6=e" = { "1" = "3" "2" = "c" "3" = "6" "4" = "e" } "3-c-6=f" = { "1" = "3" "2" = "c" "3" = "6" "4" = "f" } } map_output2 = { "1-a-4-d" = { "1" = "1" "2" = "a" "3" = "4" "4" = "d" } "1-a-4-e" = { "1" = "1" "2" = "a" "3" = "4" "4" = "e" } "1-a-4-f" = { "1" = "1" "2" = "a" "3" = "4" "4" = "f" } "1-a-5-d" = { "1" = "1" "2" = "a" "3" = "5" "4" = "d" } "1-a-5-e" = { "1" = "1" "2" = "a" "3" = "5" "4" = "e" } "1-a-5-f" = { "1" = "1" "2" = "a" "3" = "5" "4" = "f" } "1-a-6-d" = { "1" = "1" "2" = "a" "3" = "6" "4" = "d" } "1-a-6-e" = { "1" = "1" "2" = "a" "3" = "6" "4" = "e" } "1-a-6-f" = { "1" = "1" "2" = "a" "3" = "6" "4" = "f" } "1-b-4-d" = { "1" = "1" "2" = "b" "3" = "4" "4" = "d" } "1-b-4-e" = { "1" = "1" "2" = "b" "3" = "4" "4" = "e" } "1-b-4-f" = { "1" = "1" "2" = "b" "3" = "4" "4" = "f" } "1-b-5-d" = { "1" = "1" "2" = "b" "3" = "5" "4" = "d" } "1-b-5-e" = { "1" = "1" "2" = "b" "3" = "5" "4" = "e" } "1-b-5-f" = { "1" = "1" "2" = "b" "3" = "5" "4" = "f" } "1-b-6-d" = { "1" = "1" "2" = "b" "3" = "6" "4" = "d" } "1-b-6-e" = { "1" = "1" "2" = "b" "3" = "6" "4" = "e" } "1-b-6-f" = { "1" = "1" "2" = "b" "3" = "6" "4" = "f" } "1-c-4-d" = { "1" = "1" "2" = "c" "3" = "4" "4" = "d" } "1-c-4-e" = { "1" = "1" "2" = "c" "3" = "4" "4" = "e" } "1-c-4-f" = { "1" = "1" "2" = "c" "3" = "4" "4" = "f" } "1-c-5-d" = { "1" = "1" "2" = "c" "3" = "5" "4" = "d" } "1-c-5-e" = { "1" = "1" "2" = "c" "3" = "5" "4" = "e" } "1-c-5-f" = { "1" = "1" "2" = "c" "3" = "5" "4" = "f" } "1-c-6-d" = { "1" = "1" "2" = "c" "3" = "6" "4" = "d" } "1-c-6-e" = { "1" = "1" "2" = "c" "3" = "6" "4" = "e" } "1-c-6-f" = { "1" = "1" "2" = "c" "3" = "6" "4" = "f" } "2-a-4-d" = { "1" = "2" "2" = "a" "3" = "4" "4" = "d" } "2-a-4-e" = { "1" = "2" "2" = "a" "3" = "4" "4" = "e" } "2-a-4-f" = { "1" = "2" "2" = "a" "3" = "4" "4" = "f" } "2-a-5-d" = { "1" = "2" "2" = "a" "3" = "5" "4" = "d" } "2-a-5-e" = { "1" = "2" "2" = "a" "3" = "5" "4" = "e" } "2-a-5-f" = { "1" = "2" "2" = "a" "3" = "5" "4" = "f" } "2-a-6-d" = { "1" = "2" "2" = "a" "3" = "6" "4" = "d" } "2-a-6-e" = { "1" = "2" "2" = "a" "3" = "6" "4" = "e" } "2-a-6-f" = { "1" = "2" "2" = "a" "3" = "6" "4" = "f" } "2-b-4-d" = { "1" = "2" "2" = "b" "3" = "4" "4" = "d" } "2-b-4-e" = { "1" = "2" "2" = "b" "3" = "4" "4" = "e" } "2-b-4-f" = { "1" = "2" "2" = "b" "3" = "4" "4" = "f" } "2-b-5-d" = { "1" = "2" "2" = "b" "3" = "5" "4" = "d" } "2-b-5-e" = { "1" = "2" "2" = "b" "3" = "5" "4" = "e" } "2-b-5-f" = { "1" = "2" "2" = "b" "3" = "5" "4" = "f" } "2-b-6-d" = { "1" = "2" "2" = "b" "3" = "6" "4" = "d" } "2-b-6-e" = { "1" = "2" "2" = "b" "3" = "6" "4" = "e" } "2-b-6-f" = { "1" = "2" "2" = "b" "3" = "6" "4" = "f" } "2-c-4-d" = { "1" = "2" "2" = "c" "3" = "4" "4" = "d" } "2-c-4-e" = { "1" = "2" "2" = "c" "3" = "4" "4" = "e" } "2-c-4-f" = { "1" = "2" "2" = "c" "3" = "4" "4" = "f" } "2-c-5-d" = { "1" = "2" "2" = "c" "3" = "5" "4" = "d" } "2-c-5-e" = { "1" = "2" "2" = "c" "3" = "5" "4" = "e" } "2-c-5-f" = { "1" = "2" "2" = "c" "3" = "5" "4" = "f" } "2-c-6-d" = { "1" = "2" "2" = "c" "3" = "6" "4" = "d" } "2-c-6-e" = { "1" = "2" "2" = "c" "3" = "6" "4" = "e" } "2-c-6-f" = { "1" = "2" "2" = "c" "3" = "6" "4" = "f" } "3-a-4-d" = { "1" = "3" "2" = "a" "3" = "4" "4" = "d" } "3-a-4-e" = { "1" = "3" "2" = "a" "3" = "4" "4" = "e" } "3-a-4-f" = { "1" = "3" "2" = "a" "3" = "4" "4" = "f" } "3-a-5-d" = { "1" = "3" "2" = "a" "3" = "5" "4" = "d" } "3-a-5-e" = { "1" = "3" "2" = "a" "3" = "5" "4" = "e" } "3-a-5-f" = { "1" = "3" "2" = "a" "3" = "5" "4" = "f" } "3-a-6-d" = { "1" = "3" "2" = "a" "3" = "6" "4" = "d" } "3-a-6-e" = { "1" = "3" "2" = "a" "3" = "6" "4" = "e" } "3-a-6-f" = { "1" = "3" "2" = "a" "3" = "6" "4" = "f" } "3-b-4-d" = { "1" = "3" "2" = "b" "3" = "4" "4" = "d" } "3-b-4-e" = { "1" = "3" "2" = "b" "3" = "4" "4" = "e" } "3-b-4-f" = { "1" = "3" "2" = "b" "3" = "4" "4" = "f" } "3-b-5-d" = { "1" = "3" "2" = "b" "3" = "5" "4" = "d" } "3-b-5-e" = { "1" = "3" "2" = "b" "3" = "5" "4" = "e" } "3-b-5-f" = { "1" = "3" "2" = "b" "3" = "5" "4" = "f" } "3-b-6-d" = { "1" = "3" "2" = "b" "3" = "6" "4" = "d" } "3-b-6-e" = { "1" = "3" "2" = "b" "3" = "6" "4" = "e" } "3-b-6-f" = { "1" = "3" "2" = "b" "3" = "6" "4" = "f" } "3-c-4-d" = { "1" = "3" "2" = "c" "3" = "4" "4" = "d" } "3-c-4-e" = { "1" = "3" "2" = "c" "3" = "4" "4" = "e" } "3-c-4-f" = { "1" = "3" "2" = "c" "3" = "4" "4" = "f" } "3-c-5-d" = { "1" = "3" "2" = "c" "3" = "5" "4" = "d" } "3-c-5-e" = { "1" = "3" "2" = "c" "3" = "5" "4" = "e" } "3-c-5-f" = { "1" = "3" "2" = "c" "3" = "5" "4" = "f" } "3-c-6-d" = { "1" = "3" "2" = "c" "3" = "6" "4" = "d" } "3-c-6-e" = { "1" = "3" "2" = "c" "3" = "6" "4" = "e" } "3-c-6-f" = { "1" = "3" "2" = "c" "3" = "6" "4" = "f" } 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ // for_each nested loop using setproduct and using raw iteration with for locals { @@ -7,12 +7,14 @@ locals { list3 = ["4", "5", "6"] list4 = ["d", "e", "f"] nested_loop = { for k in setproduct(local.list1, local.list2, local.list3, local.list4) : "${k[0]}-${k[1]}-${k[2]}=${k[3]}" => { "1" : k[0], "2" : k[1], "3" : k[2], "4" : k[3] } } nested_loop2 = { for entry in flatten(values({ for k in local.list1 : k => [for v in local.list2 : [ for y in local.list3 : [ for z in local.list4 : [ { "${k}-${v}-${y}-${z}" : { "1" : k, "2" : v, "3" : y, "4" : z } } ]]]] })) : keys(entry)[0] => values(entry)[0] } @@ -23,3 +25,7 @@ locals { output "map_output" { value = local.nested_loop } output "map_output2" { value = local.nested_loop2 } -
Abdul Rehman revised this gist
Oct 9, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ // for_each nested loop without using setproduct! locals { -
Abdul Rehman revised this gist
Oct 9, 2020 . 2 changed files with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ Apply complete! Resources: 0 added, 0 changed, 0 destroyed. Outputs: map_output = { "1-a-4-d" = { "1" = "a" "2" = "1" 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ // for_each nested loop Without using setproduct! locals { @@ -20,6 +20,6 @@ locals { } output "map_output" { value = local.nested_loop } -
Abdul Rehman revised this gist
Oct 9, 2020 . 2 changed files with 1 addition and 3 deletions.There are no files selected for viewing
File renamed without changes.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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,4 @@ // Without using setproduct! locals { -
Abdul Rehman created this gist
Oct 9, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,494 @@ ↳ terraform apply Apply complete! Resources: 0 added, 0 changed, 0 destroyed. Outputs: name = { "1-a-4-d" = { "1" = "a" "2" = "1" "3" = "4" "4" = "d" } "1-a-4-e" = { "1" = "a" "2" = "1" "3" = "4" "4" = "e" } "1-a-4-f" = { "1" = "a" "2" = "1" "3" = "4" "4" = "f" } "1-a-5-d" = { "1" = "a" "2" = "1" "3" = "5" "4" = "d" } "1-a-5-e" = { "1" = "a" "2" = "1" "3" = "5" "4" = "e" } "1-a-5-f" = { "1" = "a" "2" = "1" "3" = "5" "4" = "f" } "1-a-6-d" = { "1" = "a" "2" = "1" "3" = "6" "4" = "d" } "1-a-6-e" = { "1" = "a" "2" = "1" "3" = "6" "4" = "e" } "1-a-6-f" = { "1" = "a" "2" = "1" "3" = "6" "4" = "f" } "1-b-4-d" = { "1" = "b" "2" = "1" "3" = "4" "4" = "d" } "1-b-4-e" = { "1" = "b" "2" = "1" "3" = "4" "4" = "e" } "1-b-4-f" = { "1" = "b" "2" = "1" "3" = "4" "4" = "f" } "1-b-5-d" = { "1" = "b" "2" = "1" "3" = "5" "4" = "d" } "1-b-5-e" = { "1" = "b" "2" = "1" "3" = "5" "4" = "e" } "1-b-5-f" = { "1" = "b" "2" = "1" "3" = "5" "4" = "f" } "1-b-6-d" = { "1" = "b" "2" = "1" "3" = "6" "4" = "d" } "1-b-6-e" = { "1" = "b" "2" = "1" "3" = "6" "4" = "e" } "1-b-6-f" = { "1" = "b" "2" = "1" "3" = "6" "4" = "f" } "1-c-4-d" = { "1" = "c" "2" = "1" "3" = "4" "4" = "d" } "1-c-4-e" = { "1" = "c" "2" = "1" "3" = "4" "4" = "e" } "1-c-4-f" = { "1" = "c" "2" = "1" "3" = "4" "4" = "f" } "1-c-5-d" = { "1" = "c" "2" = "1" "3" = "5" "4" = "d" } "1-c-5-e" = { "1" = "c" "2" = "1" "3" = "5" "4" = "e" } "1-c-5-f" = { "1" = "c" "2" = "1" "3" = "5" "4" = "f" } "1-c-6-d" = { "1" = "c" "2" = "1" "3" = "6" "4" = "d" } "1-c-6-e" = { "1" = "c" "2" = "1" "3" = "6" "4" = "e" } "1-c-6-f" = { "1" = "c" "2" = "1" "3" = "6" "4" = "f" } "2-a-4-d" = { "1" = "a" "2" = "2" "3" = "4" "4" = "d" } "2-a-4-e" = { "1" = "a" "2" = "2" "3" = "4" "4" = "e" } "2-a-4-f" = { "1" = "a" "2" = "2" "3" = "4" "4" = "f" } "2-a-5-d" = { "1" = "a" "2" = "2" "3" = "5" "4" = "d" } "2-a-5-e" = { "1" = "a" "2" = "2" "3" = "5" "4" = "e" } "2-a-5-f" = { "1" = "a" "2" = "2" "3" = "5" "4" = "f" } "2-a-6-d" = { "1" = "a" "2" = "2" "3" = "6" "4" = "d" } "2-a-6-e" = { "1" = "a" "2" = "2" "3" = "6" "4" = "e" } "2-a-6-f" = { "1" = "a" "2" = "2" "3" = "6" "4" = "f" } "2-b-4-d" = { "1" = "b" "2" = "2" "3" = "4" "4" = "d" } "2-b-4-e" = { "1" = "b" "2" = "2" "3" = "4" "4" = "e" } "2-b-4-f" = { "1" = "b" "2" = "2" "3" = "4" "4" = "f" } "2-b-5-d" = { "1" = "b" "2" = "2" "3" = "5" "4" = "d" } "2-b-5-e" = { "1" = "b" "2" = "2" "3" = "5" "4" = "e" } "2-b-5-f" = { "1" = "b" "2" = "2" "3" = "5" "4" = "f" } "2-b-6-d" = { "1" = "b" "2" = "2" "3" = "6" "4" = "d" } "2-b-6-e" = { "1" = "b" "2" = "2" "3" = "6" "4" = "e" } "2-b-6-f" = { "1" = "b" "2" = "2" "3" = "6" "4" = "f" } "2-c-4-d" = { "1" = "c" "2" = "2" "3" = "4" "4" = "d" } "2-c-4-e" = { "1" = "c" "2" = "2" "3" = "4" "4" = "e" } "2-c-4-f" = { "1" = "c" "2" = "2" "3" = "4" "4" = "f" } "2-c-5-d" = { "1" = "c" "2" = "2" "3" = "5" "4" = "d" } "2-c-5-e" = { "1" = "c" "2" = "2" "3" = "5" "4" = "e" } "2-c-5-f" = { "1" = "c" "2" = "2" "3" = "5" "4" = "f" } "2-c-6-d" = { "1" = "c" "2" = "2" "3" = "6" "4" = "d" } "2-c-6-e" = { "1" = "c" "2" = "2" "3" = "6" "4" = "e" } "2-c-6-f" = { "1" = "c" "2" = "2" "3" = "6" "4" = "f" } "3-a-4-d" = { "1" = "a" "2" = "3" "3" = "4" "4" = "d" } "3-a-4-e" = { "1" = "a" "2" = "3" "3" = "4" "4" = "e" } "3-a-4-f" = { "1" = "a" "2" = "3" "3" = "4" "4" = "f" } "3-a-5-d" = { "1" = "a" "2" = "3" "3" = "5" "4" = "d" } "3-a-5-e" = { "1" = "a" "2" = "3" "3" = "5" "4" = "e" } "3-a-5-f" = { "1" = "a" "2" = "3" "3" = "5" "4" = "f" } "3-a-6-d" = { "1" = "a" "2" = "3" "3" = "6" "4" = "d" } "3-a-6-e" = { "1" = "a" "2" = "3" "3" = "6" "4" = "e" } "3-a-6-f" = { "1" = "a" "2" = "3" "3" = "6" "4" = "f" } "3-b-4-d" = { "1" = "b" "2" = "3" "3" = "4" "4" = "d" } "3-b-4-e" = { "1" = "b" "2" = "3" "3" = "4" "4" = "e" } "3-b-4-f" = { "1" = "b" "2" = "3" "3" = "4" "4" = "f" } "3-b-5-d" = { "1" = "b" "2" = "3" "3" = "5" "4" = "d" } "3-b-5-e" = { "1" = "b" "2" = "3" "3" = "5" "4" = "e" } "3-b-5-f" = { "1" = "b" "2" = "3" "3" = "5" "4" = "f" } "3-b-6-d" = { "1" = "b" "2" = "3" "3" = "6" "4" = "d" } "3-b-6-e" = { "1" = "b" "2" = "3" "3" = "6" "4" = "e" } "3-b-6-f" = { "1" = "b" "2" = "3" "3" = "6" "4" = "f" } "3-c-4-d" = { "1" = "c" "2" = "3" "3" = "4" "4" = "d" } "3-c-4-e" = { "1" = "c" "2" = "3" "3" = "4" "4" = "e" } "3-c-4-f" = { "1" = "c" "2" = "3" "3" = "4" "4" = "f" } "3-c-5-d" = { "1" = "c" "2" = "3" "3" = "5" "4" = "d" } "3-c-5-e" = { "1" = "c" "2" = "3" "3" = "5" "4" = "e" } "3-c-5-f" = { "1" = "c" "2" = "3" "3" = "5" "4" = "f" } "3-c-6-d" = { "1" = "c" "2" = "3" "3" = "6" "4" = "d" } "3-c-6-e" = { "1" = "c" "2" = "3" "3" = "6" "4" = "e" } "3-c-6-f" = { "1" = "c" "2" = "3" "3" = "6" "4" = "f" } } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ // Without using set product! locals { list1 = ["1", "2", "3"] list2 = ["a", "b", "c"] list3 = ["4", "5", "6"] list4 = ["d", "e", "f"] nested_loop = { for entry in flatten(values({ for k in local.list1 : k => [for v in local.list2 : [ for y in local.list3 : [ for z in local.list4 : [ { "${k}-${v}-${y}-${z}" : { "1" : v, "2" : k, "3" : y, "4" : z } } ]]]] })) : keys(entry)[0] => values(entry)[0] } } output "name" { value = local.nested_loop }