Skip to content

Commit 7636d16

Browse files
authored
Merge pull request hashicorp#296 from hashicorp/fix-to-string-for-config-and-state
fix to_string for config and state
2 parents 6f5d68c + 797baff commit 7636d16

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

governance/third-generation/common-functions/tfconfig-functions/tfconfig-functions.sentinel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,10 @@ to_string = func(obj) {
276276
if index < lastIndex {
277277
output += to_string(key) + ": " + to_string(obj[key]) + ", "
278278
} else {
279-
output += to_string(key) + ": " + to_string(obj[key]) + "}"
279+
output += to_string(key) + ": " + to_string(obj[key])
280280
}
281281
}
282+
output += "}"
282283
return output
283284
else:
284285
return ""

governance/third-generation/common-functions/tfstate-functions/tfstate-functions.sentinel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,10 @@ to_string = func(obj) {
180180
if index < lastIndex {
181181
output += to_string(key) + ": " + to_string(obj[key]) + ", "
182182
} else {
183-
output += to_string(key) + ": " + to_string(obj[key]) + "}"
183+
output += to_string(key) + ": " + to_string(obj[key])
184184
}
185185
}
186+
output += "}"
186187
return output
187188
else:
188189
return ""

0 commit comments

Comments
 (0)