Skip to content

Commit

Permalink
fix(merging) concat does a better job of tuples and lists than coales…
Browse files Browse the repository at this point in the history
…ce does (#6)
  • Loading branch information
atrull authored Nov 19, 2023
1 parent 5d25819 commit 2ba3ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ locals {
http_responses = var.data_provider == "http" ? values(data.http.myip)[*].response_body : []

# build a list of responses
service_response_bodies = coalesce(local.external_curl_responses, local.curl2_responses, local.http_responses)
service_response_bodies = concat(local.external_curl_responses, local.curl2_responses, local.http_responses)

# remunge it without whitespace as a list of strings
split_output = split(",", replace(trimspace(join(",", local.service_response_bodies)), "/\\s/", ""))
Expand Down

0 comments on commit 2ba3ce0

Please sign in to comment.