I have a use case, which I believe, is covered with the basic HTTP provider from Terraform, however I’m running in to what I think is just a formatting issue.
I am trying to POST a list of list values to a generic REST API with a couple of other required parameters. The working cURL for this looks like the below:
curl -k -u admin:pass https://url:port/working/uri -d 'field1=value1' -d 'field2=[[value2a], [value2b]]'
Trying a different end point to confirm what I know, I am happy with the format of the other fields, but after trying several permutations of what I expected Terraform to need, I’ve come up empty with the format for ‘field2’.
request_body = {
field1: "value1",
field2: "[['value2a'], ['value2b']]"
}
Can anyone shed some light on how I should format field2?
2 posts - 2 participants